Skip to main content

For AI Agents

Run AI agent actions in production

Connect your agent to SendMQ via API or MCP. Queue HTTP jobs, schedule requests, and publish signed webhooks with automatic retries for temporary delivery failures.

When your support agent promises a follow-up, trace the outcome and every attempt from the ticket or agent run in the dashboard.

Schedule a ticket follow-up

ticket-123
RUN_AT=$(python3 -c 'from datetime import datetime, timedelta, timezone
now = datetime.now(timezone.utc)
print((now + timedelta(minutes=5)).isoformat(timespec="seconds"))')

curl -fsS "https://sendmq.com/v1/jobs" \
  -H "Authorization: Bearer $SENDMQ_API_KEY" \
  -H "Idempotency-Key: follow-up-ticket-123-$RUN_AT" \
  -H 'Content-Type: application/json' \
  --data @- <<JSON
{
  "url": "https://support.example.com/actions/follow-up",
  "run_at": "$RUN_AT",
  "agent_action": {
    "ticket_id": "ticket-123", "agent_run_id": "run-456"
  },
  "headers": {"Content-Type": "application/json"},
  "body": {"ticket_id": "ticket-123"}
}
JSON
Set SENDMQ_API_KEY and replace the URL with your HTTPS support endpoint. The example schedules the action in five minutes and returns an action_id.

Use a scoped workspace key with jobs:write to schedule and jobs:read to inspect. Keep the request, timestamp, and idempotency key unchanged when retrying a submission.

Inspect the result

In Agent Actions, search for ticket-123 or run-456. Open the action to see its scheduled time, result, and every delivery attempt. SendMQ retries temporary HTTP failures.

Use X-SendMQ-Job-Id to deduplicate sends on retry. An HTTP success without a reported outcome appears as Delivered · Outcome unreported.

Example action resultticket-123 / run-456
Result
Skipped · Customer replied
Attempts
#1 · HTTP 503 · Retry scheduled
#2 · HTTP 200 · Skip reported

The support endpoint reports the skip on its successful response. Use sent when it sends the follow-up.

X-SendMQ-Action-Outcome: skipped
X-SendMQ-Action-Reason: customer_replied

Use SendMQ for other agent actions

Sync a CRM record

After qualifying a lead, the agent queues an HTTP job to update the contact through your CRM integration endpoint.

API
POST /v1/jobs
MCP
sendmq_enqueue_job
Jobs API reference

Schedule a report

The agent creates a recurring schedule that calls your reporting endpoint every Monday at 09:00 in your team’s time zone.

API
POST /v1/schedules
MCP
sendmq_create_schedule
Schedules API reference

Publish a webhook

When an order is ready to ship, the agent publishes an event. SendMQ delivers a signed webhook to matching subscribers.

API
POST /v1/webhooks/deliver
MCP
sendmq_publish_webhook
Webhooks API reference