Skip to content

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:

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <api-key>
messagestringYesPlain-text message to adapt and send
useridstringYesRecipient identifier

LiveChat additionally requires:

HeaderTypeRequiredDescription
threadidstringYesConversation thread ID

Success Response

200 OK

json
{
  "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 VariablePulse Header
rcs.texttext
rcs.postbackDatapostbackdata
rcs.latitudelatitude
rcs.longitudelongitude
abc.messagemessage
abc.quickReplyItemsquickreplyitems
abc.selectedIndexselectedindex
abc.listPickerItemslistpickeritems
abc.datePickerTimeSlotsdatepickertimeslots
livechat.messagemessage
livechat.quickReplySelectionquickreplyselection

Request Headers

RCS

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <api-key>
textstringNoPlain-text message from user
postbackdatastringNoPostback payload from a suggestion tap
latitudenumberNoLatitude of a shared location (coerced from string)
longitudenumberNoLongitude 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)

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <api-key>
messagestringNoPlain-text message from user
quickreplyitemsJSON stringNoArray of { "title": "..." }. Defaults to [].
selectedindexnumberNoZero-based index of the selected quick reply (coerced from string)
listpickeritemsJSON stringNoArray of { "title": "..." }. Defaults to [].
datepickertimeslotsJSON stringNoArray 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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <api-key>
messagestringNoPlain-text message from user
quickreplyselectionstringNoText of the selected quick reply

Parsing priority: message → use as-is · quickreplyselection → use as-is · else → error

Success Responses

200 OK — Message parsed.

json
{
  "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.

json
{
  "error": "Human-readable description",
  "code": "MACHINE_READABLE_CODE",
  "message": "Additional detail (when available)",
  "details": [],
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypePresentDescription
errorstringAlwaysShort error description
codestringAlwaysMachine-readable code for programmatic handling
messagestringSometimesExtra context (e.g., upstream error text)
detailsarrayValidation errors onlyPer-field breakdown of what failed
messageIdstringAlwaysRequest correlation UUID

Status Code Reference

StatusCodeDescription
400VALIDATION_ERRORRequired headers are missing or have the wrong type
400CHANNEL_NOT_CONFIGUREDThe target channel is not enabled for this application
401UNAUTHORIZEDAuthorization header is missing, malformed, or contains an invalid key
404NOT_FOUNDUnrecognized path (e.g., unsupported channel name)
500INTERNAL_ERRORUnexpected server error
502UPSTREAM_ERRORAn upstream service (LLM or messaging gateway) returned an error
504GATEWAY_TIMEOUTAn upstream service (LLM or messaging gateway) did not respond in time

Error Examples

400 — Validation Error

json
{
  "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

json
{
  "error": "RCS not configured for this application",
  "code": "CHANNEL_NOT_CONFIGURED",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

401 — Unauthorized

json
{
  "error": "Invalid API key",
  "code": "UNAUTHORIZED"
}

502 — Upstream Error

json
{
  "error": "Upstream service error",
  "code": "UPSTREAM_ERROR",
  "message": "503 - Service Unavailable",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

504 — Gateway Timeout

json
{
  "error": "Upstream service timed out",
  "code": "GATEWAY_TIMEOUT",
  "message": "Request timed out after 10000ms",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}