Skip to main content
Sandboxes

Bind API key to sandbox organisation

PUT/v4/config/platform/admin/apikey/{apiKeyId}/sandbox-org

Binds an existing API key of the organisation to a sandbox organisation, or back to the main organisation. Every later call with the key then runs in that sandbox organisation (or in the main organisation). The normal way to get a key for a sandbox organisation is to select the sandbox organisation in the dashboard and create the key there (Account > Developer APIs); use this operation to move a key that you already have.

The service gives the key a new value: the old value stops working immediately, and the response holds the new value in apiKey.apiKey. This is the only time that you can read it, so store it now. The key keeps its id, name, scopes and IP allow-list, and its expiry starts again: expiryTimestamp is now plus expiryInDays days. If you move the key that makes this call, use the new value for the next call.

The sandbox organisation must belong to the organisation and its wallet must be deployed.

Authorizations

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:sandboxes:update

Path parameters

  • apiKeyIdstringrequired

    The id of the API key, as the dashboard shows it under Account > Developer APIs.

    Example:"6af0a1b2c3d4e5f6a7b8c9d0"

Body

application/json

The sandbox organisation to bind the key to.

  • sandboxOrgIdstringrequired

    Required. The id of the sandbox organisation, from List sandbox organisations. An empty string binds the key to the main organisation. A request without the member gets 400, so that a mistake never moves a key to the main organisation.

    Example:"6af08b7a38e8f33dcf799655"

Response

application/json

The API key after the change, with its new value.

  • apiKeyobject

    The API key after the change.