1. Home
  2. Docs
  3. API Features
  4. Custom Channel

Custom Channel


POST https://api.robinhq.com/messages

Succes message: 201 Created

Error in JSON: 400 Bad Request

Wrong authentication: 401 Invalid authorisation data


Starting with v1.7 of the ROBIN API, we added the possibility to use your own custom channel. In order for this to work, the ROBIN API needs to be configured (please contact api@robinhq.com for assistance). A custom channel has the following characteristics:

  • External identifier
  • Name
  • Avatar (2 sizes: 18\18px and 26\26 px)
  • Webhook URL
  • Support private messaging (true/false)
  • Send private as email (true/false)
  • Support select webstore (true/false)
  • Support sending attachments

Webhook URL

Part of registering a custom channel, is defining a so called webhook URL. This is an URL that ROBIN posts replies to messages to. When an agent types a reply to a message that was created for a custom channel, that response is posted to the registered webhook URL for that channel. The data posted is a JSON string containing the following properties (this first section are properties that were provided to the original message):

  "ChannelAccountExternalIdentifier": "whatsapp",
  "ConversationGuid": "ddb44afc-b87d-4437-95c2-707543c84676",
  "ConversationExternalIdentifier": "convId",
  "MessageExternalIdentifier": "messId",
  "RelationExternalIdentifier": "john@email.com",
  "RelationName": "John",
  "Content": "This is a message",
  "IsPrivate": false,
  "Referrer": "http://robinhq.com",
  "Subject": "Question",
  "SentDateTime": "2017-09-12T12:34:56",
  "Attachments": [
      "FileName": "attachment.txt",
      "Base64Content": "MQ=="

The only exception is when a channel has “Send private as email” set and an agent sends a private reply, in which case the reply is sent directly via email and not posted to the webhook URL.


Schema of Custom Channel

ChannelAccountExternalIdentifierstringYesThis is the external ID for the conversation."whatsapp"
ConversationGuidstringNoThis is the external ID for the original message this was a reply to."ddb44afc-b87d-4437-95c2-707543c84676"
ConversationExternalIdentifierstringYesThe external ID for the relation (usually an email address or phone number)."convId"
MessageExternalIdentifierstringYesThe name for the relation."messId"
RelationExternalIdentifierstringYesThe generated GUID of the conversation."john@email.com"
RelationNamestringYesThe content of the answer."John"
ContentstringYesIndicates whether the returned message is marked private by the agent."This is a message"
IsPrivatebooleanNoThe name of the webstore the conversation was assigned to.false
ReferrerstringNoThe name of the agent that created the reply."http://robinhq.com"
SubjectstringNoThe email address of the agent that created the reply."Question"
SentDateTimestringNoThe outgoing attachments that were added to the message."2017-09-12T12:34:56"
Attachmentsarray[Attachment]NoAn attachment object contains the following properties:
FileNamestringNoThe filename of the attachment."attachment.txt"
Base64ContentstringNoThe bytes of the attachment as base64 encoded string."MQ=="