Management APIs

Orgs

Reference for the Orgs operations of the Spice Cloud Management API: list the caller's organizations.

OpenAPIapi.spice.ai/openapi.json

List the caller's organizations

GET/v1/orgs

Returns every organization the authenticated caller belongs to, each with the caller's effective membership role. A caller with no memberships gets an empty array, not a 404 — clients read 404 as "this deployment does not serve the endpoint", which is a different state. name is the organization handle used in <org>/<app> addressing.

Header parameters

NameTypeRequiredDescription
AuthorizationstringYes

Bearer <token>. Authentication lists the tokens it accepts.

X-Org-NamestringNo

Optional for every credential, a portal session token included: this listing is how a session finds the organizations it can name elsewhere. When sent, it is authorized as on any other route, so a handle the caller does not belong to is org_forbidden.

  • Pattern: ^[A-Za-z0-9._-]{1,255}$

Example request

curl "https://api.spice.ai/v1/orgs" \
  -H "Authorization: Bearer <token>"

Responses

  • 200OK

    The organizations the caller is a member of, possibly empty

    application/json

    • orgsarray of objectRequired

      3 properties
      • idintegerRequired

      • namestringRequired

      • rolestringRequired

        The caller's highest-privilege role in the organization.

        • Allowed values: owner, admin, member, viewer
  • 400Bad Request

    X-Org-Name is not a valid organization handle (invalid_org_assertion)

  • 401Unauthorized

    Unauthorized

  • 403Forbidden

    Insufficient scope (insufficient_scope), or X-Org-Name names an organization the caller cannot act for (org_forbidden, org_assertion_mismatch, org_deleted)

  • 500Internal Server Error

    Internal server error