Skip to content

List an Organization's pending Invitations

GET
/v1/organizations/{id}/invitations
curl --request GET \
--url https://app.caprid.com/v1/organizations/4/invitations \
--cookie __Host-switchboard_session=<__Host-switchboard_session>

Invitations that are still pending, oldest first. A pending Invitation hasn’t been accepted, revoked or expired. Their links aren’t listed, because a link’s secret is shown only once, when you create the Invitation.

Owners only, signed in with a session.

id
required
integer

The Organization’s id, from GET /v1/organizations.

Example

4

The pending Invitations.

Media typeapplication/json
Array<object>

An offer of membership in an Organization to one email address.

object
id
required

Identifies the Invitation in routes. Not a secret.

string
organization_id
required
integer
organization_name

The Organization’s name, for someone who isn’t in it yet.

string
email
required

Who may accept it. Stored lowercased.

string
role
required

The role they’ll have once they accept.

string
Allowed values: owner member
created_at
required
integer
expires_at
required

When the link stops working, 7 days after it was created.

integer

Example

[
{
"id": "3f9c1a2b7d4e",
"organization_id": 4,
"organization_name": "Acme",
"email": "alice@acme.example",
"role": "owner",
"created_at": 1790294400,
"expires_at": 1790899200
}
]

No valid credential. Missing, expired and revoked credentials all get the same response, and so does an API key whose trial has lapsed. An Agent token from before a claim gets a 401 too, once the claim has made the trial a person’s, with a message saying to get a new token.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}
WWW-Authenticate
string
Example
Bearer realm="switchboard"

You aren’t an Owner of this Organization, or you sent an API key.

Media typeapplication/json
object
error
required
string

Example

{
"error": "only an Owner can manage this Organization's Invitations"
}

No such thing, or not yours. Another customer’s Organization or Namespace is a 404 too, so nobody can tell which ones exist.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}