List the Invitations to your email
const url = 'https://app.caprid.com/v1/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/invitations \ --cookie __Host-switchboard_session=<__Host-switchboard_session>Only with WorkOS login, which has verified your email. Lists the pending Invitations to it, from every Organization, so you can accept one without its link. The dashboard shows them when you sign up.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The pending Invitations to your email.
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": "member", "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"Sent with an API key, or with a session whose email WorkOS hasn’t verified.
object
Example
{ "error": "the requested grants exceed the key's scope"}This server doesn’t use WorkOS login.
object
Example
{ "error": "the requested grants exceed the key's scope"}