Getting Started

Taximail allows you to configure webhooks so you can get near real-time updates to your system that track with various user actions. To do so, you will need to configure the destination of the webhook. Then, Taximail will send you an HTTP/HTTPS request when any of those events are created.

Adding

  • This API endpoint allows you to add a webhook to each list.
  • In the first step, you have to set the webhooks_url and webhooks_type.
  • In the following step, you need to send a POST request to list/{list_id}/webhooks API.
  • The Taximail API will return webhooks_id and webhooks_status.

POST https://api.taximail.com/v2/list/{list_id}/webhooks

Parameter Type Description Required
session_id string The session_id from Authentication API. Yes
webhooks_type enum {subscription,
unsubscription}
Event type of the integration. Yes
webhooks_url string URL of the web service. Yes

Example Request

POST v2/list/314/webhooks HTTP/1.1
Host: api.taximail.com

session_id=24bca90bac40b23e9fdcc8082299049d&webhooks_type=subscription&webhooks_url=https%3A%2F%2Fmy.webservice.com%2Fcallback_subscription

Example Result

{
  "status": "success",
  "code": 201,
  "data": {
              "webhooks_id": 49,
              "webhooks_status": "T"
       }
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.
data.webhooks_id integer The webhooks_id of new webhooks.
data.webhooks_status string The status check if Taximail can connect webhooks url.

Response Code

Code Result Description
201 success The new resource was created successfully.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.
403 error Trigger endpoint url is over limit.
404 error The list not found.

Webhooks detail

  • This API endpoint allows you to get details about webhooks.
  • You can send GET request to list/{list_id}/webhooks API.

GET https://api.taximail.com/v2/list/{list_id}/webhooks

Parameter Type Description Required
session_id string The session_id from Authentication API. Yes

Example Request

GET v2/list/314/webhooks?session_id=24bca90bac40b23e9fdcc8082299049d HTTP/1.1
Host: api.taximail.com

Example Result

{
  "status": "success",
  "code": 200,
  "data": {
            "webhooks_mode": "custom",
            "webhooks_status": "enable",
            "urls": [
                  {
                        "webhooks_id": 45,
                        "webhooks_type": "subscription",
                        "url": "https://my.webservice.com/callback_subscription"
                  },
                  {
                        "webhooks_id": 46,
                        "webhooks_type": "unsubscription",
                        "url": "https://my.webservice.com/callback_unsubscription"
                  }
            ]
       }
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.
data.urls array Returns array of information webhooks.

Response Code

Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.
404 error The list not found.

Deleting

  • This API endpoint allows you to delete webhooks.
  • You need to send DELETE request to list/{list_id}/webhooks/{webhooks_id} API.

DELETE https://api.taximail.com/v2/list/{list_id}/webhooks/{webhooks_id}

Parameter Type Description Required
session_id string The session_id from Authentication API. Yes

Example Request

DELETE v2/list/314/webhooks?session_id=24bca90bac40b23e9fdcc8082299049d HTTP/1.1
Host: api.taximail.com

Example Result

{
  "status": "success",
  "code": 200
}

Fields

Name Type Description
status enum {success, error} Returns the status of the result.
code integer Returns the response code of the result.
err_msg string When error occur, returns the error's detail of the result.

Response Code

Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id expired.
404 error The list not found.
The webhooks not found.
Title
Title SEO [Optional]
Description SEO [Optional]
Friendly URL [Optional]
IFRAME Content [Optional]
Priority
Markdown
We use cookies
This website uses cookies to enhance your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from. You can manage your preferences by clicking Change Preferences. Learn more about this on Cookie policy
Change Preferences
Accept All