Documentation

  1. Home
  2. /
  3. Docs
  4. /
  5. weMail
  6. /
  7. Developer Docs
  8. /
  9. weMail API Documentation

weMail

⌘K

weMail API Documentation

The weMail API allows developers to manage mailing lists, subscribers, tags, and campaigns programmatically. By using the API, you can automate various tasks such as creating and managing subscribers, organizing them with tags, and retrieving information about campaigns.

To start using the weMail API, you’ll need to generate an API key from your weMail dashboard.

We’ve a dedicated weMail Developer documentation page

Getting Started

1. Generate API Key

To interact with the weMail API, you need to obtain an API key:

  1. Log in to your WordPress dashboard.
  2. Navigate to weMail → Settings.
  3. Go to the API Keys tab.
  4. Click on Generate API Key.
  5. Copy and store the API key securely. You’ll need it to authenticate your API requests.

2. Base URL

All API requests should be made to the following base URL:

https://yourdomain.com/wp-json/wemail/v1/

Replace yourdomain.com with your actual domain name.

3. Authentication

Include your API key in the X-API-KEY header for every request.

Example:

X-API-KEY: <weMail-API-Key>

Endpoints

Lists

  • GET /lists Retrieve a list of all mailing lists. Example Request:
  GET /lists

Subscribers

  • POST /lists/{list_id}/subscribers Create a new subscriber in a specific list. Example Request:
  POST /lists/{list_id}/subscribers
  {
    "email": "[email protected]",
    "name": "John Doe"
  }
  • DELETE /lists/{list_id}/subscribers/{subscriber_id} Remove a subscriber from a specific list. Example Request:
  DELETE /lists/{list_id}/subscribers/{subscriber_id}
  • GET /lists/{list_id}/subscribers/{subscriber_id}/tags Retrieve tags associated with a subscriber in a list. Example Request:
  GET /lists/{list_id}/subscribers/{subscriber_id}/tags
  • POST /lists/{list_id}/subscribers/{subscriber_id}/tags Add or remove tags from a list subscriber. If a tag that does not exist is passed in and use_id is set to false, a new tag will be created. Example Request:
  POST /lists/{list_id}/subscribers/{subscriber_id}/tags
  {
    "tags": ["Tag Name 1", "Tag Name 2"]
  }
  • PATCH /lists/{list_id}/subscribers/{subscriber_id}/tags Remove specific tags from a subscriber. Example Request:
  PATCH /lists/{list_id}/subscribers/{subscriber_id}/tags
  {
    "tags": ["Tag Name"]
  }

Tags

  • GET /lists/{list_id}/tags Retrieve all tags in a specific list. Example Request:
  GET /lists/{list_id}/tags
  • POST /lists/{list_id}/tags Create a new tag in a list. Example Request:
  POST /lists/{list_id}/tags
  {
    "name": "New Tag Name"
  }
  • PUT /tags/{tag_id} Update an existing tag. Example Request:
  PUT /tags/{tag_id}
  {
    "name": "Updated Tag Name"
  }
  • DELETE /tags/{tag_id} Delete a specific tag. Example Request:
  DELETE /tags/{tag_id}

Campaigns

  • GET /campaigns Retrieve a list of completed standard campaigns from the last 3 months. Example Request:
  GET /campaigns

Explore Comprehensive Developer Documentation

This documentation provides an overview of the weMail API endpoints and how to interact with them. For more detailed information on the parameters and specific use cases, refer to the full API documentation provided by weMail.

How can we help?

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We got your message

We will reply to you very soon :)