Messaging app extension - required provider endpoints

Number of APIs: 7

The collection includes the necessary provider endpoints for implementing the Messaging app extension inside Pipedrive's Leads Inbox.

Manifest description of the endpoints

Notice that these endpoints need to be added to the manifest file in your app's configuration page in Marketplace Manager, so the API becomes aware of the URLs it needs to call. See an example of the manifest bellow:

  {
    "version": "v202101",
    "endpoints": {
      "getConversations": "https://your-app.com/api/channels/:providerChannelId/conversations",
      "getConversationById": "https://your-app.com/apic/channels/:providerChannelId/conversations/:sourceConversationId",
      "postMessage": "https://your-app.com/api/channels/:providerChannelId/messages",
      "getMessageById": "https://your-app.com/api/channels/{providerChannelId}/conversations/:sourceConversationId/messages/{sourceMessageId}",
      "getSenderById": "https://your-app.com/api/channels/:providerChannelId/senders/:senderId",
      "getTemplates": "https://your-app.com/api/channels/:providerChannelId/templates",
      "deleteChannelById": "https://your-app.com/api/channels/:providerChannelId"
    }
  }

**getTemplates* endpoint is optional (needed only if template_support is enabled)

**getMessageById* endpoint is optional (needed only if link_expires is enabled)

**deleteChannelById* endpoint is optional (needed if multiple channels per user is supported. Eg.: Facebook pages)

**getSenderById* endpoint is optional (needed if avatar_expires or fetch_avatar is true)

Notice that the endpoint descriptions have a key (eg.: getConversations) and a value, which is the endpoint URL that corresponds to that key. The URL can be anything that matches the endpoint in your app, you just need to keep the variables somewhere.

Required variables in each URL in the manifest file

URL keyVariables
getConversations:providerChannelId
getConversationById:providerChannelId, :sourceConversationId
postMessage:providerChannelId
getMessageById:providerChannelId, :sourceConversationId, :sourceMessageId
getSenderById:providerChannelId, :senderId
getTemplates:providerChannelId
deleteChannelById:providerChannelId

What each variable means

VariableDescription
:providerChannelIdThe channel ID
:sourceConversationIdThe conversation ID
:senderIdThe ID of a conversation participant
:sourceMessageIdThe ID of a message
  1. Channels - Deletes a channel (deleteChannelById) DELETE {{baseUrl}}/channels/:providerChannelId

  2. Conversations - Get all conversations from a channel (getConversations) GET {{baseUrl}}/channels/:providerChannelId/conversations?conversations_limit=30&messages_limit=30&after=<string>

  3. Conversations - Get a single conversation and it's messages (getConversationById) GET {{baseUrl}}/channels/:providerChannelId/conversations/:sourceConversationId?after=<string>&messages_limit=30

  4. Messages - Add a message (postMessage) POST {{baseUrl}}/channels/:providerChannelId/messages

  5. Messages - Get the details of a message (getMessageById) GET {{baseUrl}}/channels/:providerChannelId/messages/:sourceMessageId

  6. Senders - Get the information about a message sender (getSenderById) GET {{baseUrl}}/channels/:providerChannelId/senders/:senderId

  7. Templates - Returns a list of templates (getTemplates) GET {{baseUrl}}/channels/:providerChannelId/templates