Skip to main content
POST
/
agents
Create or register an agent
curl --request POST \
  --url https://api.useproxy.ai/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "<string>",
  "externalId": "<string>",
  "name": "<string>",
  "status": "active",
  "limits": {
    "amount": 123,
    "currency": "<string>",
    "interval": "<string>"
  },
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "metadata": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "status": "active",
  "customerId": "<string>",
  "externalId": "<string>",
  "limits": {
    "amount": 123,
    "currency": "<string>",
    "interval": "<string>"
  },
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as Bearer <api_key>.

Headers

Idempotency-Key
string

Unique key for idempotent requests (24-hour cache)

Body

application/json
customerId
string
required

Parent customer ID

externalId
string
required

External identifier (used for idempotent registration)

name
string

Agent name

status
enum<string>
Available options:
active,
paused,
disabled
limits
object
policy
object

Spending policy controls

metadata
object

Response

Agent created

id
string
required

Unique agent ID

name
string
required

Agent name

status
enum<string>
required

Agent status

Available options:
active,
paused,
disabled
customerId
string | null

Parent customer ID

externalId
string | null

External identifier for the agent

limits
object
policy
object

Spending policy controls

metadata
object
createdAt
string<date-time> | null