Pulse Channel API Reference
Beta. Base URL, paths, and header names are subject to change.
Base URL: https://pulse-api.orchardlink.ai
All requests require: Authorization: Bearer <api-key>
POST /agentToUser/
Accepts a plain-text agent message, adapts it into a rich format for the target channel, and delivers it to the user.
Channels: rcs, amb, livechat
Request Headers
All channels require:
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer <api-key> |
message | string | Yes | Plain-text message to adapt and send |
userid | string | Yes | Recipient identifier |
LiveChat additionally requires:
| Header | Type | Required | Description |
|---|---|---|---|
threadid | string | Yes | Conversation thread ID |
Success Response
200 OK
{
"status": "received",
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}The messageId is a UUID generated per request, usable for log correlation.
POST /userToAgent/
Parses an inbound user interaction (text, quick-reply selection, list selection, etc.) into a plain-text string.
Channels: rcs, amb, livechat
Webex Connect Integration
These headers are intended to be populated from the Output Variables of a Receive node in a Webex Connect flow. The Receive node exposes camelCase variable names (e.g., rcs.postbackData); Pulse expects the equivalent lowercase header names.
| Receive Node Variable | Pulse Header |
|---|---|
rcs.text | text |
rcs.postbackData | postbackdata |
rcs.latitude | latitude |
rcs.longitude | longitude |
abc.message | message |
abc.quickReplyItems | quickreplyitems |
abc.selectedIndex | selectedindex |
abc.listPickerItems | listpickeritems |
abc.datePickerTimeSlots | datepickertimeslots |
livechat.message | message |
livechat.quickReplySelection | quickreplyselection |
Request Headers
RCS
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer <api-key> |
text | string | No | Plain-text message from user |
postbackdata | string | No | Postback payload from a suggestion tap |
latitude | number | No | Latitude of a shared location (coerced from string) |
longitude | number | No | Longitude of a shared location (coerced from string) |
Parsing priority: text → use as-is · postbackdata → use as-is · latitude + longitude → "User shared location: (lat, lng)" · else → 204
AMB (Apple Messages for Business)
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer <api-key> |
message | string | No | Plain-text message from user |
quickreplyitems | JSON string | No | Array of { "title": "..." }. Defaults to []. |
selectedindex | number | No | Zero-based index of the selected quick reply (coerced from string) |
listpickeritems | JSON string | No | Array of { "title": "..." }. Defaults to []. |
datepickertimeslots | JSON string | No | Array of { "startTime": "ISO-8601" }. Defaults to []. |
Parsing priority: message → use as-is · quickreplyitems → title at selectedindex · listpickeritems → "User selected: A, B, ..." · datepickertimeslots → "User selected date/time slot(s): ..." · else → error
LiveChat
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer <api-key> |
message | string | No | Plain-text message from user |
quickreplyselection | string | No | Text of the selected quick reply |
Parsing priority: message → use as-is · quickreplyselection → use as-is · else → error
Success Responses
200 OK — Message parsed.
{
"message": "I'd like to book a flight to London",
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}204 No Content — Inbound payload was a system event (no user message). No body.
Error Responses
All errors return a consistent JSON shape. Every error from /agentToUser and /userToAgent includes messageId.
{
"error": "Human-readable description",
"code": "MACHINE_READABLE_CODE",
"message": "Additional detail (when available)",
"details": [],
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}| Field | Type | Present | Description |
|---|---|---|---|
error | string | Always | Short error description |
code | string | Always | Machine-readable code for programmatic handling |
message | string | Sometimes | Extra context (e.g., upstream error text) |
details | array | Validation errors only | Per-field breakdown of what failed |
messageId | string | Always | Request correlation UUID |
Status Code Reference
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Required headers are missing or have the wrong type |
| 400 | CHANNEL_NOT_CONFIGURED | The target channel is not enabled for this application |
| 401 | UNAUTHORIZED | Authorization header is missing, malformed, or contains an invalid key |
| 404 | NOT_FOUND | Unrecognized path (e.g., unsupported channel name) |
| 500 | INTERNAL_ERROR | Unexpected server error |
| 502 | UPSTREAM_ERROR | An upstream service (LLM or messaging gateway) returned an error |
| 504 | GATEWAY_TIMEOUT | An upstream service (LLM or messaging gateway) did not respond in time |
Error Examples
400 — Validation Error
{
"error": "Invalid request",
"code": "VALIDATION_ERROR",
"details": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["message"],
"message": "Required"
}
],
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}400 — Channel Not Configured
{
"error": "RCS not configured for this application",
"code": "CHANNEL_NOT_CONFIGURED",
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}401 — Unauthorized
{
"error": "Invalid API key",
"code": "UNAUTHORIZED"
}502 — Upstream Error
{
"error": "Upstream service error",
"code": "UPSTREAM_ERROR",
"message": "503 - Service Unavailable",
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}504 — Gateway Timeout
{
"error": "Upstream service timed out",
"code": "GATEWAY_TIMEOUT",
"message": "Request timed out after 10000ms",
"messageId": "550e8400-e29b-41d4-a716-446655440000"
}