Skip to content

Get an Organization

GET
/v1/organizations/{id}
curl --request GET \
--url https://app.caprid.com/v1/organizations/4 \
--header 'Authorization: Bearer <token>'
id
required
integer

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

Example

4

The Organization.

Media typeapplication/json

A customer of Switchboard. It owns its Namespaces, and the API keys, Nodes and enrollments that serve them. Its Members manage all of it.

object
id
required

Identifies the Organization in routes. It never changes.

integer
name
required

For display. Any Member can change it.

string
role

Your role in it. Absent for an API key, which has none.

string
Allowed values: owner member
created_at
required
integer
trial_expires_at

When a Trial Organization lapses, so its Agent knows how long it has to get a person to claim it. Absent for every other Organization.

integer

Example

{
"id": 4,
"name": "Acme",
"role": "owner",
"trial_expires_at": 1760604800
}

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"

Sent with an API key limited to some Namespaces, to a Namespace outside its limit, or to a route that acts on the Organization as a whole. A limited key can never create API keys.

Media typeapplication/json
object
error
required
string

Example

{
"error": "this API key is limited to the Namespaces acme-staging, and acme isn't one of them"
}

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"
}