Skip to main content
GET
/
organizations
List organizations
curl --request GET \
  --url https://api.planetscale.com/v1/organizations \
  --header 'Authorization: Bearer <token>'
{
  "type": "<string>",
  "current_page": 123,
  "next_page": 123,
  "next_page_url": "<string>",
  "prev_page": 123,
  "prev_page_url": "<string>",
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "billing_email": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "plan": "<string>",
      "valid_billing_info": true,
      "sso": true,
      "sso_directory": true,
      "single_tenancy": true,
      "managed_tenancy": true,
      "database_count": 123,
      "features": {},
      "idp_managed_roles": true,
      "invoice_budget_amount": "<string>",
      "keyspace_shard_limit": 123,
      "has_card": true,
      "payment_info_required": true,
      "has_past_due_invoices": true,
      "sso_portal_url": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

page
integer
default:1

If provided, specifies the page offset of returned results

per_page
integer
default:25

If provided, specifies the number of returned results

Response

Gets the organizations for the current user

type
string
required

The response type. Always "list" for paginated responses.

current_page
integer
required

The current page number

next_page
integer | null
required

The next page number, or null when this is the last page

next_page_url
string | null
required

The next page of results, or null when this is the last page

prev_page
integer | null
required

The previous page number, or null when this is the first page

prev_page_url
string | null
required

The previous page of results, or null when this is the first page

data
object[]
required