Agent API
A lightweight REST API for discovering agents, launching runs, polling results, and receiving webhook callbacks — all over Bearer API key auth. No MCP client required.
Authentication
All four endpoints require a Bearer token in the Authorization header. Create API keys from the dashboard under API Keys.
Authorization: Bearer YOUR_API_KEY
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/agents | List active agents you have access to. |
GET | /api/v1/agents/{id} | Get a single agent. Returns 404 if you have no access. |
POST | /api/v1/agents/{id}/run | Launch a run. Returns 202 with a run_id to poll. |
GET | /api/v1/runs/{id} | Poll a run for status, output, and cost. |
Discover agents
curl 'https://app.tirelesscrew.com/api/v1/agents' \
-H 'Authorization: Bearer YOUR_API_KEY'
Response:
{
"agents": [
{
"id": "018f…",
"name": "Abandoned Cart Recovery",
"description": "Sends personalised recovery emails…",
"run_url": "https://app.tirelesscrew.com/api/v1/agents/018f…/run",
"ready": true,
"missing_connections": [],
"input_guidance": "Sends personalised recovery emails…"
}
]
}
If ready is false, missing_connections lists the tool names that still need credentials before the agent can run.
Launch a run (JSON)
curl -X POST 'https://app.tirelesscrew.com/api/v1/agents/AGENT_ID/run' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-12345-retry-1' \
-d '{
"input": "Process abandoned cart for customer [email protected], cart total $89.99"
}'
Response (202):
{
"run_id": "019a…",
"status": "pending",
"status_url": "https://app.tirelesscrew.com/api/v1/runs/019a…"
}
Launch a run with files (multipart)
curl -X POST 'https://app.tirelesscrew.com/api/v1/agents/AGENT_ID/run' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'input=Process the attached invoice' \
-F 'run_files[]=@/path/to/invoice.pdf'
You can also pass publicly reachable file URLs instead of uploading:
curl -X POST 'https://app.tirelesscrew.com/api/v1/agents/AGENT_ID/run' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": "Summarise this document",
"file_urls": ["https://example.com/report.pdf"]
}'
Email Trigger
An inbound email can start a new run by sending it to agent+{token}@{domain}. An administrator must first enable Enable email trigger on the agent's Trigger settings; the platform-wide inbound email feature must also be configured and enabled.
The run input includes the untrusted sender address, subject, and the new message body after quoted history and common signatures are removed. File attachments are supported and pass through the same size, MIME-type, per-run count, and owner storage-quota checks as other run files. Invalid attachments are skipped and described in a note in the run input.
For loop safety, automatic responses and bulk, junk, or auto-reply messages are rejected. Message IDs are deduplicated for 24 hours, each agent token is limited to 30 messages per minute, and unknown tokens are ignored without a bounce. Email-triggered runs never send an automatic reply.
Launch a run with a callback
Pass callback_url to receive a POST when the run finishes (completed or failed). The URL must be a publicly reachable HTTPS address — private and internal addresses are rejected.
curl -X POST 'https://app.tirelesscrew.com/api/v1/agents/AGENT_ID/run' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": "Run the weekly report",
"callback_url": "https://your-app.example.com/webhooks/agent-done"
}'
Callback payload (POSTed as JSON):
{
"run_id": "019a…",
"agent_id": "018f…",
"status": "completed",
"output": "Weekly report: 42 orders processed…",
"error": null,
"cost_usd": 0.0012
}
On failure, output is null and error contains a friendly message. The callback is retried up to 3 times with exponential backoff.
Poll for results
curl 'https://app.tirelesscrew.com/api/v1/runs/RUN_ID' \
-H 'Authorization: Bearer YOUR_API_KEY'
Poll every few seconds until status is completed, failed, or cancelled.
Response while running:
{
"run_id": "019a…",
"agent_id": "018f…",
"status": "running",
"started_at": "2026-07-17T10:00:00+00:00",
"completed_at": null,
"output": null,
"error": null,
"cost_usd": null
}
Response when complete:
{
"run_id": "019a…",
"agent_id": "018f…",
"status": "completed",
"started_at": "2026-07-17T10:00:00+00:00",
"completed_at": "2026-07-17T10:00:14+00:00",
"output": "Weekly report: 42 orders processed…",
"error": null,
"cost_usd": 0.0012
}
Idempotency
Pass an Idempotency-Key header to safely retry a POST /run request without creating duplicate runs. The same key returns the original run_id within 24 hours. Two concurrent requests with the same key are deduplicated atomically.
Error codes
| Status | Meaning |
|---|---|
401 | Missing or invalid API key. |
402 | Insufficient credits — top up your wallet before running. |
404 | Agent or run not found, or you do not have access. |
409 | Agent is inactive or a required connection is missing. |
422 | Validation error — check the error field for details. |
429 | Rate limit exceeded (60 req/min per key) or all agent tools are rate-limited. |