In Sarbacane Campaigns, the REST API lets developers manage your contact lists and blacklists (unsubscribes, bounces, complaints) and retrieve the statistics of your email and SMS campaigns without logging in to the application. It works with standard HTTP requests: GET to retrieve data, POST to add data, PUT to modify it and DELETE to delete it. Each tool connects with an API key, created in Settings › API & webhooks.
A Sarbacane Campaigns Premium subscription or higher.
Be the account owner or an administrator, or a user with this right in Authorizations.
In the left menu of Sarbacane Campaigns, click Settings, then API & webhooks.
In the API tab, check that the The Sarbacane API is activated switch is on.
On the Add a new API key line, click Create.
In Description, enter the name of the tool that will use the key.
To restrict the use of the key to certain IP addresses, click Add an IP and enter the address. This step is optional.
Click Save.
Note: the full documentation (authentication with the Account ID and the key, list of requests, cURL examples) is available at https://developers.sarbacane.com, also accessible with the API documentation button. The examples can be adapted to most languages: PHP, Node.js, Ruby, Python, Java, Go or C#.
Best practice: create one key per tool, named after the tool. You can then delete one without cutting off the others.
The key appears in the list with its description. The Account ID, shown at the top of the tab, and the documentation (API documentation) complete the information your developer needs.
Create a new key, replace it in your tools, then delete the old one (••• menu, Remove).
If the key is restricted to certain IP addresses, check that your tool's address is in the list (••• menu, Edit).