Developer docs

API Documentation

Integrate Yasmine into any platform with our REST API, webhooks, and SDKs.

Authentication

Every request must include an x-api-key header. Generate an API key from the Integrations tab in your dashboard.

curl https://api.confirmai.com/v1/orders \
  -H "x-api-key: sk_live_your_api_key_here"

Base URL

https://api.confirmai.com/v1

Endpoints

POST/v1/orders
GET/v1/orders
GET/v1/orders/:id
PATCH/v1/orders/:id
DELETE/v1/orders/:id

Create an order

Send this payload and we'll call the customer within minutes.

curl -X POST https://api.confirmai.com/v1/orders \
  -H "x-api-key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customerName": "Ahmed Ben Ali",
    "customerPhone": "+212612345678",
    "customerAddress": "123 Rue Mohammed V, Casablanca",
    "customerCity": "Casablanca",
    "products": [
      {
        "name": "Running Shoes",
        "quantity": 1,
        "price": 499
      }
    ],
    "totalAmount": 499,
    "currency": "MAD",
    "source": "shopify",
    "maxCallAttempts": 3
  }'

Example response

{
  "success": true,
  "data": {
    "id": "ord_abc123",
    "status": "pending",
    "customerName": "Ahmed Ben Ali",
    "customerPhone": "+212612345678",
    "totalAmount": 499,
    "currency": "MAD",
    "createdAt": "2026-04-15T10:30:00Z"
  }
}

Webhooks

Configure a webhook URL in the Integrations tab . We'll POST events to it as orders progress, signed with the x-confirmai-signature header so you can verify authenticity.

order.confirmedCustomer confirmed the order — safe to ship.
order.cancelledCustomer cancelled the order during the call.
order.no_answerAll call attempts failed — decide whether to ship or cancel.

Example payload

{
  "event": "order.confirmed",
  "timestamp": "2026-04-15T10:32:00Z",
  "data": {
    "order": {
      "id": "ord_abc123",
      "externalId": "SHOP-1234",
      "customerName": "Ahmed Ben Ali",
      "status": "confirmed",
      "totalAmount": 499,
      "currency": "MAD",
      "callAttempts": 1,
      "confirmedAt": "2026-04-15T10:31:45Z"
    }
  }
}

Verify the signature

import crypto from "crypto";

function verifyWebhook(body: string, signature: string, secret: string) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(body)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Rate limits

Rate limits are per organization, applied across all API keys. Headers are returned on every response.

PlanRequests per minute
Free60 req/min
Starter120 req/min
Professional300 req/min
Growth600 req/min

Each response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset