Invite a new member
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Sends an invitation email to the given address. Invitation emails are capped per day for each organization, and the cap counts both new and resent invitations. Past the cap the API answers 429 RATE_LIMIT_EXCEEDED, and the X-RateLimit-Reset header tells how many seconds are left before new invitations can be sent.
Body parameters
Must be exactly "organization_invitation".
"mark.smith@example.com"
Role
Returns
Returns a resource object of type organization_invitation.
Examples
POST https://site-api.datocms.com/organization-invitations HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "organization_invitation", "attributes": { "email": "mark.smith@example.com" }, "relationships": { "role": { "data": { "type": "organization_role", "id": "312" } } } }}curl -g 'https://site-api.datocms.com/organization-invitations' \ -X POST \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"organization_invitation","attributes":{"email":"mark.smith@example.com"},"relationships":{"role":{"data":{"type":"organization_role","id":"312"}}}}}'await fetch("https://site-api.datocms.com/organization-invitations", { method: "POST", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "organization_invitation", attributes: { email: "mark.smith@example.com" }, relationships: { role: { data: { type: "organization_role", id: "312" } }, }, }, }),});HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "organization_invitation", "id": "312", "attributes": { "email": "mark.smith@example.com" }, "relationships": { "role": { "data": { "type": "organization_role", "id": "312" } } }, "meta": { "expired": false } }}