Accounts

Update account policy

Changed on

Applies an account-scoped policy to an account. An account can have at most one policy at a time, so applying a policy replaces any policy already applied to the account. One policy can be applied to many accounts. To remove the account's policy, use deleteAccountPolicy.

put/v2/accounts/{accountId}/policy

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

accountId, string required

The ID of the Account, which is a UUID prefixed by the string account_.

Example:account_af2937b0-9846-4fe7-bfe9-ccc22d935114

The ID of the account whose policy to update.

Headers

X-Idempotency-Key, string

An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.

Request body

UpdateAccountPolicyRequest required

The request body to apply a policy to an account.

accountPolicyId, string required

The ID of an account-scoped policy.

Example request

{
  "accountPolicyId": "123e4567-e89b-12d3-a456-426614174000"
}

Response

Successfully updated account policy.

AccountPolicy required

The policy applied to an account.

accountId, string required

The ID of the Account, which is a UUID prefixed by the string account_.

accountPolicyId, string required

The ID of an account-scoped policy.

Example response

{
  "accountId": "account_af2937b0-9846-4fe7-bfe9-ccc22d935114",
  "accountPolicyId": "123e4567-e89b-12d3-a456-426614174000"
}

Changes