Invitations

Invitations are the entities used to add new users to your organization. Users will receive an invitation (presently via email), which they must explicitly accept before they can access your organization.

Note that a side effect of creating an invitation is that an organization membership object is created in the “pending” state. Once you have invited a user, you may add them to teams and spaces immediately, without waiting for them to accept.

Note: These endpoints are in “alpha” state, which means that breaking changes might be introduced in the future

Create an invitation (alpha)

Create an invitation

Use this endpoint to invite someone to your organization.

Only organization admins and owners can access this endpoint.

Request Body

ParameterTypeUsage
emailstringrequired
firstNamestringoptional
lastNamestringoptional
rolestringoptional; one of member, developer, admin, owner

Response

1{
2 "sys": {
3 "id": "aasfdsgfesagrwg32ggs",
4 "type": "Invitation",
5 "status": "open",
6 "organizationMembership": {
7 "sys": {
8 "type": "Link",
9 "linkType": "OrganizationMembership",
10 "id": "65jhgf45jrt8j945j89gt"
11 }
12 },
13 "createdAt": "2019-01-15T08:03:16.007Z",
14 "updatedAt": "2019-01-15T08:03:16.007Z",
15 "createdBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "dsf4tgfd43gf4t3g4"
20 }
21 },
22 "user": null,
23 "invitationUrl": "https://be.contentful.com/invitations/aasfdsgfesagrwg32ggs?token=xyzpdq"
24 }
25}

Get a single invitation (alpha)

Get a single invitation

This endpoint returns details about an existing invitation. The user attribute will be null until the invitation has been accepted by a user.

Only organization admins and owners can access this endpoint.

Response

1{
2 "sys": {
3 "id": "aasfdsgfesagrwg32ggs",
4 "type": "Invitation",
5 "status": "open",
6 "organizationMembership": {
7 "sys": {
8 "type": "Link",
9 "linkType": "OrganizationMembership",
10 "id": "65jhgf45jrt8j945j89gt"
11 }
12 },
13 "createdAt": "2019-01-15T08:03:16.007Z",
14 "updatedAt": "2019-01-15T08:03:16.007Z",
15 "createdBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "dsf4tgfd43gf4t3g4"
20 }
21 },
22 "user": null,
23 "invitationUrl": ""
24 }
25}

Delete an invitation

At present, it is not possible to delete an invitation directly via API.

To remove an invitation, you can delete the organization membership associated with it. This action will delete all invitations associated with the organization membership.