Back

SendPulse API Essential Guide

Aug 16, 20246 minute read

What type of API does SendPulse provide?

SendPulse uses a REST API. The key points are:

  1. SendPulse has a REST API that works over the HTTPS protocol.

  2. The SendPulse REST API uses a set of methods to perform requests and receive responses for each operation.

  3. All responses from the SendPulse API return in the form of JSON structures.

Some characteristics of REST APIs include:

  • Stateless: Each request contains all necessary information to process it.
  • Resource-based: Resources are identified by unique URIs and accessed using standard HTTP methods.
  • Uniform interface: Standardized set of methods and response formats.
  • Cacheable: Responses can be cached to improve performance.

Does the SendPulse API have webhooks?

Yes, the official SendPulse API does have webhooks. Here are the key points about SendPulse's webhook functionality:

Types of Events You Can Subscribe To

SendPulse offers webhooks for various services, including email, SMTP, and chatbots. The events you can subscribe to include:

For Email service:

  • Email marked as spam
  • Email opened
  • Link in the email clicked
  • New subscriber
  • Subscriber unsubscribed
  • Subscriber deleted from the list
  • Email delivered
  • Campaign status changed
  • Soft bounces
  • Hard bounces

For SMTP service:

  • Delivered
  • Not delivered
  • Open
  • Click on a link
  • Marked as spam
  • Unsubscribed
  • Resubscribed
  • Hard bounces
  • Soft bounces

For Chatbots:

  • Bot subscription
  • Incoming messages
  • Outbound messages
  • Opened live chat
  • Launched custom trigger flow
  • Redirect
  • Bot unsubscribe
  • Bot blocked

How to Enable Webhooks

  1. For Email and SMTP services:

    • Go to Account Settings in the API tab
    • Click "Create a webhook"
    • Select the events you want to trigger the webhook
    • Specify the URL where you want to receive the webhook data
  2. For Chatbots:

    • You can enable global webhooks in the bot settings under the Webhooks tab
    • You can also add webhooks to specific elements in the chatbot flow builder

Webhook Data Format

SendPulse sends webhook data as POST requests with JSON data. The exact structure of the data varies depending on the service and event type, but generally includes information such as:

  • Timestamp of the event
  • Event type
  • Relevant IDs (e.g., task ID, message ID)
  • Email address or user information
  • Additional event-specific data

Best Practices

  • Webhooks are sent every minute or when a limit of events is reached (e.g., 100 events for email, 500 for SMTP)
  • Make sure your webhook endpoint can handle the expected volume of requests
  • Implement proper security measures to validate incoming webhook requests

By using SendPulse's webhook functionality, you can integrate real-time event data from your SendPulse campaigns into your own systems and workflows.

Rate Limits and other limitations

Here are the key points about the API Rate Limits of the SendPulse API:

General Quota Limits

SendPulse has different rate limits based on the pricing plan category:

  • Free plans:

    • 1,000 requests per minute
    • 500,000 requests per day
  • Standard plans:

    • 2,000 requests per minute
    • 1 million requests per day
  • Enterprise plans:

    • 3,000 requests per minute
    • 3 million requests per day

Exceeding Quota Limits

If you exceed the quota limits, the API will return a 429 "Too many requests" error. To increase your limits, you need to upgrade to a higher pricing plan.

Specific Endpoint Limits

Some specific endpoints have their own dedicated rate limits:

  • POST /v3/smtp/email and GET /v3/smtp/blockedContacts:

    • General: 3,600,000 requests per hour / 1,000 requests per second
    • Enterprise: 7,200,000 requests per hour / 2,000 requests per second
  • POST /v3/transactionalSMS/sms:

    • General: 540,000 requests per hour / 150 requests per second
    • Enterprise: 720,000 requests per hour / 200 requests per second
  • POST /v3/events:

    • General: 36,000 requests per hour / 10 requests per second
    • Enterprise: 72,000 requests per hour / 20 requests per second

Other Endpoints

For other endpoints not specifically mentioned:

  • General plans: 100 requests per hour
  • Enterprise plans: 200 requests per hour

