Skip to Content
Members and roles

Invite a member

Permissionmembers:createRetriesIdempotency-Key requiredAuthentication
POST
/members

Creates a one-time invitation. Omitting role_id assigns the built-in viewer role. Reissuing an invitation revokes prior active invitations for the same email. The selected role cannot grant permissions the caller does not possess.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body
email*string
Formatemail
Lengthlength <= 320
role_id?string
Formatuuid

Response Body

Invitation metadata plus its one-time invite URL and best-effort email delivery status.

application/json
  1. response
invitation_id*string
Formatuuid
user_id*string
Formatuuid
email*string
Formatemail
role_id*string
Formatuuid
role*string
Length1 <= length
invited_by_user_id*|
Formatuuid
invited_by_email*|
Formatemail
status*string
Value in"pending""expired""accepted""revoked"
version*integer
Formatint64
Range1 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
expires_at*string
Formatdate-time
accepted_at*|
Formatdate-time
revoked_at*|
Formatdate-time
invite_url*string
Length1 <= length
email_sent*boolean
email_error*string|null
Example Request
curl -X POST 'https://api.kejue.co/v1/members' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
{  "invitation_id": "a6e6785a-3ea9-406c-b873-17eaf2ed5fc9",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",  "email": "user@example.com",  "role_id": "ac4e70c8-d5be-48af-93eb-760f58fc91a9",  "role": "string",  "invited_by_user_id": "14555a01-60ac-4fbb-b4da-2c40f2467b11",  "invited_by_email": "user@example.com",  "status": "pending",  "version": 1,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "accepted_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "invite_url": "string",  "email_sent": true,  "email_error": "string"}