Execute API
Authentication
Authenticate with an API key from your servers, or a client ID from your web pages.
Base URL
Every route lives under https://api.execute.cash/v1. Requests and responses are JSON.
Credentials
Creating an address takes one of your account’s two credentials, both from the dashboard. Looking an address up, getting its status and listing chains take none.
| Credential | Header | Send it from |
|---|---|---|
| API key | Authorization: Bearer exe_sk_… | Your servers. It’s secret. |
| Client ID | X-Client-Id: exe_client_… | Your web pages. It’s publishable. |
Send exactly one of them per request.
API keys
An API key is exe_sk_ and 64 hex characters, sent as a bearer token. It works from servers only: a request that carries it and an Origin header came from a browser, and is refused with 403 api_key_in_browser. A key that has been in a browser should be rotated.
curl https://api.execute.cash/v1/address/create \
-H "Authorization: Bearer $EXECUTE_API_KEY" \
-H "Content-Type: application/json" \
-d @intent.jsonThe dashboard shows a key once, when it’s created or rotated, and keeps only its first characters. Rotating replaces it at once: the old key stops working immediately.
Client IDs
A client ID is exe_client_ and 32 hex characters, sent in the X-Client-Id header. It works only from the origins your account allows. Browsers state the origin themselves, in the Origin header, and scripts can’t change it, so a client ID copied from your page doesn’t work from anyone else’s.
const res = await fetch("https://api.execute.cash/v1/address/create", {
method: "POST",
headers: { "X-Client-Id": "exe_client_…", "Content-Type": "application/json" },
body: JSON.stringify(intent),
});Add allowed origins in the dashboard, as they appear in the browser’s address bar, without a path:
https://app.example.comallows exactly that origin.https://*.example.comallows every subdomain ofexample.com, but notexample.comitself.httpworks for local development only:http://localhost:3000,http://127.0.0.1:5173.
An account allows up to 20 origins.
Rate limits
| Credential | Sustained | Burst |
|---|---|---|
| API key | 50 requests a second | 100 |
| Client ID | 10 requests a second | 20 |
Over a limit, requests are refused with 429 rate_limited. The public routes are answered with CORS *, so pages can call them directly.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or one Execute doesn’t know. |
| 403 | api_key_in_browser | An API key sent from a browser (the request has an Origin header). |
| 403 | origin_required | A client ID sent without an Origin header, i.e. not from a browser. |
| 403 | origin_not_allowed | A client ID sent from an origin the account doesn’t allow. |
| 400 | invalid_request | Both credentials in one request. |
| 429 | rate_limited | Over the credential’s rate limit. |
How errors are shaped is in Errors.