Download OpenAPI specification:Download
Reference documentation for the scheduling requests DialStack sends to your system so an AI agent can look up callers, search availability and book appointments during a call.
When an AI agent with scheduling enabled needs customer or calendar data, DialStack sends a request to the base URL configured on that agent. Your system processes the request and returns a response that DialStack hands to the agent as is.
These are synchronous request/response calls, separate from the event webhooks you configure through the Webhook Endpoints API.
Scheduling is configured per AI agent. Set scheduling.webhook_url when you
create or update the agent (POST /v1/ai-agents or POST /v1/ai-agents/{ai_agent_id}).
Scheduling is on for an agent while scheduling.webhook_url is set.
DialStack appends the operation path to that base URL:
{webhook_url}/customers/lookup{webhook_url}/availability/search{webhook_url}/bookingsAll requests include these headers:
| Header | Description |
|---|---|
Content-Type |
Always application/json |
X-DialStack-Signature |
HMAC-SHA256 signature for verification |
X-DialStack-Account-Id |
The account whose caller the agent is talking to |
Requests are signed with the secret of the agent's voice app. Read it with
GET /v1/voice-apps/{voice_app_id}, using the agent's voice_app. If you
rotate the voice app's secret, the agent signs with the new one from the next call.
The X-DialStack-Signature header contains a timestamp and signature:
X-DialStack-Signature: t=1697634600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
To verify the signature:
t) and signature (v1) from the header{timestamp}.{request_body}HMAC-SHA256(secret, concatenated_string)v1 (use timing-safe comparison)2xx with a JSON object. The agent reads the object you return as
is, so the response schemas below are the shapes it understands best, and
any extra fields are available to it in the conversation.2xx status is reported to the
agent as a failed request, with the status code but not your response body.Some platforms have a single scheduling URL and secret that DialStack set up on their platform, rather than a URL on each AI agent. Requests for that setup differ from the per-agent requests described above:
/availability/search and /bookings are sent; there is no
customer lookup.account as well as account_id (both the same value).customer.email,
are passed through as the requester supplied them, and idempotency_key
is the requester's Idempotency-Key.Operations your system implements to receive scheduling requests from DialStack.
DialStack calls them when an AI agent needs to look up a customer, search for availability, or create a booking. Your system processes the request and returns a response.
The agent sends this request, normally at the start of a call, to determine if the caller is a new or existing customer. Not sent by platform-level scheduling.
Your platform should look up the caller by phone number and return their profile if found. Include upcoming appointment information if available — the voice AI uses this for context during the call.
| X-DialStack-Account-Id required | string Example: acct_01h2xcejqtf2nbrexx3vqjhp41 The DialStack account ID for this request |
| account_id required | string The account ID (same as X-DialStack-Account-Id header) |
required | object |
| found required | boolean Whether a matching customer record was found |
object Customer details (present only when found is true) |
{- "account_id": "acct_01h2xcejqtf2nbrexx3vqjhp41",
- "customer": {
- "phone": "+15551234567"
}
}{- "found": true,
- "customer": {
- "name": "Jane Smith",
- "phone": "+15551234567",
- "existing_appointment": {
- "start_at": "2024-01-20T14:00:00Z",
- "end_at": "2024-01-20T14:30:00Z",
- "status": "confirmed"
}
}
}The agent sends this request when it needs to find available appointment slots on the dates the caller asked about.
Your platform should query your booking system and return matching availability.
| X-DialStack-Account-Id required | string Example: acct_01h2xcejqtf2nbrexx3vqjhp41 The DialStack account ID for this request |
| account_id required | string The account ID (same as X-DialStack-Account-Id header) |
| account | string The account ID. Sent only by platform-level scheduling, with the
same value as |
required | object (AvailabilityQuery) |
required | Array of objects (Availability) List of available appointment slots | ||||
Array
| |||||
{- "account_id": "acct_01h2xcejqtf2nbrexx3vqjhp41",
- "query": {
- "filter": {
- "start_at_range": {
- "start_at": "2024-01-15",
- "end_at": "2024-01-15"
}
}
}
}{- "availabilities": [
- {
- "start_at": "2024-01-15T10:00:00Z",
- "duration_minutes": 30
}, - {
- "start_at": "2024-01-15T10:30:00Z",
- "duration_minutes": 30
}
]
}The agent sends this request when it needs to book an appointment.
Your platform should:
idempotency_key - if you've seen it before, return the original responseIdempotency: The idempotency_key prevents duplicate bookings. Store it when
processing a booking, and if the same key arrives again, return the original
booking response. Keys can be safely expired after 24 hours.
For a booking you can't make, such as a slot taken since the search,
return a non-2xx status so the agent doesn't confirm it to the caller.
| X-DialStack-Account-Id required | string Example: acct_01h2xcejqtf2nbrexx3vqjhp41 The DialStack account ID for this request |
| account_id required | string The account ID (same as X-DialStack-Account-Id header) |
| account | string The account ID. Sent only by platform-level scheduling, with the
same value as |
| idempotency_key required | string Key to prevent duplicate bookings. The agent sends the same key if it books the same slot for the same caller twice in one call. If you receive the same key again, return the original booking response. Keys can be safely expired after 24 hours. Treat it as an opaque string. |
required | object (BookingRequest) |
required | object (Booking) | ||||||||||||||||
| |||||||||||||||||
{- "account_id": "acct_01h2xcejqtf2nbrexx3vqjhp41",
- "idempotency_key": "booking-req-123456",
- "booking": {
- "start_at": "2024-01-15T10:00:00Z",
- "duration_minutes": 30,
- "customer": {
- "phone": "+15551234567",
- "name": "John Doe"
}, - "notes": "Initial consultation - referred by AI assistant"
}
}{- "booking": {
- "id": "bkg_01h2xcejqtf2nbrexx3vqjhp41",
- "status": "confirmed",
- "start_at": "2024-01-15T10:00:00Z",
- "end_at": "2024-01-15T10:30:00Z",
- "customer": {
- "phone": "+15551234567",
- "name": "John Doe"
}, - "location": {
- "name": "Main Office",
- "address": "123 Main St, City, ST 12345"
}, - "created_at": "2024-01-10T14:30:00Z"
}
}