POST/user/v1/flows:createJoinOrganization

Send a join organization invitation

Creates a join organization flow. This invites a person to join an organization.

body parameters

  • organizationId

    string

    Required

    The identifier of the organization.

  • userId

    string

    The identifier of the user.

    This is required if email is not specified.

  • email

    string

    The email address of the person to invite.

    This is required if user is not specified or the user does not have an email address.

  • displayName

    string

    The display name of the person to invite.

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

    The target organization for the flow.

  • user

    User

    The target user for the flow.

  • creator

    User

    The user who created the flow.

  • joinOrganization

    JoinOrganizationFlow

    The join organization flow type specific data.

  • signup

    SignupFlow

    The signup flow type specific data.

  • expireTime

    date-time

    The time the flow will expire.

  • createTime

    date-time

    The creation time of the flow.

curl https://api.userhub.com/user/v1/flows:createJoinOrganization \
  -H "UserHub-Api-Key: $USERHUB_USER_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  --json '{
    "organizationId": "org_28seyVGVL1got6",
    "email": "[email protected]"
  }'
Response bodyJSON
{
  "id": "flow_3on5rHNG5aMGao",
  "state": "START_PENDING",
  "type": "JOIN_ORGANIZATION",
  "organization": {
    "id": "org_28seyVGVL1got6",
    "displayName": "Acme Inc",
    "email": "[email protected]",
    "emailVerified": true,
    "imageUrl": "https://example.com/acme.jpg",
    "memberCount": 0
  },
  "user": null,
  "creator": {
    "id": "usr_EHTXpuz9rs8TCU",
    "displayName": "Jane Doe",
    "email": "[email protected]",
    "emailVerified": true,
    "imageUrl": "https://example.com/jane.jpg"
  },
  "joinOrganization": {
    "email": "[email protected]",
    "role": null
  },
  "expireTime": "2024-12-15T13:00:00Z",
  "createTime": "2024-11-15T13:00:00Z"
}
PreviousList flows
NextSend a signup invitation

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

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