PlandalfDocsSign inStart free trial

API and webhooks

Organization

One endpoint that tells you who a key belongs to. Call it to check a new key, to see whether it's a test or live key, and to get two values you need elsewhere: the key's ID for signing buyer tokens, and your SDK script URL.

Example

curl https://admin.plandalf.dev/api/v1/organization \
  -H "Authorization: Bearer $PLANDALF_API_KEY"
{
  "id": 12,
  "name": "Summit Studio",
  "ulid": "01KF0ZR7J3N4Q8T2V6X9Y5B1CD",
  "default_currency": "usd",
  "api_key": { "id": "l0BrqEpKzYI", "mode": "test" },
  "sdk_url": "https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"
}

Endpoint

Retrieve the organization

GET /api/v1/organization

The organization the API key or OAuth token belongs to. Use it to check a key works, to learn whether it is a live or test key, and to find the URL of the organization's browser SDK. api_key.id is the kid header for customer identity JWTs signed with this key; api_key.mode is the event mode its webhook endpoints receive. api_key is null for OAuth tokens that aren't tied to a key.

curl https://admin.plandalf.dev/api/v1/organization \
  -H "Authorization: Bearer $PLANDALF_API_KEY"

Response

{
  "id": 0,
  "name": "string",
  "ulid": "string",
  "default_currency": "string",
  "api_key": {
    "id": "string",
    "mode": "test"
  },
  "sdk_url": "string"
}

Errors

StatusWhen
401The API key or OAuth token is missing or invalid.