Skip to Content
kosemdocs
ReferenceAPIInvitations

Accept invitation

Accepts an invitation. Only the invitee can: the caller's verified email must be the invited address.

POST
/v1/organizations/{organization}/invitations/{invitation}/accept

Accepts an invitation. Only the invitee can: the caller's verified email must be the invited address.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$
invitation*string

The invitation's ID.

Match^inv_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
acceptor*string

Who accepted the invitation, users/{user_id}; empty until accepted.

createTime*string

When the invitation was created.

Formatdate-time
email*string

The invited email address.

expireTime*string

When the invitation expires unless accepted.

Formatdate-time
grants*array<>

Roles the invitee receives on accepting.

inviter*string

Who sent the invitation, users/{user_id}.

kind*string

How the invitee will belong to the organization: a MEMBER sees its directory and is included in grants to all members; a GUEST sees only what they are granted.

Value in"MEMBER""GUEST"
name*string

Resource name, organizations/{organization_id}/invitations/{invitation_id}.

state*string

Lifecycle state: PENDING, waiting for the invitee; ACCEPTED, the invitee joined; REVOKED before it was accepted; EXPIRED, not accepted in time, as invitations last 7 days.

Value in"PENDING""ACCEPTED""REVOKED""EXPIRED"
updateTime*string

When the invitation last changed.

Formatdate-time
Example Request
curl -X POST 'https://api.kosem.ai/v1/organizations/string/invitations/string/accept'
Example Response
{
  "acceptor": "string",
  "createTime": "2019-08-24T14:15:22Z",
  "email": "string",
  "expireTime": "2019-08-24T14:15:22Z",
  "grants": [
    {
      "resource": "string",
      "role": "string"
    }
  ],
  "inviter": "string",
  "kind": "MEMBER",
  "name": "string",
  "state": "PENDING",
  "updateTime": "2019-08-24T14:15:22Z"
}