API documentation
Base-URL
https://rest.messengerpeople.com/api/v16/<endpoint>
login
-
POST Login
/login
https://rest.messengerpeople.com/api/v16/login
Create an API token for this user, that can be used instead of the API key to identify the users actions.
Parameter Value Type Description string Login username (email address)
password Login password
string A code generated for new agents or when restoring a forgotten password. If the code matches, the specified password is used from now on for the agent. Or a code sent for 2-factor authentication.
string Token with login data
string Channel ID for activating this channel
string The whatsapp number or email address to which the 2fa code will be sent, cannot be overwritten
-
POST Password Code
/login/code
https://rest.messengerpeople.com/api/v16/login/code
Generate a code that is sent to the email address of the agent for restoring a forgotten password.
Parameter Value Type Description string Login username (email address)
-
DELETE Login
/login
https://rest.messengerpeople.com/api/v16/login
Logout a user who previously logged in
This method has no parameters.
user
-
GET Profile
/user/{id}
https://rest.messengerpeople.com/api/v16/user/{id}
Get profile information about one or multiple users. If the id is omitted users can be listed using various filters.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple ids can be separated by comma.
integer The maximum number of results.
boolean(0/1) Active and inactive users are listed per default. Use
1
for listing only active users and0
for listing only inactive users.integer The number of skipped results.
boolean(0/1) Set to
1
for listing only blocked usersboolean(0/1) Set to
1
for listing only unreachable usersinteger List only active users of this targeting group.
string Users can be searched by id/phone number (if the search attribute is numeric) or by parts of their name or referral info.
string User lists are ordered by creation date per default.
stopped
,id
,name
,messenger
,blocked
,last_chat
,last_in
orlast_out
can be specified to order by those attributes.boolean(0/1) Normally user lists are sorted descending which means latest first.
boolean(0/1) Set if the time of the last user chat (incoming or outgoing) should be included.
Retrieving the information costs more time.boolean(0/1) Set if the time of the last user chat (incoming) should be included.
Retrieving the information costs more time.boolean(0/1) Set if the time of the last user chat (outgoing) should be included.
Retrieving the information costs more time.boolean(0/1) Set if the last message (incoming or outgoing) should be included.
Not available when using tickets.boolean(0/1) Set if the number of unread incoming chat messages should be included.
Not available when using tickets.boolean(0/1) Set if custom fields should be included.
json A JSON array of user filter. If multiple filters are specified, all are applied. Each filter element can have the following elements:
type
: mandatory type of the filter. Possible value iscreated
orcustomfield
after
: UNIX timestamp of created or last update of a customfieldbefore
: UNIX timestamp of created or last update of a customfieldname
: name of a custom field (default all)value
: Value of a custom field
boolean(0/1) List only users whose latest chats have been with the chatbot without a ticket
string Possible values json or csv. Only applies for listing users.
-
PUT Update
/user/{id}
https://rest.messengerpeople.com/api/v16/user/{id}
Update properties of a user
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple ids can be separated by comma.
json Requires JSON with
field name
=>field value
.
Possible field names:name
: name of the usercustomfields
: Please see possible user properties by using the GET USER PROPERTIES call.
Example:{ "name": "John Doe", "customfields": { "haircolor": "brown", "123": "premium" }, }
integer Number of unread incoming chat messages. Not available when using tickets. Set 0 or the number of unread chat messages.
If unread is set for multiple users, the fields parameter is ignored. Also only the last message per user is marked as unread if unread is greater 1. -
POST Upload CSV
/user/csv
https://rest.messengerpeople.com/api/v16/user/csv
Bulk update users by uploading a csv file.
WhatsApp, Facebook and Telegram user can be created with the upload as well.
This is not a JSON Request, please use the default HTTP Multi Part RequestParameter Type Description file The CSV file containing the user list.
Only fields provided within the file will be handled
The following fields are possible:- Regular fields:
- id
mandatory
Id of the user, differs by messenger, for WhatsApp this would be the phone number - messenger
mandatory
Identifier for the used messenger of the user. Possible values: CC for Custom Messenger, FB for Facebook, IM for IMessage, IG for Instagram, RC for RCS, TG for Telegram, VI for Viber, WB for WhatsApp, IN for Notify - name
Username
- id
- Control fields:
- activated
1: user should be activated for newsletters, 0: user should be deactivated for newsletters - blocked
1: user should be blocked, 0: user should be unblocked - deactivated
1: user should be deactivated for newsletters, 0: user should be activated for newsletters - deleted:
1: user should be deleted, 0: user should not be deleted
- activated
- Every user property of the channel listed by name
- Regular fields:
-
DELETE Delete
/user/{id}
https://rest.messengerpeople.com/api/v16/user/{id}
Delete the user and his chats. Chats and information about the user are deleted immediately after this call.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
-
PUT Start
/user/{id}/start
https://rest.messengerpeople.com/api/v16/user/{id}/start
Activate a user for newsletters.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
-
PUT Stop
/user/{id}/stop
https://rest.messengerpeople.com/api/v16/user/{id}/stop
Deactivate a user for newsletters.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
-
PUT Block
/user/{id}/block
https://rest.messengerpeople.com/api/v16/user/{id}/block
Block a user.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
-
PUT Unblock
/user/{id}/unblock
https://rest.messengerpeople.com/api/v16/user/{id}/unblock
Unblock a user that was previously blocked.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
-
POST Create
/user
https://rest.messengerpeople.com/api/v16/user
Create a new user for the specified messenger
Parameter Value Type Description string The phone number of the user without blanks or leading + or 0, e.g 491771234567
string Must be set to WB for creating a WhatsApp Business user
-
GET Property
/user/property
https://rest.messengerpeople.com/api/v16/user/property
Get a user property for a list of users
Parameter Value Type Description string A comma-separated list of user numbers. Leave empty to list all users with the property.
string The name of the user property
-
PUT Property
/user/property
https://rest.messengerpeople.com/api/v16/user/property
Update a user property of a list of users
Parameter Value Type Description string The user number. Multiple numbers can be separated by comma.
string The name of the user property
string The value of the user property. Must be compliant with the possible field values.
User properties
-
GET Properties
/custom/{id}
https://rest.messengerpeople.com/api/v16/custom/{id}
Get all user properties
Parameter Value Type Description mixed The field ID or name
boolean(0/1) Set to 1 if hidden fields should be included.
-
POST Create
/custom
https://rest.messengerpeople.com/api/v16/custom
Create a new user property
Parameter Value Type Description string The name of the user property, no spaces.
"fieldname"
will result in a bot variable$fieldname$
.string Possible types:
number
text
word
enum
collection
location
date
time
string Possible values or conditions for this proeprty.
e.g.>=2 <=9
for typenumber
.
a,b,c,d
for typeenumeration
orcollection
integer Expiration in seconds
0
: won't be saved and can only be used in the answer associated with the input>0
: Seconds before information will be purged-1
: permanent
boolean(0/1) Property can be edited on the "profile page" by the user.
string Display name of the property (also shown on users profile page)
integer The position of the property. Per default it is added at the end.
boolean(0/1) Property is only visible with appropriate rights (not for normal agents).
boolean(0/1) Property is read only for agents.
boolean(0/1) Property is only read if the corresponding parameter is set.
string Default value that is replaced if no value is stored in the user profile.
-
PUT Update
/custom
https://rest.messengerpeople.com/api/v16/custom
Update a user property
Parameter Value Type Description mixed The field ID or name
string The name of the user property, no spaces.
"fieldname"
will result in a bot variable$fieldname$
.string Possible types:
number
text
word
enum
collection
location
date
time
string Possible values or conditions for this property.
e.g.>=2 <=9
for typenumber
.
a,b,c,d
for typeenumeration
orcollection
integer Expiration in seconds
0
: won't be saved and can only be used in the answer associated with the input>0
: Seconds before information will be purged-1
: permanent
boolean(0/1) Property can be edited on the "profile page" by the user.
string Display name of the property (also shown on users profile page)
integer The position of the property.
boolean(0/1) Property is only visible with appropriate rights (not for normal agents).
boolean(0/1) Property is read only for agents.
boolean(0/1) Property is only read if the corresponding parameter is set.
string Default value that is replaced if no value is stored in the user profile.
-
DELETE Delete
/custom
https://rest.messengerpeople.com/api/v16/custom
Delete a user property
Parameter Value Type Description mixed The property ID or name
User-Chat
-
GET Chat Messages
/chat
https://rest.messengerpeople.com/api/v16/chat
Get the chat messages of a user ordered by chat time latest first. The result includes the send_status with the following possible values (availability depending on the messenger):
0 = sending in progress
1 = sent (in WhatsApp and Viber
2 = delivered)
3 = read
-1 = failed
-2 = user rejected, left the channel or 24 hour window is exceededParameter Value Type Description mixed The user ID, number or secret hash code. Multiple ids can be separated by comma.
integer This maximum number of results.
boolean(0/1) Show newsletter start and stop messages of users.
-
POST Send Message
/chat
https://rest.messengerpeople.com/api/v16/chat
Send a message to a user or to multiple users
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma. The user number / id must be numeric only. Do not add a "+" to the user number (WhatsApp)
string The text message to be sent.
string The url of the attachment. The following types/extensions are supported: image (jpg, jpeg, png, gif), video (mp4, m4v, mpg, mpeg, mov, avi), audio (mp3, wav, ogg, opus) or document (pdf, docx, etc). If the attachment is valid, a field called
reusable_attachment
is in the result, containing a cached URL for the sent file. Use this URL the next time for sending the same file to other users to improve the performance. Can also contain json for sending product lists.string The filename of the attachment. It can be displayed in messengers that don't support inline view of the attachment.
json A JSON encoded array of buttons can be passed. Each button must define a
caption
(displayed text), atype
(link or postback) and aninfo
field- Link must contain a URL.
- Postback a text send back to the server when the user clicks on it
Example:[ {"type":"link", "caption":"MessengerPeople", "info":"https:\/\/www.messengerpeople.com"}, {"type":"postback", "caption":"Hello","info":"Hello"} ]
Note: Buttons are sent differently to the various messengers.
array The parameter "meta" can contain any key => value pairs, that do not use reserved names. Mainly used for internal purposes
mixed Array or comma-separated list of user numbers for sending to a larger number of users. Use instead of the id parameter. Performance-optimized so it does not update tickets of individual users. Just a list of success and failure numbers is returned.
json Optional filter to use for sending in batch mode. Valid filters are all parameters given in endpoint USER GET.
-
POST Send Notification
/chat/notification
https://rest.messengerpeople.com/api/v16/chat/notification
Send a notification to a user or to multiple users in WhatsApp Business
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
mixed Array or comma-separated list of user numbers for sending to a larger number of users. Use instead of the id parameter. Performance-optimized so it does not update tickets of individual users. Just a list of success and failure numbers is returned.
json Optional filter to use for sending in batch mode. Valid filters are all parameters given in endpoint USER GET.
string The name of the notification template
json A JSON array of parameters that are replaced in the notification.
For example: ["$profile_name$", "Value 2"]string The url of the header attachment. The following types/extensions are supported: image (jpg, png), video (mp4) or document (pdf). If the attachment is valid, a field called
reusable_attachment
is in the result, containing a cached URL for the sent file. Use this URL the next time for sending the same file to other users to improve the performance.string The text to be placed into the header variable
string The suffix added to a dynamic link button
string Language code of the notification, that should be send.
All available language codes can be found on the page https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates. -
POST Bot Chat
/chat/bot
https://rest.messengerpeople.com/api/v16/chat/bot
Start a bot conversation with a user by sending a botchat. The bot_active flag of an associated ticket will be set and the bot topic will be activated for the user.
Parameter Value Type Description mixed The user ID, number or secret hash code. Multiple IDs can be separated by comma.
integer The ID of the topic
integer The ID of the chat
json JSON with
field name
=>field value
pairs which will be set as user properties before sending. see possible user properties by using the GET USER PROPERTIES call.
Example:{ "color": "red" }
json Optional filter to use for sending in batch mode. Valid filters are all parameters given in endpoint USER GET.
-
PUT Typing
V16/chat/typing
https://rest.messengerpeople.com/api/v16/chat/typing
Send a start or end typing event to a user. Currently only supported for Apple Messages for Business.
Parameter Value Type Description mixed The user ID, number or secret hash code.
boolean(0/1) 1 if start typing, 0 for end typing
-
DELETE Delete
/chat
https://rest.messengerpeople.com/api/v16/chat
Delete a single incoming chat by overwriting its text with "_chat_deleted" and removing all attachments
Parameter Value Type Description integer The id of the chat that should be deleted
channel
-
GET Properties
/channel/list
https://rest.messengerpeople.com/api/v16/channel/list
Get a list of all channels an agent has access to (also the ones that are not assigned)
This method has no parameters. -
GET Properties
/channel
https://rest.messengerpeople.com/api/v16/channel
Get properties of the channel
This method has no parameters. -
PUT Update
/channel
https://rest.messengerpeople.com/api/v16/channel
Update properties of the channel
Parameter Value Type Description string Name of the channel
string Status message of the channel
string Welcome message for new users
string Ticket message for existing users
boolean(0/1) Set if a read confirmation should be sent in WhatsApp when receving chat messages
boolean(0/1) Set to enable the linkpreview-feature in the messengers supporting link previews
boolean(0/1) Set to interpret every word as "Start" message. When disabled, only the default start word in the channels language or the specific start word is active.
string When
startword
is set andevery_word_starts
is set to0
, users are only activated if they send this specific wordstring The timezone, e.g. "Europe/Berlin" or "America/Los_Angeles"
integer The amount of days after which inactive users are deleted automatically
string Default language for this channel. Possible languages:
de
,en
,d1
(formal German),es
,fr
,it
,nl
,pl
,pt
,ru
,r1
,ar
,tr
,hr
andjp
url URL of the profile image of the channel
integer Time in minutes after which a ticket is marked as "overdue"
integer Time in minutes after which a ticket is marked as "critical"
boolean(0/1) Set if you want to open a ticket even if the chatbot answered already.
integer Time in minutes after which a ticket is reopened after it has been closed. Default 60
integer Time in minutes after which a ticket is closed automatically. Default 0
boolean(0/1) Set if you want to use autorouting of tickets.
boolean(0/1) Set if you want to assign tickets to agents automatically.
boolean(0/1) Set if you want to assign a ticket automatically to a previously assigned agent.
integer Set to 2 for automatically deactivating a bot when the agent sends a chat response or to 1 when a ticket is opened.
string Any information in json format used by a frontend to store channel specific settings
integer The maximum number of tickets that are assigned to an agent by auto routing.
boolean(0/1) Set if you want to assign a ticket automatically only to online agents.
boolean(0/1) Set if you want to activate auto routing by keywords
boolean(0/1) Set if you want to open a ticket whenever the channel is mentioned in an Instagram story
string Configuration for apple payment in json format (unused)
boolean(0/1) Set if you want to enable urltracking with shortened URLs. Contact MessengerPeople if you want to use your own domain instead of www.msgp.pl.
string Parameters that are added to linked URLs if a user clicks on the link. %SOURCE% will be replaced by the used messenger
integer The number of unread newsletter content messages a user gets when requesting newsletter content.
integer The maximum age in seconds of unread newsletter content messages a user gets when requesting newsletter content.
string An array of default texts that can be used when sending newsletter content
string The message that a user gets when he tries to pull content but got already all content.
string The channel image displayed in the Notify app.
string A short text describing the channel in the Notify app.
boolean(0/1) Specifies whether channel content can be displayed in the chat of Notify.
string The status of the channel in the Notify app affecting the visibility in the categories list. Possible values are public, private or hidden.
string Welcome message for users subscribing for newsletter content
string Notify promotion text added for WhatsApp users subscribing for newsletter content
string Goodbye message for users who are unsubscribing
string Link to the privacy policy
boolean(0/1) Specifies whether newsletter content is pushed to messengers.
boolean(0/1) Specifies whether a reopened ticket should be de-assigned from an agent. Default 0
integer The number of days after which inactive Facebook users are stopped automatically
integer The number of days after which inactive Notify users are stopped automatically
boolean(0/1) Specifies whether agents can delete single chat messages.
boolean(0/1) Specifies whether a note is mandatory when closing a ticket.
string The days and hours when the webchat is available. Provide data in JSON format with a
comma-separated list of weekdays as the key and a nested object with time-strings for from and to.
Default value is:{"mon,tue,wed,thu,fri": {"from": "09:00", "to": "17:00"}}
boolean(0/1) Specifies whether ticket and chat events in other channels of the account are distributed to the agents.
-
GET Chats
/channel/chats
https://rest.messengerpeople.com/api/v16/channel/chats
Get all chat messages of the channel ordered by chat time latest first.
The result includes the send_status with the following possible values (availability depending on the messenger):
0 = sending in progress, 1 = sent (in WhatsApp and Viber 2 = delivered), 3 = read, -1 = failed, -2 = user rejected, left the channel or 24 hour window is exceeded,
Sent notifications are marked with notification: trueParameter Value Type Description integer The maximum number of results.
integer List only chat messages with a smaller or bigger ID, depending on the sorting.
integer List only chat messages with a chattime that is later.
boolean(0/1) Show incoming messages.
boolean(0/1) Show outgoing messages.
boolean(0/1) Include chat meta information
string Only messages that contain this substring will be returned .
integer Show automated / bot messages if bot = 1. If bot = 2 include also welcome and stop messages.
boolean(0/1) Sort list with earliest first.
-
GET Teams
/channel/teams
https://rest.messengerpeople.com/api/v16/channel/teams
Get the teams of the channel
This method has no parameters. -
GET Agents
/channel/agents
https://rest.messengerpeople.com/api/v16/channel/agents
Get the agents of the channel
This method has no parameters. -
GET Online agent IDs
/channel/online_agents
https://rest.messengerpeople.com/api/v16/channel/online_agents
Get a list of ids of online agents of the channel
Parameter Value Type Description boolean(0/1) Get online agents from other channels of this account
-
GET Labels
/channel/labels
https://rest.messengerpeople.com/api/v16/channel/labels
Get the labels (tags) of the channel
This method has no parameters. -
POST Labels
/channel/labels
https://rest.messengerpeople.com/api/v16/channel/labels
Create a label (tag) for a channel
Parameter Value Type Description string The name of the label
string The background color of the label in hex format, eg.
BADA55
string The text color of the label in hex format, eg.
C0FFEE
-
PUT Labels
/channel/labels
https://rest.messengerpeople.com/api/v16/channel/labels
Update a label (tag) of a channel
Parameter Value Type Description mixed The label ID. Multiple IDs can be separated by comma.
string The name of the label
string The background color of the label in hex format, eg.
FACADE
string The text color of the label in hex format, eg.
BE1337
-
DELETE Labels
/channel/labels
https://rest.messengerpeople.com/api/v16/channel/labels
Delete labels (tags) of a channel
Parameter Value Type Description mixed The label ID. Multiple IDs can be separated by comma.
-
GET Facebook
/channel/facebook
https://rest.messengerpeople.com/api/v16/channel/facebook
Get Facebook connection info of the channel
This method has no parameters. -
PUT Facebook
/channel/facebook
https://rest.messengerpeople.com/api/v16/channel/facebook
Update Facebook confirmation and get-started information or (dis)connect to the Facebook page
Parameter Value Type Description boolean(0/1) Set if a confirm dialog should be displayed to new Facebook users
string The text in the confirm dialog that new Facebook users are receiving.
boolean(0/1) Set if the Facebook "get started" button should be displayed to new users
string The greeting message that Facebook users are receiving when sending the first message to the page.
string The Facebook access token from an administrator connecting to a Facebook page.
For connecting the page theaccess_token
,page_id
andpage_name
must be set.
For disconnecting the page theaccess_token
must be empty andpage_id
andpage_name
must be set.integer The Facebook page ID
string The Facebook page name
-
DELETE Facebook
/channel/facebook
https://rest.messengerpeople.com/api/v16/channel/facebook
Delete Facebook connection of a channel
This method has no parameters. -
GET Webhook
/channel/webhook
https://rest.messengerpeople.com/api/v16/channel/webhook
Get current webhook settings
This method has no parameters. -
PUT Webhook
/channel/webhook
https://rest.messengerpeople.com/api/v16/channel/webhook
Activate / Deactivate / Test Webhook An active WebHook will be used to inform an external system whenever a new chat message is sent from a user to a channel.
Parameter Value Type Description url The URL of a webhook. All incoming messages will be pushed to this URL. It MUST return a JSON
{ "success": "true" }
Otherwise the webhook will be deactivated after some failed attempts.
boolean(0/1) Set active (
1
) or inactive (0
).email In case anything goes wrong, a notification will be sent to this email address.
string Comma separated list of fields to be included in the webhook call.
Possible fields:- id
- messenger
- usernumber
- date
- attachment
- attachment_type
- text
- welcome
- channelnumber
- userstatus
- chat_id
- bot_chatid
- is_retry
- ticket_id
- ticket_status
- agent_id
Default: "id,messenger,usernumber,date,attachment,attachment_type,text,welcome,channelnumber,userstatus,chat_id"
boolean(0/1) A test message is sent to the webhook to check whether everything works correctly.
If the parameter webhook_fields is set, the test data will be adjusted according to the field list
The push contains three messages (2 x WhatsApp, 1 x Facebook) in one call:{ "messages":[ { "id":"62103206", "messenger":"WB", "usernumber":"4917212345678", "date":"1522938174", "attachment":"", "attachment_type":"", "text":"Usermessage 1", "welcome":"0", "channelnumber":"4915792312345", "userstatus":"1", "chat_id":"1234567", "bot_chatid":"12345", "is_retry":"1" }, { "id":"62103207", "messenger":"WB", "usernumber":"4917212345678", "date":"1522938174", "attachment":"", "attachment_type":"", "text":"Usermessage 2", "welcome":"0", "channelnumber":"4915792312345", "userstatus":"1", "chat_id":"1234568", "bot_chatid":"12345", "is_retry":"0" }, { "id":"62103295", "messenger":"FB", "usernumber":"998694828505", "date":"1522938208", "attachment":"", "attachment_type":"", "text":"message via facebook", "welcome":"0", "userstatus":"1", "chat_id":"1234569", "bot_chatid":"12345", "is_retry":"0" } ] }
If the user is activated successfully by sending the chat, the field
welcome
has the value1
.
The field userstatus has the value-1
,0
or1
.-1
: The user sending the chat was delete0
: The user sending the chat is inactive1
: The user sending the chat is active
-
GET APIkey
/channel/apikey
https://rest.messengerpeople.com/api/v16/channel/apikey
Get the channel specific API key. This API key is valid until a new one is generated.
This method has no parameters. -
PUT APIkey
/channel/apikey
https://rest.messengerpeople.com/api/v16/channel/apikey
Generate a new API key. The previous API key is automatically invalidated.
This method has no parameters. -
GET Invoices
/channel/invoices
https://rest.messengerpeople.com/api/v16/channel/invoices
Get all invoices and payment URLs of the customer the channel belongs to.
This method has no parameters. -
GET Features
/channel/features
https://rest.messengerpeople.com/api/v16/channel/features
Get the info whether the channel uses content and the ticket system for customer support.
This method has no parameters.
Content (Newsletters/Campaigns)
-
GET List
/content
https://rest.messengerpeople.com/api/v16/content
List content
Parameter Value Type Description integer The ID of a single content.
string List only drafts if filter = "draft", scheduled if filter = "scheduled", content that is already published if filter = "published", or published and scheduled content of today (timezone Europe/Berlin) if filter = "today".
integer The maximum number of results.
integer The number of results skipped in the result set.
string Content lists are ordered by published date per default (creation date for drafts).
created
can be specified to order by this attribute.boolean(0/1) Normally content lists are sorted descending which means latest first.
boolean(0/1) Specifies whether click statistics should be returned for URLs in contents. Requires enabled click tracking in the channel.
The result shows the total number of clicks and the number of clicks for each messenger.boolean(0/1) Specifies whether reach statistics should be additionally split up in 'pulled from' and 'pushed to' for each messenger separately.
boolean(0/1) Specifies whether external content should be included.
boolean(0/1) Specifies whether error statistics for targeted users should be displayed. For each content the errors and the failed users are listed
-
GET Targeting Groups
/content/targeting
https://rest.messengerpeople.com/api/v16/content/targeting
Get all targeting groups that can be used for sending content. This includes all users, newsletter topics and targeting groups with active users.
This method has no parameters. -
POST External Content
V16/content/external
https://rest.messengerpeople.com/api/v16/content/external
Store external content that is sent already
Parameter Value Type Description string The text of the content.
url The url of a media attachment. The following types/extensions are supported: image (jpg, jpeg, png, gif), video (mp4, m4v, mpg, mpeg, mov, avi), audio (mp3, wav, ogg, opus) or document (pdf, docx etc).
string The original filename of the attachment.
json A JSON encoded array of user ids receiving the content grouped by messenger, e.g. {"WB" : [4912345678, 49234567890]}
string The name of the notification template
json A JSON array of parameters that are replaced in the notification
string The url of the header attachment. The following types/extensions are supported: image (jpg, png), video (mp4) or document (pdf). If the attachment is valid, a field called
reusable_attachment
is in the result, containing a cached URL for the sent file. Use this URL the next time for sending the same file to other users to improve the performance.string The text to be placed into the header variable
string The suffix added to a dynamic link button
string Language code of the notification, that should be send.
All available language codes can be found on the page https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates. -
POST Create
/content
https://rest.messengerpeople.com/api/v16/content
Create a new content
Parameter Value Type Description string The text of the content.
url The url of a media attachment. The following types/extensions are supported: image (jpg, jpeg, png, gif), video (mp4, m4v, mpg, mpeg, mov, avi), audio (mp3, wav, ogg, opus) or document (pdf, docx etc).
string The original filename of the attachment.
boolean(0/1) If set, store the content as draft, otherwise it will be published.
integer The UNIX timestamp of the publication date in seconds (if not a draft). The current date is used per default.
string A short text that is sent to inform the users about new content. This text is sent to the Notify app or to WhatsApp, if the user has no Notify app.
string If specified this link is opened directly from notifications in the Notify app. Other messengers will get the text + this weblink.
json A JSON encoded array of buttons can be passed. Each button must define a
caption
(displayed text), atype
(link or postback) and aninfo
field- Link must contain a URL.
- Postback a text send back to the server when the user clicks on it
Example:[ {"type":"link", "caption":"MessengerPeople", "info":"https:\/\/www.messengerpeople.com"}, {"type":"postback", "caption":"Hello","info":"Hello"} ]
Note: Buttons are sent differently to the various messengers.
integer NewsletterTopic ID 1-10 or ID of a targeting list.
integer The lifetime of the content after publishing in seconds.
integer The pull keyword used for pulling the content in WhatsApp.
string The name of the notification template
json A JSON array of parameters that are replaced in the notification
string The url of the header attachment. The following types/extensions are supported: image (jpg, png), video (mp4) or document (pdf). If the attachment is valid, a field called
reusable_attachment
is in the result, containing a cached URL for the sent file. Use this URL the next time for sending the same file to other users to improve the performance.string The text to be placed into the header variable
string The suffix added to a dynamic link button
string Language code of the notification, that should be send.
All available language codes can be found on the page https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates.json A targeting query to be used instead of a targeting_id.
integer Resending to failed users of another content. Content can be adapted
string A string forwarded to connectivity API for enterprise analytics
-
PUT Update
/content
https://rest.messengerpeople.com/api/v16/content
Update an existing content. For published content only the lifetime can be changed.
Parameter Value Type Description integer The content ID
string The text of the content.
url The url of a media attachment. The following types/extensions are supported: image (jpg, jpeg, png, gif), video (mp4, m4v, mpg, mpeg, mov, avi), audio (mp3, wav, ogg, opus) or document (pdf, docx etc).
string The original filename of the attachment.
boolean(0/1) If set, store the content as draft, otherwise it will be published.
integer The UNIX timestamp of the publication date in seconds (if not a draft). The current date is used per default.
string A special notification text sent to the Notify app.
string If specified this link is opened directly from notifications in the Notify app. Other messengers will get the text + this weblink.
json A JSON encoded array of buttons can be passed. Each button must define a
caption
(displayed text), atype
(link or postback) and aninfo
field- Link must contain a URL.
- Postback a text send back to the server when the user clicks on it
Example:[ {"type":"link", "caption":"MessengerPeople", "info":"https:\/\/www.messengerpeople.com"}, {"type":"postback", "caption":"Hello","info":"Hello"} ]
Note: Buttons are sent differently to the various messengers.
integer Newsletter Topic ID 1-10 or ID of a targeting list.
integer The lifetime of the content after publishing in seconds.
integer The pull keyword used for pulling the content in WhatsApp.
string The name of the notification template
json A JSON array of parameters that are replaced in the notification
string The url of the header attachment. The following types/extensions are supported: image (jpg, png), video (mp4) or document (pdf). If the attachment is valid, a field called
reusable_attachment
is in the result, containing a cached URL for the sent file. Use this URL the next time for sending the same file to other users to improve the performance.string The text to be placed into the header variable
string The suffix added to a dynamic link button
string Language code of the notification, that should be send.
All available language codes can be found on the page https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates.json A targeting query to be used instead of a targeting_id.
string A string forwarded to connectivity API for enterprise analytics
-
DELETE Delete
/content
https://rest.messengerpeople.com/api/v16/content
Delete an existing content that is not yet published
Parameter Value Type Description integer The ID of the content.
Targeting Groups
-
GET List
/targeting
https://rest.messengerpeople.com/api/v16/targeting
Get information about the available targeting groups
Parameter Value Type Description integer The ID of a single targeting group
boolean(0/1) Status Filter. Use
1
for listing only targeting groups that dont use a status filter and0
for listing targeting groups that filter inactive users. -
PUT Update
/targeting
https://rest.messengerpeople.com/api/v16/targeting
Update an existing targeting group
Parameter Value Type Description integer The targeting id
string The name of the targeting group
json A JSON array of the targeting group configuration
-
POST Create
/targeting
https://rest.messengerpeople.com/api/v16/targeting
Create a new targeting group
Parameter Value Type Description string The name of the targeting group
json A JSON array of the targeting group configuration
-
DELETE Delete
/targeting
https://rest.messengerpeople.com/api/v16/targeting
Delete an existing targeting group
Parameter Value Type Description integer The ID of the targeting group
-
GET Configuration
/targeting/config
https://rest.messengerpeople.com/api/v16/targeting/config
Get the targeting configuration values
This method has no parameters. -
GET Count
/targeting/count
https://rest.messengerpeople.com/api/v16/targeting/count
Get number of users for a targeting group. To be used with one of the two parameters.
Parameter Value Type Description integer The targeting id
json The targeting query.
Schema:
{"query": {
"condition": "OR",
"rules": [{
"id": "messenger",
"field": "messenger",
"type": "string",
"input": "select",
"operator": "equal",
"value": "FB"
}]}} -
GET User
/targeting/user
https://rest.messengerpeople.com/api/v16/targeting/user
Get user IDs of a targeting group by id or by query optionally grouped by messenger.
Parameter Value Type Description integer The targeting id
bool(0/1) Group the result by messenger
json The targeting query.
Schema:
{"query": {
"condition": "OR",
"rules": [{
"id": "messenger",
"field": "messenger",
"type": "string",
"input": "select",
"operator": "equal",
"value": "FB"
}]}}
Notification Templates
-
GET Details
/templates/{name}
https://rest.messengerpeople.com/api/v16/templates/{name}
Get a single template. If the name is omitted all templates are listed.
Parameter Value Type Description string The name of the template
bool Synchronize templates with WhatsApp before listing
-
POST Post
/templates
https://rest.messengerpeople.com/api/v16/templates
Create a new template
Parameter Value Type Description string The name of the template
string The category of the template
Valid values: 'ACCOUNT_UPDATE', 'PAYMENT_UPDATE', 'PERSONAL_FINANCE_UPDATE', 'SHIPPING_UPDATE', 'RESERVATION_UPDATE', 'ISSUE_RESOLUTION', 'APPOINTMENT_UPDATE', 'TRANSPORTATION_UPDATE', 'TICKET_UPDATE', 'ALERT_UPDATE', 'AUTO_REPLY'array An array of translations with the following JSON structure. Language and body_text are mandatory. Header parameter depend on the header type:
[ "en_US": { "language": "en_US", "body_text": "Text of the notification with parameter {{1}}", "header_type": "TEXT", <- one of TEXT, MEDIA "header_text": "Header text with parameter {{1}}", "header_media_type": "IMAGE", <- one of IMAGE, DOCUMENT, VIDEO, LOCATION "footer_text": "Footer text", "buttons": [ { <- up to 3 QUICK_REPLY buttons OR a URL and/or PHONE_NUMBER button "type": "QUICK_REPLY", <- one of QUICK_REPLY, URL, PHONE_NUMBER "text": "Button caption", <- "url": "https://foo.com/{{1}}", <- only for type URL. Parameter is optional. "phone_number": "0123456789", <- only for type PHONE_NUMBER } ], "sample": { <- sample data that helps WhatsApp in reviewing the template "body_variables": [ <- one for each used body variable "My variable 1", ], "header_media": "URL of media file", "header_variable": "My header variable", "button_variable": "Variable for dynamic URL button", }, }
bool In-App visibility of the template
-
PUT Update
/templates/{name}
https://rest.messengerpeople.com/api/v16/templates/{name}
Update a template
Parameter Value Type Description integer The id of the template
string The name of the template. Can only be changed if all translations are still in status DRAFT.
string The category of the template
Valid values: 'ACCOUNT_UPDATE', 'PAYMENT_UPDATE', 'PERSONAL_FINANCE_UPDATE', 'SHIPPING_UPDATE', 'RESERVATION_UPDATE', 'ISSUE_RESOLUTION', 'APPOINTMENT_UPDATE', 'TRANSPORTATION_UPDATE', 'TICKET_UPDATE', 'ALERT_UPDATE', 'AUTO_REPLY'
Can only be changed if all translations are still in status DRAFT.array An array of translations with the following JSON structure. language and body_text are mandatory. Header parameter depend on the header type:
[ "en_US": { "id": 12345, <- ID of existing translation "language": "en_US", "body_text": "Text of the notification with parameter {{1}}", "header_type": "TEXT", <- one of TEXT, MEDIA "header_text": "Header text with parameter {{1}}", "header_media_type": "IMAGE", <- one of IMAGE, DOCUMENT, VIDEO, LOCATION "footer_text": "Footer text", "buttons": [ { <- up to 3 QUICK_REPLY buttons OR a URL and/or PHONE_NUMBER button "id": 12345, <- ID of existing button "type": "QUICK_REPLY", <- one of QUICK_REPLY, URL, PHONE_NUMBER "text": "Button caption", <- "url": "https://foo.com/{{1}}", <- only for type URL. Parameter is optional. "phone_number": "0123456789", <- only for type PHONE_NUMBER } ], "sample": { <- sample data that helps WhatsApp in reviewing the template "body_variables": [ <- one for each used body variable "My variable 1", ], "header_media": "URL of media file", "header_variable": "My header variable", "button_variable": "Variable for dynamic URL button", }, }]
bool In-App visibility of the template
-
GET Validate template name
/templates/{name}/validate-name
https://rest.messengerpeople.com/api/v16/templates/{name}/validate-name
Check if a template name is not in use
Parameter Value Type Description string The name of the template
-
GET Get template status
/templates/{name}/review
https://rest.messengerpeople.com/api/v16/templates/{name}/review
Get the review status for each language of the template
Parameter Value Type Description string The name of the template
-
PUT Submit for Review
/templates/{name}/review
https://rest.messengerpeople.com/api/v16/templates/{name}/review
Submit all translations in status DRAFT to WhatsApp for review. Except those which are marked as skipped
Parameter Value Type Description integer The id of the template
string The name of the template. Can only be changed if all translations are still in status DRAFT.
string The category of the template
Valid values: 'ACCOUNT_UPDATE', 'PAYMENT_UPDATE', 'PERSONAL_FINANCE_UPDATE', 'SHIPPING_UPDATE', 'RESERVATION_UPDATE', 'ISSUE_RESOLUTION', 'APPOINTMENT_UPDATE', 'TRANSPORTATION_UPDATE', 'TICKET_UPDATE', 'ALERT_UPDATE', 'AUTO_REPLY'
Can only be changed if all translations are still in status DRAFT.array An array of translations with the following JSON structure. language and body_text are mandatory. Header parameter depend on the header type:
[ "en_US": { "id": 12345, <- ID of existing translation "skip": true, <- skip this translation from review "language": "en_US", "body_text": "Text of the notification with parameter {{1}}", "header_type": "TEXT", <- one of TEXT, MEDIA "header_text": "Header text with parameter {{1}}", "header_media_type": "IMAGE", <- one of IMAGE, DOCUMENT, VIDEO, LOCATION "footer_text": "Footer text", "buttons": [ { <- up to 3 QUICK_REPLY buttons OR a URL and/or PHONE_NUMBER button "id": 12345, <- ID of existing button "type": "QUICK_REPLY", <- one of QUICK_REPLY, URL, PHONE_NUMBER "text": "Button caption", <- "url": "https://foo.com/{{1}}", <- only for type URL. Parameter is optional. "phone_number": "0123456789", <- only for type PHONE_NUMBER } ], "sample": { <- sample data that helps WhatsApp in reviewing the template "body_variables": [ <- one for each used body variable "My variable 1", ], "header_media": "URL of media file", "header_variable": "My header variable", "button_variable": "Variable for dynamic URL button", }, }]
bool In-App visibility of the template
-
GET Get translation
/templates/{name}/translations/{lang}
https://rest.messengerpeople.com/api/v16/templates/{name}/translations/{lang}
Get the definition of a template translation
Parameter Value Type Description string The name of the template
string The language of the translation
-
GET Get translation status
/templates/{name}/translations/{lang}/review
https://rest.messengerpeople.com/api/v16/templates/{name}/translations/{lang}/review
Get the review status for a single translation of a template
Parameter Value Type Description string The name of the template
string The language of the translation
-
DELETE Delete
/templates/{name}
https://rest.messengerpeople.com/api/v16/templates/{name}
Delete a template with all its translations. Note: You can not use the name of the deleted template to create a new one until the deletion is processed by WhatsApp.
Parameter Value Type Description string The name of the template
string The language of the translation
Statistics
-
GET Notifications
/statistics/notifications
https://rest.messengerpeople.com/api/v16/statistics/notifications
Get statistics of all sent notifications. The output contains:
- template
Name of the notification template - total
Number of notification sent (regardless of the status) - total_sent
Number of notifications sent (without failures) - total_failed
Number of notifications failed sending - total_undelivered
Number of notifications sent, but not jet received by the recipient - total_delivered
Number of notifications sent and received by the recipient - total_read
Number of notifications sent and read by the recipient
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
- template
-
GET Conversations
V16/statistics/conversations
https://rest.messengerpeople.com/api/v16/statistics/conversations
Gets statistics of conversations by messenger
Parameter Value Type Description int UNIX timestamp of the start of the period, defaults to the last 30 days
int UNIX timestamp of the end of the period, defaults to now
string Unit of period interval, expected values: days, months
string Possible values json or csv.
-
GET RCS provider
V15/statistics/rcs_provider
https://rest.messengerpeople.com/api/v16/statistics/rcs_provider
Get statistics about the number of RCS user grouped by provider
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the timestamp of 2021-09-01
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET WhatsApp Conversations
V15/statistics/whatsapp_conversations
https://rest.messengerpeople.com/api/v16/statistics/whatsapp_conversations
Get information about monthly WhatsApp conversations and costs since February 2022. Costs of the current month are updated every night
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the beginning of the current month
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET KPI Translations
/statistics/kpi_translations
https://rest.messengerpeople.com/api/v16/statistics/kpi_translations
Get mapping of KPI names to understandable names in the language of the channel (or English if translation not available)
This method has no parameters. -
GET Clicks
/statistics/clicks
https://rest.messengerpeople.com/api/v16/statistics/clicks
Get statistics about clicks on URLs. Click tracking must be activated
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Filter the source of the URLS used for the clicks. Possible values: chats, content
string Output order of the click information in descending order. Possible values: time, clicks
string Possible values json or csv.
-
GET Automation
/statistics/automation
https://rest.messengerpeople.com/api/v16/statistics/automation
Get statistics about automation effects like chatbot usage and the amount of time saved by those
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET Labels
/statistics/labels
https://rest.messengerpeople.com/api/v16/statistics/labels
Get statistics about labels (tags) assigned to tickets.
Output example (note that an entry can have an empty body if no labels where used in this period):{ "1606076985": { <- timestamp "9482": { <- label id "id": 9482, <- label id "label": "example_label", <- label name "color": "FF9300", <- label color HEX value "count": 42 <- usage count for this period }, ... } }
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Unit of period interval, expected values: days, weeks
string Possible values json or csv.
-
GET Agents
/statistics/agents
https://rest.messengerpeople.com/api/v16/statistics/agents
Get statistics about all agents starting January 1st 2020.
This feature must be activated by MessengerPeople.
The output contains for each agent:- "Agent Id"
- "absolute_tickets_closed"
Number of closed tickets - "absolute_tickets_involved"
Number of tickets where the agent was involved - "outgoing_chats_in_ticket"
Number of sent chat messages in the tickets - "average_time_active_in_ticket"
Average time spent for answering the tickets
- "absolute_tickets_closed"
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
- "Agent Id"
-
GET Chat
/statistics/chats
https://rest.messengerpeople.com/api/v16/statistics/chats
Get overall statistics of chat messages
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET Content
/statistics/content
https://rest.messengerpeople.com/api/v16/statistics/content
Get statistics about the number of reached users starting December 7th 2019. The numbers are unique users per interval.
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Unit of period interval, expected values: days, weeks, months
string Possible values json or csv.
-
GET MAU Details
/statistics/mau_details
https://rest.messengerpeople.com/api/v16/statistics/mau_details
Get detailed statistics of monthly active users including time of first and last chat of each user in the period.
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Period of invoice, expected values: invoicing_period, last_invoicing_period
If set, this will overrule the parameters 'from' and 'to'string Possible values json or csv.
-
GET MAU
/statistics/mau
https://rest.messengerpeople.com/api/v16/statistics/mau
Get statistics of monthly active users optionally grouped by messenger.
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Period of invoice, expected values: invoicing_period, last_invoicing_period
If set, this will overrule the parameters 'from' and 'to'bool Group monthly active users by messenger
string Possible values json or csv.
-
GET Bot
/statistics/bot
https://rest.messengerpeople.com/api/v16/statistics/bot
Get statistics on incoming messages that are answered by the bot.
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET Custom
/statistics/custom
https://rest.messengerpeople.com/api/v16/statistics/custom
Get detailed statistics of different KPIs for tickets and chats
Parameter Value Type Description int UNIX timestamp of the start of the period, defaults to the last 30 days
int UNIX timestamp of the end of the period, defaults to now
string Return only the given KPI, run without to see all KPIs
string Specify the source of the statistics, expected values: chats, tickets
string Unit of period interval, expected values: hours, days, weeks
string Possible values json or csv.
-
GET Tickets
/statistics/tickets
https://rest.messengerpeople.com/api/v16/statistics/tickets
Get statistics of ticket usage
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET Chatblocks
/statistics/chat_blocks
https://rest.messengerpeople.com/api/v16/statistics/chat_blocks
Get usage statistics of chatblocks including number of user answers
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now
string Possible values json or csv.
-
GET Registered Agents
V16/statistics/registered_agents
https://rest.messengerpeople.com/api/v16/statistics/registered_agents
Get statistics of monthly registered agents and their login days
Parameter Value Type Description integer UNIX timestamp of the start of the period, defaults to the last 30 days
integer UNIX timestamp of the end of the period, defaults to now