← All tags

Campaigns API Reference

Endpoints to manage campaigns via the REST API.

5 endpoints tagged campaigns, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List campaigns for an organization

GET /orgs/{org}/campaigns

Lists campaigns in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
directionquerynoThe direction to sort the results by.
statequerynoIf specified, only campaigns with this state will be returned.
sortquerynoThe property by which to sort the results.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
503Service unavailableyes

Create a campaign for an organization

POST /orgs/{org}/campaigns

Create a campaign for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
404Resource not foundyes
422Unprocessable Entityyes
429Too Many Requestsno
503Service unavailableyes

Get a campaign for an organization

GET /orgs/{org}/campaigns/{campaign_number}

Gets a campaign for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
campaign_numberpathyesThe campaign number.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Unprocessable Entityyes
503Service unavailableyes

Update a campaign

PATCH /orgs/{org}/campaigns/{campaign_number}

Updates a campaign in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
campaign_numberpathyesThe campaign number.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
404Resource not foundyes
422Unprocessable Entityyes
503Service unavailableyes

Delete a campaign for an organization

DELETE /orgs/{org}/campaigns/{campaign_number}

Deletes a campaign in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
campaign_numberpathyesThe campaign number.

Responses

StatusDescriptionHas JSON body
204Deletion successfulno
404Resource not foundyes
503Service unavailableyes