Skip to main content
POST
/
v2
/
embedded-wallet-api
/
end-users
/
{userId}
/
address
/
{address}
/
delegation
Create account-scoped delegation for end user
curl --request POST \
  --url https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/address/{address}/delegation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Wallet-Auth: <x-wallet-auth>' \
  --data '
{
  "expiresAt": "2026-02-03T10:35:00Z",
  "walletSecretId": "e051beeb-7163-4527-a5b6-35e301529ff2"
}
'
{
  "expiresAt": "2026-02-03T10:35:00Z"
}

Authorizations

Authorization
string
header
required

A JWT signed using the developer's own JWT private key (in the case of JWT authentication), or an end user JWT signed by CDP, encoded in base64. This is used for End User Account APIs.

Headers

X-Wallet-Auth
string
required

A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.

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.

Required string length: 1 - 128

Path Parameters

userId
string
required

The ID of the end user.

Pattern: ^[a-zA-Z0-9-]{1,100}$
Example:

"e051beeb-7163-4527-a5b6-35e301529ff2"

address
string
required

The blockchain address of the end user account to scope this delegation to. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana). For EVM addresses, matching is case-insensitive. A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).

Required string length: 1 - 128
Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

Query Parameters

projectID
string

The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Body

application/json
expiresAt
string<date-time>
required

The date until which the delegation is valid.

Example:

"2026-02-03T10:35:00Z"

walletSecretId
string
required

The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.

Pattern: ^[a-zA-Z0-9-]{1,100}$
Example:

"e051beeb-7163-4527-a5b6-35e301529ff2"

Response

Delegation created successfully.

expiresAt
string<date-time>
required

The date until which the delegation is valid.

Example:

"2026-02-03T10:35:00Z"