List an Organization's pending Invitations
const url = 'https://app.caprid.com/v1/organizations/4/invitations';const options = { method: 'GET', headers: {cookie: '__Host-switchboard_session=<__Host-switchboard_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The Organization’s id, from GET /v1/organizations.
Example
4Responses
Section titled “Responses”The pending Invitations.
An offer of membership in an Organization to one email address.
object
Identifies the Invitation in routes. Not a secret.
The Organization’s name, for someone who isn’t in it yet.
Who may accept it. Stored lowercased.
The role they’ll have once they accept.
When the link stops working, 7 days after it was created.
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.
object
Example
{ "error": "the requested grants exceed the key's scope"}Headers
Section titled “Headers”Example
Bearer realm="switchboard"You aren’t an Owner of this Organization, or you sent an API key.
object
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.
object
Example
{ "error": "the requested grants exceed the key's scope"}