MyCustomerPilotMyCustomerPilot
Developers

Signed webhooks. Idempotent APIs. Import your OpenAPI spec.

This page covers the auth model, the tool-call envelope and its HMAC signature, webhook events, spec import, and the sandbox. The full, copy-pasteable reference lives in the API docs.

Open the API referenceREST · JSON · idempotency keys on writes

Auth

API keys, per environment. Live and test keys are separate; test-key calls are flagged end-to-end and never persist. Send an idempotency key on writes — retries are safe.

terminal
curl
curl https://api.mycustomerpilot.com/v1/agents \
  -H "Authorization: Bearer sk_live_9f2c…" \
  -H "Idempotency-Key: 1d4e6a2c-…"

Tool calls

When the agent calls your API mid-conversation, the request carries an HMAC signature over the timestamp and raw body. HTTPS-only, SSRF-guarded, inputs sanitized. Verify with ~6 lines.

tool-call envelope
POST
POST https://api.yourshop.example/v1/stock/IND-MIDI-42
X-MCPilot-Signature: t=1752876067,v1=6b1a…e94d
X-MCPilot-Tool-Call: tlc_0917
Content-Type: application/json

{ "conversation_id": "cnv_1093", "test": false }
verify.js
node
import { createHmac, timingSafeEqual } from 'node:crypto';

export function verify(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(
    header.split(',').map((p) => p.split('=')));
  const digest = createHmac('sha256', secret)
    .update(`${t}.${rawBody}`).digest('hex');
  return timingSafeEqual(Buffer.from(v1), Buffer.from(digest));
}

Webhooks

One event per lifecycle moment, HMAC-signed with the same scheme as tool calls. Subscribe per agent or per workspace.

conversation.startedA customer opens a new conversation
message.deliveredAn outbound message reaches the device
conversation.handoff_requestedThe agent detects a human is needed
conversation.resumedA human hands the conversation back
payment.link_createdThe agent creates a payment link mid-chat
transaction.attributedA transaction event matches a conversation
optout.recordedA STOP / opt-out is honored
knowledge.publishedA knowledge-base version goes live

Import from spec

Upload OpenAPI / Swagger or Postman — or paste docs, PDF included. Endpoints become tools with typed args; credentials are stored encrypted; nothing goes live until you publish.

1 · Upload openapi.yaml2 · Review generated tools3 · Test in sandbox, publish
generated tool
json
{
  "tool": "check_stock",
  "source": "openapi.yaml → GET /stock/{sku}",
  "args": { "sku": "string" },
  "auth": "header:X-Api-Key — AES-256-GCM at rest",
  "signing": "hmac-sha256, every call"
}

Sandbox

The playground runs the full agent pipeline — retrieval, tools, handoff rules — before it ever talks to a customer. Real tool calls, flagged "test": true, zero persistence.

Playgroundtest: true

Every sandbox tool call hits your real endpoint with the test flag set, so you can assert on it server-side. Conversations, messages and payments created in the sandbox are never stored.

Wire it to one endpoint. See what the agent does with it.