Invite a user to a client

POST /v0/labs/client/{client_id}/invite

Invite a user to join one of your lab's clients. An email is sent to the address with a link to create an account.

The client must already be associated with your lab, otherwise the request returns not_found. Available organization roles are owner, admin, user and viewer.

Invites are rate limited; sending too many in quick succession returns HTTP 429.

Path parameters

client_id integer required

Body parameters (application/x-www-form-urlencoded)

email string (email) required

Email address of the user to invite.

role string required

Organization role to grant: owner, admin, user or viewer.

Allowed: admin, viewer, owner, user

Try it

Log in to send test requests to this endpoint straight from the docs.

Responses

200 Success
invite object
Show 3 child attributes Hide 3 child attributes
id integer

Invite ID

email string

User Email

role string

User Role

400 Bad request

The request was malformed or failed validation. Validation failures include per-field messages in error_details.

Possible error_code values: invalid_request, request_too_old.

401 Unauthorized

Authentication failed.

Possible error_code values: missing_api_key, invalid_api_key, invalid_credentials_type, api_access_restricted, api_access_denied, missing_signature, missing_timestamp, invalid_timestamp, invalid_signature.

403 Permission denied

The API key is valid but does not have permission for this endpoint (for example, a client key calling a labs endpoint).

Possible error_code values: permission_denied.

404 Not found

The requested record does not exist or is not visible to this organization.

Possible error_code values: not_found.

How to sign requests
# X-ConfidentLims-Signature: see the Request Signing guide - https://api.confidentcannabis.com/v0/docs/request-signing.md
curl -X POST 'https://api.confidentcannabis.com/v0/labs/client/{client_id}/invite' \
  -H 'X-ConfidentLims-APIKey: YOUR_API_KEY' \
  -H 'X-ConfidentLims-Timestamp: UNIX_TIMESTAMP' \
  -H 'X-ConfidentLims-Signature: REQUEST_SIGNATURE' \
  --data-urlencode 'email=sam@sunrisecultivation.com' \
  --data-urlencode 'role=admin'
Response · 200
{
  "success": true,
  "invite": {
    "id": 8123,
    "email": "sam@sunrisecultivation.com",
    "role": "admin"
  }
}