Skip to main content
POST
/
api
/
v1
/
pacts
/
submit
Submit pact for approval
import requests

url = "https://api.example.com/api/v1/pacts/submit"

payload = {
    "wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "intent": "<string>",
    "spec": {
        "policies": [
            {
                "name": "<string>",
                "type": "transfer",
                "rules": {},
                "priority": 0,
                "is_active": True
            }
        ],
        "completion_conditions": [
            {
                "type": "time_elapsed",
                "threshold": "<string>"
            }
        ],
        "execution_plan": "<string>"
    },
    "original_intent": "<string>",
    "name": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "result": {
    "pact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "pending_approval",
    "approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "message": "<string>"
  },
  "success": true,
  "suggestion": "",
  "message": "",
  "meta": {
    "total": 123,
    "offset": 123,
    "limit": 123,
    "has_more": true,
    "after": "<string>",
    "before": "<string>"
  }
}

Headers

X-API-Key
string | null

Body

application/json

Request body for POST /pacts/submit.

wallet_id
string<uuid>
required

Target wallet UUID.

intent
string
required

Natural language description of the task.

Required string length: 1 - 2000
spec
PactSpec · object
required

The pact specification.

original_intent
string | null

Raw user input that originated this pact request. For multi-turn conversations, messages are concatenated.

name
string | null

Human-readable pact name. Derived from intent if absent.

Required string length: 1 - 255

Response

Already exists (idempotent). Successful Response

result
PactSubmitResponse · object
required

Response for POST /pacts/submit.

success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

Pagination metadata for list responses.

Supports both legacy offset-based and cursor-based pagination. Cursor fields (has_more, after, before) are populated for cursor-paginated endpoints. Legacy fields (offset, limit) are populated when the caller uses the deprecated offset parameter.