Message APIs

[HOOK] Receive messages from TRACT

Haptik will use the endpoint provided by the tool to send messages synchronously as they come. This includes messages generated by the IVA and those sent by the CEU.


Endpoint

type
POST
required
true
provider
ECT (via register_webhook)
caller
TRACT
url
registered_webhooks['message']['receive']
encoding
application/json


Request

parameter type required description
user_id str true Associated user ID
message_id int true Unique and incremental ID for each message
conversation_number str true Current conversation number
message_body str true Message content. Please note that while HSLs are JSON objects, the message body here is a JSON object serialized to a string.
sender str true One of senders
timestamp str true Message creation ISO timestamp in UTC
metadata dict false Additional structured metadata


Response

parameter type required description
error str false Error message if applicable


[API] Send message to TRACT

Endpoint

type
POST
required
true
provider
TRACT
caller
ECT
url
/tract/message/send/
encoding
application/json


Request

parameter type required description
user_id str true Associated user ID
message_body str true Message content. Please note that while HSLs are JSON objects, the message body here should be a serialized JSON string.
sender str true One of senders
metadata dict false Additional structured metadata. Currently unused. Contact dev team for specific usecases.


Response

parameter type required description
error str false Error message if applicable

Can’t find what you’re looking for? Email us at support@haptik.ai.