Docs/Admin API/Flows/Update join organization

Update a join organization invitation

Preview
PATCH/admin/v1/flows/{flowId}:updateJoinOrganization

Update a join organization flow.

path parameters

  • flowId

    string

    Required

    The identifier of the flow.

body parameters

  • roleId

    string

    The identifier of the role.

Returns

  • id

    string

    The system-assigned identifier of the flow.

  • state

    enum

    The current state of the flow.

    Possible values:
    START_PENDINGSTARTEDCOMPLETEDCANCELEDEXPIRED
  • stateReason

    string

    The code that best describes the reason for the state.

  • type

    enum

    The flow type.

    Possible values:
    JOIN_ORGANIZATIONSIGNUP
  • organization

    Organization

    BASIC

    The target organization for the flow.

  • user

    User

    BASIC

    The target user for the flow.

  • creator

    User

    BASIC

    The user who created the flow.

    This will not be set if the invitation was created by an admin.

  • startTime

    date-time

    The start time of the flow.

  • expireTime

    date-time

    The time the flow will expire.

  • ttl

    string

    The expire duration of the flow.

  • secret

    string

    The flow secret.

    This is only populated on create.

  • joinOrganization

    JoinOrganizationFlow

    The join organization flow type specific data.

  • signup

    SignupFlow

    The signup flow type specific data

  • view

    enum

    The flow view.

    Possible values:
    BASICFULL
  • createTime

    date-time

    The creation time of the flow.

  • updateTime

    date-time

    The last update time of the flow.

curl https://api.userhub.com/admin/v1/flows/flow_3on5rHNG5aMGao:updateJoinOrganization \
  -H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
  -X PATCH \
  --json '{
    "roleId": "role_51jav4KK"
  }'
Response bodyJSON
{
  "id": "flow_3on5rHNG5aMGao",
  "state": "START_PENDING",
  "type": "JOIN_ORGANIZATION",
  "organization": {
    "id": "org_28seyVGVL1got6",
    "state": "ACTIVE",
    "displayName": "Acme Inc",
    "email": "[email protected]",
    "emailVerified": true,
    "imageUrl": "https://example.com/acme.jpg",
    "accountConnections": [],
    "signupTime": "2025-05-15T13:00:00Z",
    "memberCount": 1,
    "view": "BASIC",
    "createTime": "2025-05-15T13:00:00Z",
    "updateTime": "2025-05-15T13:00:00Z"
  },
  "expireTime": "2025-06-15T13:00:00Z",
  "joinOrganization": {
    "email": "[email protected]",
    "role": {
      "id": "role_51jav4KK",
      "uniqueId": "admin",
      "displayName": "Admin",
      "type": "MEMBER",
      "description": "Can manage members of the organization",
      "seatPolicy": "DEFAULT",
      "permissionSets": [
        "billing.readonly",
        "members.readwrite"
      ],
      "default": false,
      "archived": false,
      "view": "BASIC",
      "createTime": "2025-05-15T13:00:00Z",
      "updateTime": "2025-05-15T13:00:00Z"
    }
  },
  "view": "FULL",
  "createTime": "2025-05-15T13:00:00Z",
  "updateTime": "2025-05-15T13:00:00Z"
}
PreviousSend a join organization invitation
NextSend a signup invitation

Build software thatmonetizes
$

Subscribe to monthly product updates

© 2025 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth