POST
/user/v1/flows:createSignup
Send a signup invitation
Creates a signup flow.
This invites a person to join the app.
body parameters
The email address of the person to invite.
The display name of the person to invite.
createOrganization
boolean
Whether to create an organization as part of the signup flow.
Returns
The system-assigned identifier of the flow.
The current state of the flow.
Possible values:START_PENDING
STARTED
COMPLETED
CANCELED
EXPIRED
The code that best describes the reason for the state.
Possible values:JOIN_ORGANIZATION
SIGNUP
The target organization for the flow.
The system-assigned identifier of the organization.
The client defined unique identifier of the organization account.
The human-readable display name of the organization.
The email address of the organization.
Whether the organization's email address has been verified.
The photo/avatar URL of the organization.
The number of members in the organization.
This includes disabled users, but does not include user's marked for deletion.
Whether the organization is disabled.
The target user for the flow.
The system-assigned identifier of the user.
The client defined unique identifier of the user account.
The human-readable display name of the user.
The email address of the user.
Whether the user's email address has been verified.
The photo/avatar URL of the user.
Whether the user is disabled.
The user who created the flow.
The system-assigned identifier of the user.
The client defined unique identifier of the user account.
The human-readable display name of the user.
The email address of the user.
Whether the user's email address has been verified.
The photo/avatar URL of the user.
Whether the user is disabled.
joinOrganization
JoinOrganizationFlow
The join organization flow type specific data.
The display name of the invitee.
The email address of the invitee.
This is required if a user isn't provided or the user's email address is empty.
The role to be assigned to the invitee.
The system-assigned identifier of the role.
The client defined unique identifier of the role.
It is restricted to letters, numbers, underscores, and hyphens, with the first character a letter or a number, and a 255 character maximum.
ID's starting with role_
are reserved.
The human-readable display name of the role.
Possible values:OWNER
MEMBER
GUEST
The description of the role.
The maximum length is 1000 characters.
The additional permissions allowed by the role.
Whether the role is the default for the tenant.
The signup flow type specific data.
The email address of the invitee.
The display name of the invitee.
createOrganization
boolean
Whether to create an organization as part of the signup flow.
The time the flow will expire.
The creation time of the flow.
The general error code (e.g. INVALID_ARGUMENT
).
Possible values:OK
CANCELLED
UNKNOWN
INVALID_ARGUMENT
DEADLINE_EXCEEDED
NOT_FOUND
ALREADY_EXISTS
PERMISSION_DENIED
UNAUTHENTICATED
RESOURCE_EXHAUSTED
FAILED_PRECONDITION
ABORTED
OUT_OF_RANGE
UNIMPLEMENTED
INTERNAL
UNAVAILABLE
DATA_LOSS
A developer-facing error message.
A reason code for the error (e.g. USER_PENDING_DELETION
).
The parameter path related to the error (e.g. member.userId
).
Additional metadata related to the error.
A user-facing error message.
curl https://api.userhub.com/user/v1/flows:createSignup \
-H "UserHub-Api-Key: $USERHUB_USER_KEY" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
--json '{
"email": "[email protected]"
}'
res, err := userApi.Flows().CreateSignup(
context.Background(),
&userapi.FlowCreateSignupInput{
Email: "[email protected]",
},
)
Response bodyJSON
{
"id": "flow_2VSCZXUfZVeRY3",
"state": "START_PENDING",
"type": "SIGNUP",
"organization": null,
"user": null,
"creator": {
"id": "usr_EHTXpuz9rs8TCU",
"displayName": "Jane Doe",
"email": "[email protected]",
"emailVerified": true,
"imageUrl": "https://example.com/jane.jpg"
},
"signup": {
"email": "[email protected]"
},
"expireTime": "2024-12-15T13:00:00Z",
"createTime": "2024-11-15T13:00:00Z"
}