Messaging API
You can use the Messaging API to send HTTP POST requests that contain all of the information needed to create Zinc Messages that you can address to users or Groups. Message data is sent as a JSON payload in the request body.
To use the Messaging API, you must first create a Bot in an Official Group on the relevant Group Settings page in the Admin Console. Bots have unique IDs that support receiving and forwarding HTTP message requests. Messages sent via HTTP endpoints for Bots appear in Zinc conversations with the Bots shown as senders. Because Bots are associated with Official Groups, if you do not explicitly specify recipients in the request body, Messages are sent to the relevant Official Group. Optionally, to override this behavior, you can specify a list of email addresses for the target Zinc users in the request body to deliver Messages to individual users in ad hoc Conversations.
Any users who have the unique API endpoint URLs for Bots can send Messages via those Bots. Like Bot email addresses, these endpoints contain an unguessable string of random characters to keep them unique and private, but anyone who has the appropriate URLs can send Messages by using Bots.
|
There is no maximum limit on the number of Messages that you can send via the Messaging API. However, overall API request limits still apply for your Zinc tenant.
|
To use this API, you send Message data in a JSON body of an HTTP POST request. The request must include a body attribute that contains the Message body. Optionally, you can specify a recipients attribute that includes an array of email addresses, which overrides the default behavior where Messages are sent to the Official Group with which the Bot is associated
Examples
POST https://api.zincit.io/hooks/v1/:id/message
{
"body": "hello world."
}
This API call sends a Message with the text hello world to the Official Group associated with the Bot whose identification token is specified in the :id parameter.
|
To find the identification token for a Bot, navigate to the Group Settings page for its associated Official Group in the Zinc Admin Console. For more information, see Creating a Bot.
|
POST https://api.zincit.io/hooks/v1/:id/message
{
"recipients": ["address@example.com", "another.address@example.com"],
"body": "hello world."
}
This API call sends a Message with the text hello world to Zinc users whose email addresses are address@example.com and another.address@example.com. Recipients are not required to be members of the Official Group with which the Bot is associated, as long as they belong to the same Organization as the specified Bot. If you specify email addresses for users who are not in the same Organization as the Bot, no Messages are sent to those users.
For more information: