Skip to content

API reference

Accept an invitation

Other routes API

POST/v1/session/invitations/{id}/accept

Makes the signed-in person a member of the inviting workspace with the invitation’s role and access, in one step. The invitation must be pending, unexpired and to this person’s own address; the person who invited must still be able to give that access. Accepting again answers the same. Only a signed-in person. An API key is refused with 401 session_required.

Path parameters

  • idstring (uuid)Required

Response

A 200 answer carries these fields.

  • workspacestring (uuid)Required

Status codes

Status Meaning
200 The person is a member of the workspace.
401 No usable credential was sent (invalid_credentials), or an API key was used (session_required).
403 The person who invited can no longer give this access (role_required). Nothing was written.
404 No pending, unexpired invitation to this login has this id (unknown_invitation). Nothing was written.
409 This login is already a member of the workspace (already_member). Its access is changed in Team. Nothing was written.
POST/v1/session/invitations/{id}/accept
Example
curl -X POST https://api.certinvo.com/v1/session/invitations/$INVITATION_ID/accept \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const invitationId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'

const response = await fetch(`https://api.certinvo.com/v1/session/invitations/${invitationId}/accept`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

invitation_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"

response = requests.post(
    f"https://api.certinvo.com/v1/session/invitations/{invitation_id}/accept",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
application/json
{
  "workspace": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"
}
Success response
POST
/v1/session/invitations/{id}/accept
Accept an invitation
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables1
›Headers2
›Body
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/session/invitations/{id}/accept" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close