To send messages to the API channel, you need a basic understanding of the models and nomenclature used in Neoleads. Let us try to understand these first.
Channel: The channel defines the type of source of conversations. Eg: Facebook, Twitter, API etc.
Inbox: You can create multiple sources of conversations which is of the same channel type. For example, You can have more than one Facebook page connected to a Neoleads account. Each page is called the inbox in Neoleads.
Conversation: A Conversation is a collection of messages.
Contact: Each conversation has a real-life person associated with it, this person is called a contact.
Contact Inboxes: This is the session for each contact in an inbox. A contact can have multiple sessions and multiple conversations in the same inbox.
Pass the inbox id of the API channel along with other parameters specified. This would create a session for you automatically. A sample response would look like the one below.
As you can see in the payload, you will be able to see them contact_inboxes and each contact_inbox will have a source_id. Source Id can be seen as the session identifier. You will use this source_id to create a new conversation as defined below.