Bind API key to sandbox organisation
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
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
sandboxes:update
Path parameters
apiKey Id stringrequiredThe
idof the API key, as the dashboard shows it under Account > Developer APIs.Example:
"6af0a1b2c3d4e5f6a7b8c9d0"
Body
The sandbox organisation to bind the key to.
sandboxOrg Id stringrequiredRequired. The
idof the sandbox organisation, from List sandbox organisations. An empty string binds the key to the main organisation. A request without the member gets400, so that a mistake never moves a key to the main organisation.Example:
"6af08b7a38e8f33dcf799655"
Response
The API key after the change, with its new value.
apiKey objectThe API key after the change.