Campaign

Query campaigns

Queries campaigns within the given project.

get/v1/projects/{project_id}/campaigns

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/campaigns
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

project_idstring required

ID of the Project

Query parameters

namestring

Filter campaigns by name

status'draft' | 'scheduled' | 'sent' | 'pending_review'

Filter campaigns by status

campaign_type'broadcast_text' | 'broadcast_call' | 'broadcast_svc' | 'relative' | 'anniversary'

Filter campaigns by type

group_idstring

ID of Group

Filter campaigns by the recipient group

label_idstring

ID of Label

Filter campaigns by an associated label

solution_idstring

ID of Solution

Filter campaigns by the solution they belong to

time_created[min]integer

Unix timestamp in seconds

Filter campaigns created on or after a particular time

time_created[max]integer

Unix timestamp in seconds

Filter campaigns created before a particular time

schedule_time[min]integer

Unix timestamp in seconds

Filter broadcast campaigns scheduled on or after a particular time

schedule_time[max]integer

Unix timestamp in seconds

Filter broadcast campaigns scheduled before a particular time

sort'default' | 'name' | 'schedule_time'

Sort the results based on a field

sort_dir'asc' | 'desc'

Sort the results in ascending or descending order

page_sizeinteger

Number of results returned per page (max 500)

offsetinteger

Number of items to skip from beginning of result set

markerstring

'next_marker' property returned by a previous call to this API method, indicating where the next page of results should start.

countboolean

If true, the API will return the count of items matching the filter, instead of the items themselves

Response

Successful response. When count=1 parameter is provided, returns {"count": N} instead.

truncatedboolean

True if there are more results

next_markerstring

Marker for pagination

page_sizeinteger

Number of results per page

sort_dir'asc' | 'desc'

Sort direction

countinteger

Total count of matching items (only when count=1 parameter is provided)

Example response

{
  "data": [
    {
      "id": "CM2ad0100821a98bea",
      "name": "Test Campaign",
      "campaign_type": "broadcast_text",
      "status": "draft",
      "group_id": "CG02139128391fa",
      "route_id": "RT2a586298d3412adf",
      "broadcast_id": "MB2489812e59c5c781",
      "estimated_count": 12942,
      "message_count": 8358,
      "solution_id": "SO2ad0100821a98bea",
      "schedule_mode": "immediate",
      "content": "Hello world",
      "service_id": "SV3d246818d0e3d1fb",
      "message_type": "sms",
      "timezone_id": "America/Los_Angeles",
      "time_created": 1390348075,
      "time_updated": 1390348075,
      "url": "https://telerivet.com/p/asdf/campaign/CM2ad0100821a98bea",
      "url_edit": "https://telerivet.com/p/asdf/campaign/CM2ad0100821a98bea/edit",
      "url_send": "https://telerivet.com/p/asdf/campaign/CM2ad0100821a98bea/preview",
      "user_id": "URba3e403e98f49735",
      "project_id": "PJ2ad0100821a98bea"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.