Skip to main content
POST
/
policies
/
{id}
/
attach
Attach policy to a wallet
curl --request POST \
  --url https://api.platform.dakota.xyz/policies/{id}/attach \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "signatures": [
    "LS0tLS1CRUdJ...0tLS0tCg=="
  ],
  "intent": {
    "wallet_id": "<string>",
    "caip2": "<string>",
    "sponsor": true,
    "operation": {
      "kind": "<string>",
      "from": "<string>",
      "to": "<string>",
      "asset": {
        "id": "USDC",
        "name": "USD Coin",
        "network_id": "ethereum-mainnet",
        "contract_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "token_standard": "erc20",
        "decimals": 6
      },
      "amount": "<string>",
      "method": "<string>",
      "args": [
        "<string>"
      ],
      "data": "<string>"
    },
    "idempotency_key": "<string>"
  }
}
'
{
  "code": "invalid_request",
  "message": "The request was invalid. Please check your input and try again.",
  "details": {
    "field": "amount",
    "issue": "must be greater than 0"
  }
}

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again.

Path Parameters

id
string
required

Unique identifier of the policy

Body

application/json
signatures
string[]
required

List of signatures over the intent

Cryptographic signature of the endorsement base64 encoded

intent
object
required

The intent being endorsed

Response

Policy attached to wallet successfully