CentralCSP
APIInvitations

Create an invitation

Invites an email address to the workspace and sends it a link. Inviting someone as an admin is reserved for the owner. Invitations count against the plan's member limit, and an address with a pending invitation cannot be invited twice.

Requires the admin role on the workspace.

POST
/v1/workspaces/{workspaceId}/invitations

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

Request Body

application/json
  1. body
email*string

Address to invite.

Formatemail
Lengthlength <= 255
role*MemberRole

member is a regular collaborator. admin can also administer the workspace, its members, and its websites.

Value in"admin""member"

Response Body

An invitation to join a workspace.

application/json
  1. response
id*string

Unique identifier of the invitation.

workspaceId*string

The workspace's id.

email*string

Address the invitation was sent to.

Formatemail
role*MemberRole

member is a regular collaborator. admin can also administer the workspace, its members, and its websites.

Value in"admin""member"
acceptedAt*|

When it was accepted, or null while it is still pending.

expiresAt*|

After this time the link no longer works.

createdAt*string

When the invitation was sent.

Formatdate-time
updatedAt*string

When the invitation last changed.

Formatdate-time
Example Request
curl -X POST 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/invitations' \  -H 'Content-Type: application/json' \  -d '{  "email": "sam@example.com",  "role": "admin"}'
Example Response
{  "id": "string",  "workspaceId": "string",  "email": "sam@example.com",  "role": "admin",  "acceptedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}