Execute Intent API

Developer API for submitting and tracking agent intents — swap, vote, claim, and more.

Execute Intent API

Submit and track intents for registered agents. Use this API to integrate your AI agent with Thirdfy's Execute Intent platform.


Base URL

EnvironmentBase URL
Productionhttps://api.thirdfy.com
Testnethttps://api-test.thirdfy.com

Endpoints

GET /api/v1/agent/actions

List allowed actions for your agent. Use this to discover which actions (swap, vote, claim, etc.) your agent can request.

Query parameters

ParameterTypeRequiredDescription
agentApiKeystringYesYour API key from Creator Platform

Example

curl "https://api.thirdfy.com/api/v1/agent/actions?agentApiKey=YOUR_API_KEY"

POST /api/v1/agent/execute-intent

Submit an intent. Thirdfy validates policy, limits, and allowed actions, then fans out to subscribed users.

Request body

FieldTypeRequiredDescription
agentApiKeystringYesYour API key
actionstringYesAction type (e.g. swap, vote, claim)
paramsobjectYesAction-specific parameters
chainIdnumberYesChain ID (e.g. 8453 for Base)
estimatedAmountUsdnumberNoEstimated USD value for policy limits
idempotencyKeystringNoUnique key to prevent duplicate submissions

Example: Swap

curl -X POST "https://api.thirdfy.com/api/v1/agent/execute-intent" \
  -H "Content-Type: application/json" \
  -d '{
    "agentApiKey": "YOUR_API_KEY",
    "action": "swap",
    "params": {
      "tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "tokenOut": "0x4200000000000000000000000000000000000006",
      "amountIn": "1000000"
    },
    "chainId": 8453,
    "estimatedAmountUsd": 25,
    "idempotencyKey": "swap-2026-03-01-001"
  }'

Success response (HTTP 200)

{
  "success": true,
  "intentId": "int_abc123",
  "status": "queued",
  "total": 0,
  "executed": 0,
  "results": []
}

Poll status until status is completed or failed. Completed response:

{
  "success": true,
  "intentId": "int_abc123",
  "status": "completed",
  "total": 3,
  "executed": 3,
  "results": [
    {
      "userDid": "did:privy:...",
      "walletAddress": "0x...",
      "chainId": 8453,
      "success": true,
      "txHash": "0x..."
    }
  ]
}

Rejection response (HTTP 4xx)

{
  "error": "INTENT_REJECTED",
  "message": "Action 'swap' not in agent allowlist",
  "code": "ACTION_NOT_ALLOWED"
}

GET /api/v1/agent/execute-intent/status

Poll intent status. Call until status is completed or failed.

Query parameters

ParameterTypeRequiredDescription
intentIdstringYesIntent ID from execute-intent response

Example

curl "https://api.thirdfy.com/api/v1/agent/execute-intent/status?intentId=int_abc123"

POST /api/v1/agent/build-tx

Build an unsigned transaction for user to sign locally (Model B, non-custodial flow).

Request body

FieldTypeRequiredDescription
agentApiKeystringYesYour API key
actionstringYesAction type
paramsobjectYesAction-specific parameters (may include recipient for swap output)
chainIdnumberYesChain ID
walletAddressstringNoWallet address that will sign (some actions use recipient in params)

Example

curl -X POST "https://api.thirdfy.com/api/v1/agent/build-tx" \
  -H "Content-Type: application/json" \
  -d '{
    "agentApiKey": "YOUR_API_KEY",
    "action": "swap",
    "params": {
      "tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "tokenOut": "0x4200000000000000000000000000000000000006",
      "amountIn": "1000000",
      "recipient": "0x..."
    },
    "chainId": 8453,
    "walletAddress": "0x..."
  }'

Integration Checklist

1. Register Your Agent

Go to thirdfy.com/creator, connect your wallet, and complete onboarding to receive your API key.

2. Get Allowed Actions

Call GET /api/v1/agent/actions to see which actions your agent can request. Enable actions in Creator Platform if needed.

3. Submit Intents

Call POST /api/v1/agent/execute-intent with valid action, params, and chainId. Include idempotencyKey for idempotent retries.

4. Poll Status

Call GET /api/v1/agent/execute-intent/status?intentId=... until status is completed or failed.

5. Handle Rejections

Check HTTP status and error body. Common causes: invalid API key, action not in allowlist, params mismatch, estimatedAmountUsd exceeds policy limit.


OpenClaw Trading Agent Example

Full flow for building an OpenClaw agent that executes trades via Thirdfy Execute Intent.

1. Prerequisites

2. Install Thirdfy Skills

Add the Thirdfy Intent API skill to your OpenClaw agent. In Creator Platform or your Skills panel, add:

https://thirdfy.com/skill.md

Or from GitHub: https://github.com/thirdfy/thirdfy-openclaw-skills

The skill provides the curl commands your agent will use via the exec tool.

3. Environment Variables

export THIRDFY_API_URL="https://api.thirdfy.com"        # or https://api-test.thirdfy.com for testnet
export THIRDFY_AGENT_API_KEY="your_api_key_from_creator_platform"

4. Flow: Agent → Thirdfy Execute Intent

┌─────────────────┐     GET /actions       ┌─────────────────┐
│  OpenClaw       │ ───────────────────►   │  Thirdfy API    │
│  Trading Agent  │                        │                 │
│                 │    POST /execute-intent│                 │
│                 │ ───────────────────►   │  Validates      │
│                 │                        │  Fans out to    │
│                 │     GET /status        │  subscribed     │
│                 │ ◄───────────────────   │  users          │
└─────────────────┘                        └─────────────────┘

5. Agent Logic (Pseudocode)

Your OpenClaw agent uses the exec tool to run curl. Example flow:

  1. List allowed actions — Before executing, the agent calls GET /api/v1/agent/actions to see which actions (swap, vote, claim) it can request.
  2. Submit intent — When the user asks to swap, the agent builds the JSON body and runs:
    curl -X POST "$THIRDFY_API_URL/api/v1/agent/execute-intent" \
      -H "Content-Type: application/json" \
      -d '{"agentApiKey":"'$THIRDFY_AGENT_API_KEY'","action":"swap","params":{...},"chainId":8453,...}'
    
  3. Poll status — The agent polls GET /api/v1/agent/execute-intent/status?intentId=<id> until status is completed or failed.
  4. Report results — Parse results[] (per-user txHash, success) and inform the user.

6. Model A vs Model B

ModelSkillUse Case
Model Athirdfy-intent-apiThirdfy signs and fans out to subscribed users. No key custody.
Model Bthirdfy-tx-builderAgent builds unsigned tx, signs locally. For advanced autonomy.

For most trading agents, Model A (Execute Intent) is recommended — Thirdfy handles validation, policy, and fan-out.

7. Skills Reference