Coinbase Policy Engine API

The Policy Engine APIs evaluate policies (a set of rules) to govern the behavior of accounts or projects, such as enforce allowlists and denylists. - A **policy** is a collection of `rules` with defined criteria. - Each **rule** contains a specified `action`, `operation`, and `criteria`: - An `action` can either `accept` or `reject` a transaction if the criteria in the rule are met. - `criteria` is an array of logical expressions. All parameters must evaluate to true for the action to be applied. - An `operation` corresponds to a CDP v2 API: - `signEvmTransaction` or `signSolTransaction` for signing transactions (to set a transaction limit). - `sendEvmTransaction` for signing a transaction, and sending it to a supported network. - `signEvmHash` for signing an arbitrary 32 byte hash. - `signEvmMessage` for signing an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message. - `prepareUserOperation` for preparing user operations on a smart account. - `sendUserOperation` for sending user operations using a smart account. - `signEndUserEvmTransaction` or `signEndUserSolTransaction` for signing end user transactions (to set a transaction limit). - `sendEndUserEvmTransaction` for signing an end user transaction, and sending it to a supported EVM network. - `sendEndUserSolTransaction` for signing an end user transaction, and sending it to a supported Solana network. - `signEndUserEvmMessage` for signing an end user [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message. - `signEndUserEvmTypedData` for signing end user [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data. - `signEndUserSolMessage` for signing an end user Solana message. - A **rule** indicates how an operation should behave, specifying whether a request with defined criteria should be accepted or rejected. ## Policy Scope Policies can be applied at the project and/or account level: - **Project-level policy**: A `project`-level policy applies to all accounts in a CDP Project. Only one project-level policy can be applied to accounts within a CDP Project at any given time. - **Account-level policy**: An `account`-level policy applies to one or more accounts. An account can have at most one account-level policy at any given time. Thus, a single account can be assigned at most two policies at any given time: one project-level policy and one account-level policy. **Note:** End user operation rules (e.g., `signEndUserEvmTransaction`, `sendEndUserSolTransaction`) currently only apply for policies with the `project` scope. Scope is specified in the `scope` field of a policy: ```json { "description": "Project-level policy", "scope": "account", ... ``` ## Policy Evaluation A rule *targets* an operation when its `operation` field equals the requested operation. A rule *matches* when it targets the operation and all of its criteria are met (logical **AND**). Reject-over-accept precedence does not depend on rule order. For matching rules with the same action, the first in policy order applies. **Project-level policies** are evaluated first, followed by **account-level policies**. Within a policy, any matching `reject` rule rejects the request. Otherwise, any matching `accept` rule accepts it. If no rule in the project-level policy matches, the account-level policy is evaluated the same way, if one exists. A decision in the project-level policy is final. A `reject` rule overrides an `accept` rule only within the same policy, so an account-level `reject` rule does not override a matching project-level `accept` rule. If neither policy makes a decision, the request is accepted when no rule in either policy targets the operation, and rejected when at least one rule targets it. For example, this project-level policy accepts `signEvmTransaction` requests up to 2000000000000000000 wei, but rejects any request to `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`. A request to that address for 1 ETH matches both rules and is rejected regardless of their order. ```json { "description": "Project-level policy", "scope": "project", "rules": [ { "action": "accept", "operation": "signEvmTransaction", "criteria": [ { "type": "ethValue", "ethValue": "2000000000000000000", "operator": "", }, ], }, { "action": "reject", "operation": "signEvmTransaction", "criteria": [ { "type": "netUSDChange", "changeCents": 10000, "operator": ">", }, ], }, ], } ``` ### Limiting USDC Spend This policy restricts USDC transactions on the Base network to transfers of 10,000 tokens or less. It applies to both signing and sending transactions to the USDC contract address, using the ERC20 ABI to validate that only `transfer` function calls with a `value` parameter under the specified limit are permitted. ```json { "description": "Limit USDC Spend", "scope": "account", "rules": [ { "action": "accept", "operation": "sendEvmTransaction", "criteria": [ { "type": "evmNetwork", "networks": ["base"], "operator": "in" }, { "type": "evmAddress", "addresses": ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], "operator": "in" }, { "type": "evmData", "abi": "erc20", "conditions": [ { "function": "transfer", "params": [ { "name": "value", "operator": "<=", "value": "10000" } ] } ] } ] }, { "action": "accept", "operation": "signEvmTransaction", "criteria": [ { "type": "evmAddress", "addresses": ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], "operator": "in" }, { "type": "evmData", "abi": "erc20", "conditions": [ { "function": "transfer", "params": [ { "name": "value", "operator": "<=", "value": "10000" } ] } ] } ] } ] } ```.

GitHub OpenAPI

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/policy-engine/policies List account governance policies · List policies #
Ask an LLM
“Which policies are governing my accounts?”
“Can I list only the project-level policy?”
Tell an agent
List my account policies.
List {scope} policies.
POST /v2/policy-engine/policies Create a policy to govern account behavior · Create policy #
Ask an LLM
“How do I create a policy that governs what accounts are allowed to do?”
“Can a policy contain up to 100 rules and how large can it be?”
Tell an agent
Create a policy scoped to {scope} with rules {rules}.
Create a policy under scope {scope} described as {description}.
GET /v2/policy-engine/policies/{policyId} Get an account policy · Get policy by ID #
Ask an LLM
“What rules does a particular policy contain?”
“Can I fetch one policy by its ID?”
Tell an agent
Get policy {policyId}.
Show the rules of policy {policyId}.
DELETE /v2/policy-engine/policies/{policyId} Delete an account policy · Delete policy #
Ask an LLM
“How do I delete a policy so it stops applying to accounts?”
“Can I remove a policy by its ID?”
Tell an agent destructive · confirm first
Delete policy {policyId}.
Remove the policy {policyId} from all accounts.
PUT /v2/policy-engine/policies/{policyId} Update an account policy · Update policy #
Ask an LLM
“How do I change the rules of a policy that's already in use?”
“Does updating a policy apply to all accounts using it?”
Tell an agent
Update policy {policyId} with rules {rules}.
Change the description of policy {policyId} to {description}.

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coinbase:coinbase-policy-engine-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coinbase-policy-engine-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coinbase Developer Platform Policy Engine API
  description: The Coinbase Developer Platform APIs - leading the world's transition onchain.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 2.0.0
  contact:
    name: Coinbase Developer Platform
    email: cdp@coinbase.com
    url: https://cdp.coinbase.com
servers:
- url: https://api.cdp.coinbase.com/platform
  description: The production server of the CDP APIs.
security:
- apiKeyAuth: []
tags:


# --- truncated at 32 KB (152 KB total) ---
# Full source: https://artifacts.apis.io/coinbase/openapi/coinbase-policy-engine-api-openapi.yml