CapyDB Docs
ReferenceAPI

Organizations

Organization profile and billing metadata.

GET
/v1/organizations/{orgID}

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/organizations/string"
{  "organization": {    "billing_customer_id": "string",    "billing_email": "string",    "billing_name": "string",    "billing_period_end": "2019-08-24T14:15:22Z",    "billing_plan": "string",    "billing_product_id": "string",    "billing_provider": "string",    "billing_status": "string",    "billing_subscription_id": "string",    "clerk_organization_id": "string",    "clerk_organization_slug": "string",    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "name": "string",    "slug": "string",    "suspended_at": "2019-08-24T14:15:22Z",    "suspended_reason": "string",    "updated_at": "2019-08-24T14:15:22Z",    "vercel_installation_id": "string"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
PATCH
/v1/organizations/{orgID}

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/organizations/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "organization": {    "billing_customer_id": "string",    "billing_email": "string",    "billing_name": "string",    "billing_period_end": "2019-08-24T14:15:22Z",    "billing_plan": "string",    "billing_product_id": "string",    "billing_provider": "string",    "billing_status": "string",    "billing_subscription_id": "string",    "clerk_organization_id": "string",    "clerk_organization_slug": "string",    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "name": "string",    "slug": "string",    "suspended_at": "2019-08-24T14:15:22Z",    "suspended_reason": "string",    "updated_at": "2019-08-24T14:15:22Z",    "vercel_installation_id": "string"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/v1/organizations/{orgID}/usage

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/organizations/string/usage"
{  "usage": {    "totals": {      "storage_bytes": 0,      "storage_limit_bytes": 0,      "connections": 0,      "projects": 0,      "projects_limit": 0,      "previews": 0,      "previews_limit": 0,      "backups_storage_bytes": 0,      "job_success_rate_7d": 0,      "webhook_delivery_rate_7d": 0    },    "projects": [      {        "project_id": "string",        "name": "string",        "state": "string",        "storage_bytes": 0,        "storage_limit_bytes": 0,        "connections": 0      }    ],    "storage_history": [      {        "sampled_at": "2019-08-24T14:15:22Z",        "storage_bytes": 0      }    ]  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}