Best Practices

To prevent API requests from being rejected:

  1. Properly calculate your rate limit allowance and distribute requests evenly over the specified time period.
  2. Consider upgrading to a higher rate limit tier if your application needs to scale.
  3. For fetching statistics, consider implementing an event-driven mechanism using SendPulse's webhook platform.

Rate Limit Headers

When receiving a 429 status code, the API provides headers with information about the rate limit:

  • x-sib-ratelimit-limit: The limit of requests before a 429 status code
  • x-sib-ratelimit-remaining: The remaining limit of requests
  • x-sib-ratelimit-reset: Shows the unit in the granularity the rate limit is set

By understanding and adhering to these rate limits, you can ensure smooth integration with the SendPulse API while avoiding request rejections due to exceeding quotas.

Latest API Version

Based on the search results provided, I could not find a definitive answer about the most recent version of the SendPulse API. However, I can provide some relevant information based on the available data:

The most recent release mentioned in the search results is version 2.0.1.1, which was released on October 25th [5]. This release appears to be for the PHP library that interacts with the SendPulse API, rather than the API itself.

Key points to consider:

  1. The SendPulse API seems to be actively maintained, with several recent releases for their PHP library [5].

  2. The API documentation provided in the search results does not specify a version number for the API itself [4].

  3. The base URL for the API is https://api.sendpulse.com/ [4].

  4. The API supports various functionalities including email campaigns, SMS, and automation [4].

Best practices:

  1. When working with the SendPulse API, it's recommended to use the most recent version of their official SDK or library for your programming language.

  2. Always refer to the official SendPulse documentation for the most up-to-date information on API endpoints and functionality.

  3. If you need to know the exact version of the API you're working with, it's best to contact SendPulse support directly for the most accurate and current information.

While I couldn't provide the specific version number you asked for, this information should give you a general idea of the API's current state and where to look for the most recent updates.

How to get a SendPulse developer account and API Keys?

  1. Sign up for a SendPulse account:

    • Go to the SendPulse website (sendpulse.com) and create a new account if you don't already have one.
  2. Access your API credentials:

    • Log in to your SendPulse account
    • Go to your account settings
    • Navigate to the "API" tab
  3. Obtain your API credentials:

    • In the API tab, you'll find your Client ID and Client Secret
    • These credentials are required to authenticate your API requests
  4. Review the API documentation:

    • SendPulse provides comprehensive API documentation on their website
    • Familiarize yourself with the available API methods and how to use them
  5. Choose an integration method:

    • You can use SendPulse's official API libraries for various programming languages (PHP, Python, Ruby, Java, Node.js, C#, Go)
    • Alternatively, you can make direct HTTP requests to the API endpoints
  6. Authenticate your requests:

    • Use your Client ID and Client Secret to obtain an access token
    • Include this token in the header of your API requests

What can you do with the SendPulse API?

Based on the search results provided, here is a list of data models you can interact with using the SendPulse API, along with what is possible for each:

Mailing Lists

  • Create new address books/mailing lists
  • Get information about existing mailing lists
  • Upload email addresses to mailing lists
  • Manage subscribers in mailing lists

Campaigns

  • Create email campaigns
  • Get information and statistics about campaigns
  • Schedule campaigns
  • Send test emails

Templates

  • Upload email templates
  • Manage and edit templates

Senders

  • Add and manage sender addresses

Subscribers

  • Add/remove subscribers
  • Update subscriber information
  • Get subscriber details

Blacklists

  • Add/remove email addresses to blacklists
  • Get blacklist information

Account

  • Check account balance
  • Get account information

Automated Email Series

  • Create automated email sequences
  • Manage and edit automated series

Statistics

  • Retrieve campaign statistics
  • Get subscriber engagement data

Webhooks

  • Set up webhooks for various events

The SendPulse API allows you to programmatically interact with most core features of the email marketing platform, enabling automation and integration with other systems [1]. The API uses REST architecture and returns responses in JSON format [1]. There are also client libraries available in various programming languages to simplify API usage [1].