End User Accounts

Create EIP-7702 delegation for end user EVM account

Creates an EIP-7702 delegation for an end user's EVM EOA account, upgrading it with smart account capabilities.

This endpoint:

  • Retrieves delegation artifacts from onchain
  • Signs the EIP-7702 authorization for delegation
  • Assembles and submits a Type 4 transaction
  • Creates an associated smart account object

The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.

post/v2/embedded-wallet-api/end-users/{userId}/evm/eip7702/delegation

Request

  • Base URL: https://api.cdp.coinbase.com/platform
  • URL: https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/evm/eip7702/delegation
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

userIdstring required
Example:e051beeb-7163-4527-a5b6-35e301529ff2

The ID of the end user.

Query parameters

projectIDstring
Example:8e03978e-40d5-43e8-bc93-6894a57f9324

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

Headers

X-Wallet-Authstring

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-Keystring

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.

X-Developer-Authstring

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.

Request body

addressstring required

The 0x-prefixed address of the EVM account to delegate.

network'base-sepolia' | 'base' | 'arbitrum' | 'optimism' | 'polygon' | 'ethereum' | 'ethereum-sepolia' required

The network for the EIP-7702 delegation.

enableSpendPermissionsboolean

Whether to configure spend permissions for the upgraded, delegated account. When enabled, the account can grant permissions for third parties to spend on its behalf.

walletSecretIdstring

Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.

Example request

{
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "network": "base",
  "enableSpendPermissions": true,
  "walletSecretId": "e051beeb-7163-4527-a5b6-35e301529ff2"
}

Response

Delegation operation created successfully.

delegationOperationIdstring uuid required

The unique identifier for the delegation operation. Use this to poll the operation status.

Example response

{
  "delegationOperationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Changes