Chat To ClientsHelp Center

How can we help?

Knowledge baseDeveloper ResourcesDeveloper Resources

Conversations API -Add Inbound Message (with Contact ID)

The Add Inbound Message capability lets you post inbound messages to Conversations by supplying a Contact ID, without first resolving a Conversation ID. This reduces calls, simplifies logic, and ensures messages appear in the correct CRM thread with minimal overhead. Use this guide to understand the benefits, setup, payload structure, threading behavior, and best practices.


IMPORTANT: You can find the Complete REST API documentation for Chat To Clients CRM CRM platform here. Chat To Clients CRM API Documentation - Send a new message.

TABLE OF CONTENTS


What is Add Inbound Message (Contact-Based)


Add Inbound Message accepts a Contact ID and posts a new inbound message into the appropriate conversation—either appending to an existing thread or creating a new one. This makes integrations faster and more reliable when ingesting messages from providers, webhooks, or imports where the contact is already known.




Key Benefits of Add Inbound Message


These advantages map directly to fewer network round-trips, clearer developer flows, and a better agent experience in the CRM.



Endpoint Overview & Payload (Conceptual)


The following shapes illustrate how to structure requests and consume responses. Field names are representative; align your implementation to the latest developer docs in your environment.


HTTP

POST /conversations/inbound-messages Authorization: Bearer <token> Content-Type: application/json


Request (representative)

{ "contactId": "CONTACT_ID", "channel": "sms | whatsapp | email | messenger | instagram | webchat", "endpoint": { "phone": "+15551234567", "email": "user@example.com" }, "content": { "text": "Hello from our provider", "attachments": [ { "type": "image|file|video", "url": "https://example.com/file.jpg", "filename": "file.jpg", "sizeBytes": 123456 } ] }, "metadata": { "providerMessageId": "ext-abc-123", "externalThreadKey": "optional-correlation", "timestamp": "2026-02-04T10:15:30Z" }, "idempotencyKey": "fd2d5f6f-5a9f-4b0a-8d68-0d5f6a1c9e5a" }


Response (representative)

{ "messageId": "MSG_123", "conversationId": "CONV_987", "contactId": "CONTACT_ID", "channel": "sms", "direction": "inbound", "createdAt": "2026-02-04T10:15:31Z" }

Threading & Association Rules


Threading rules determine whether the system appends your message to an existing conversation or creates a new one. Understanding these rules prevents duplicate or fragmented threads.



Setup & Requirements


Preparing credentials, scopes, and environment context ahead of time improves reliability and shortens integration time.


Channel Considerations & Attachments


Each channel enforces unique rules. Validate payloads to avoid delivery failures or rejected uploads.



Idempotency, Retries & Rate Limits


Network hiccups and provider timeouts are normal. Idempotency and disciplined retry logic prevent duplicate messages and improve user trust.



Error Handling & Common Responses


Standardising error handling reduces investigation time and avoids user-visible inconsistencies.



Testing & Verification


A repeatable test plan ensures messages thread correctly and appear in the CRM as expected before production rollout.



Frequently Asked Questions


Q: Can I still post inbound using a Conversation ID?
Yes. Existing flows remain supported. Contact-based inbound is an additive shortcut.



Q: What happens if I omit the channel?
The request is rejected. Provide channel and, when needed, a disambiguating endpoint field.



Q: How is the conversation selected when multiple threads exist?
The system prefers an open thread on the same channel. If not found, it creates a new conversation.



Q: How do I handle duplicates when retrying after a timeout?
Include an idempotencyKey with every request and reuse it on retries.



Q: Can I backfill historical inbound messages?
Yes. Provide metadata.timestamp reflecting the original time, the message is ordered accordingly in the timeline.



Q: How do I target the right location if a contact appears in more than one?
Use credentials or headers tied to the intended location/workspace. Calls should be scoped to the location that owns the contact.

Last updated Mon, 9 Feb, 2026 at 5:56 AM