Skip to content

Credits

Top up credits

POST/v1/workspaces/{workspaceId}/credits/top-up

Buy credits through the provider's hosted checkout. Paid credits never expire and arrive once the provider confirms the payment (GET /v1/workspaces/{workspaceId}/credits). It fails with 409 billing_off when billing isn't configured, 409 top_ups_unconfigured while top-ups aren't set up on this deployment, and 409 free_workspace when staff made the workspace free. Only the workspace owner can do this, and only from the app. See Owner-only and app-only.

Path parameters

  • workspaceIdstringrequired

    The workspace's id. An API key can only use its own workspace.

Body

JSON, with Content-Type: application/json.

  • amountUsdintegerrequired

    How many dollars of credits to buy, in whole dollars from 10 to 1000.

    10–1000

Response

  • urlstringrequired

    The provider's hosted checkout.

Errors answer with a status and the error shape.