Skip to navigation

Revoke Trading Permissions

View as Markdown

Revoke multiple trading permissions in a single request.

Available to: Organization administrators

Environments: Demo, Live

Rate Limit: No endpoint-specific limit

Revoke up to 1,024 trading permissions in one request by listing their IDs in the tradingPermissionIds array, instead of sending a separate request for each permission. This is useful for vendors revoking permissions in bulk.

Response Behavior

The response is a SimpleResponse: an ok boolean, plus an errorText string when any ID is skipped. All three cases return HTTP 200:

RequestResponse
Every ID matches a trading permission{"ok": true}
Some IDs don’t matchThe IDs that match are still revoked. {"ok": false, "errorText": "Revoked 1 of 2. Trading permission is missing: 900000001"}
No IDs match{"ok": false, "errorText": "Revoked 0 of 2. Trading permission is missing: 900000001, 900000002"}

An ok of false can be a partial success: every ID that matches a trading permission is revoked, and errorText lists only the IDs that don’t. The “N of M” count reflects the distinct IDs that resolved to a permission (already-revoked ones included), and a repeated unknown ID appears once. An ID counts as unknown when it doesn’t match a trading permission you’re allowed to see, so the response never reveals whether that ID exists. Revoking an already-revoked permission is a no-op, so resending the same list is safe.

Because an unknown ID still returns an HTTP 200, check the response’s ok field rather than the status code to confirm every ID was revoked. When ok is false, read errorText for the IDs that were skipped.

Error Messages

MessageResponseTrigger
"Revoked N of M. Trading permission is missing: <ids>"200 (in errorText)One or more IDs don’t match a trading permission you can revoke
"Empty tradingPermissionIds"200 (in errorText)The tradingPermissionIds array is empty
"Only 1024 trading permissions are allowed in single operation"200 (in errorText)The request includes more than 1,024 IDs
"mustBeOrganizationAdmin"401The caller is not an organization administrator

Related Endpoints

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
tradingPermissionIdslist of longsRequired

Response

SimpleResponse
okboolean
errorTextstringOptional<=8192 characters

Non-empty if the request failed