Markit AI LogoMarkit | Docs
Markit API

Texting

The Texting resource allows you to retrieve campaigns and mass texts on your account. The following actions can be performed on this resource.

  • Retrieve All Campaigns
  • Retrieve a Single Campaign
  • Retrieve all Mass Texts
  • Retrieve a Single Mass Text

Retrieve All Campaigns

Retrieves all campaigns associated with your account. If you want to retrieve the mass texts from a specific campaign, use the campaignId to fetch the mass texts. We will be adding functionality in the future to handle fetching the mass texts from all campaigns. The default number of campaigns is 20.

    GET https://api.markitai.com/v1/texting

You can include additional parameters in the request as described in the Query Parameters section.

Available query parameters:

  • limit: 20 (default)
  • offset: 0 (default)
  • createdAt: ‘desc’ | ‘asc’ (default = ‘desc’)
    GET https://api.markitai.com/v1/texting?createdAt=asc

Example Response:

{
  "data": [
    {
      "id": "123456",
      "createdAt": "2024-11-05T00:00:00.000Z",
      "createdBy": "abc123",
      "eventId": "",
      "initialTextId": "111111",
      "title": "My First Campaign",
      "updatedAt": "2024-01-01T-00:00:00.000Z",
    },
    ...
  ],
  "pagingData": {
    "prevPage": null,
    "currentPage": 1,
    "nextPage": 2,
    "hasMore": true
  }
}

Retrieve a Single Campaign

Retrieves a campaign, with references to the mass text IDs within the campaign. To retrieve the mass text data, use the ID to retrieve the related data. Or refer to the Retrieve all Mass Texts section.

    GET https://api.markitai.com/v1/texting/{id}

Example Response:

{
  "campaign": {
    "id": "123456",
    "createdAt": "2024-11-05T00:00:00.000Z",
    "createdBy": "abc123",
    "eventId": "",
    "initialTextId": "111111",
    "title": "My First Campaign",
    "updatedAt": "2024-01-01T-00:00:00.000Z",
    "massTextIds": ["123", "456", "789"]
  }
}

Retrieve All Mass Texts in a Campaign/Automation

Retrieves all mass texts within a campaign or automation. If you want to get insight regarding delivery state, send rate, and attached link opens/conversions of a specific mass text, you should retrieve a single mass text. We will handle adding functionality in the future to retrieve this data here. The default number of mass texts is 20.

    GET https://api.markitai.com/v1/texting/{campaignId}/massTexts

You can include additional parameters in the request as described in the Query Parameters section.

Available query parameters:

  • limit: 20 (default)
  • offset: 0 (default)
  • createdAt: ‘desc’ | ‘asc’ (default = ‘desc’)
  • send_type: ‘all’ | ‘immediate’ | ‘scheduled’ (default = ‘all’)

Example Response:

{
  "data": [
    {
      "id": "123456",
      "campaignId": "c123",
      "createdAt": "2024-11-05T00:00:00.000Z",
      "message": "This is my text.",
      "mediaUrl": "",
      "queued": true,
      "scheduled": true,
      "sentAt": "2024-11-05T00:00:00.000Z",
      "sentAtOffset": 0,
      "sentBy": "abc123",
      "type": "Mass Text",
    },
    ...
  ],
  "pagingData": {
    "prevPage": null,
    "currentPage": 1,
    "nextPage": 2,
    "hasMore": true
  }
}

Retrieve a Single Mass Text in a Campaign/Automation

Retrieves a mass text within a campaign or automation. Returns relevant data such as the delivery state (time remaining), send rate of the delivered/failed messages, and opens/conversions for attached links within the message.

    GET https://api.markitai.com/v1/texting/{campaignId}/massTexts/{id}

Example Response:

{
  "massText": {
    "id": "123456",
    "campaignId": "c123",
    "createdAt": "2024-11-05T00:00:00.000Z",
    "message": "This is my text.",
    "mediaUrl": "",
    "queued": true,
    "scheduled": true,
    "sentAt": "2024-11-05T00:00:00.000Z",
    "sentAtOffset": 0,
    "sentBy": "abc123",
    "type": "Mass Text",
    "deliveryState": "delivered",
    "sendRate": "100%"
  }
}

Delete a Scheduled Mass Text

Deletes an existing scheduled mass text with the ID equal to {id}. The ID can be found using the retrieve all mass texts endpoint.

    DELETE https://api.markitai.com/v1/texting/{campaignId}/massTexts/{id}

On this page