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

AuthorizationBearer <token>

An OpenID Connect access token issued by Keycloak, acting as the signed-in user.

In: header

Path Parameters

workspaceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

email*string

Address to invite.

Formatemail
Lengthlength <= 255
role*|

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

Response Body

application/json

curl -X POST "https://api-next.centralcsp.com/v1/workspaces/string/invitations" \  -H "Content-Type: application/json" \  -d '{    "email": "sam@example.com",    "role": "admin"  }'
{  "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"}