Partner API base path is /api/v1 on https://api.dcast.pro. This site documents the live surface; use the Quickstart QA curls to validate keys and routes.

Test mode (pk_test_* keys)

The API recognises a key that starts with pk_test_ as a test key and says so on every response. That is all test mode does today: a test key reaches the same data, the same workers and the same Stripe account as a live key.

Current state. Keys created in the dashboard or with POST /me/api-keys are always pk_ followed by 40 hex characters; there is no way to create a pk_test_ key yourself. Under any key, POST /checkout/* uses the platform's Stripe account, which is live in production — a checkout completed there is a real charge. Do not use real cards when testing checkout.

Key format and mode

KeyMode reportedWhere it comes from
pk_<40 hex>liveEvery key you create (dashboard, POST /me/api-keys).
pk_test_<hex>testNot issued to accounts today.

Detecting mode on a response

Every authenticated response carries:

Dcast-Key-Mode: live   (or)   Dcast-Key-Mode: test

And GET /me returns the same value in data.mode:

{
  "success": true,
  "data": {
    "keyId":   "...",
    "keyName": "my-key",
    "mode":    "live",
    ...
  }
}

What a test key changes today

AspectBehaviour under a pk_test_ key
Authentication, scopes, rate limitsSame as a live key.
Idempotency-KeyHonoured; the cache is per key, so it never collides with another key.
Stripe checkout (POST /checkout/*)Same platform Stripe account as a live key — live in production.
Uploads, streams, restreams, roomsSame routes, same data, same workers as a live key.
WebhooksSame delivery. The envelope livemode field comes from the server environment, not from the key, so production deliveries say livemode: true.

Recommended practice

  1. Use a separate DCAST account for development and CI, with its own keys, videos and webhook endpoints.
  2. Register a different webhook URL for that account so test events never reach your production receiver.
  3. Read data.mode from GET /me (or the Dcast-Key-Mode header) in your health check if you want to assert which key an environment is using.

Not implemented

Issuing pk_test_ keys to accounts, Stripe test mode under test keys, a sandbox for uploads and streams, and livemode tied to the key are not implemented. See Roadmap.

Test mode (pk_test_* keys) — dcast.pro API docs