distribution.techdistribution.tech

API reference, Campaigns

Your campaigns and where each stands

GET /campaigns

Scope: campaigns:read.

Overview

Scope: campaigns:read.

Endpoint
GET https://app.distribution.tech/api/v1/campaigns
Scope
campaigns:read
Changes data
No, a read

Parameters

Parameters of GET /campaigns
NameInTypeRequiredDescription
include_archivedquerybooleanNoArchived campaigns are left out unless this is true (DT-135). The only parameter: the list is every campaign, so limit, offset or any other parameter is a 400.

Request with curl

Set DISTRIBUTION_API_KEY to a key from Developers with the campaigns:read scope, and each path variable to an id from an earlier answer. The body carries the required fields.

curl
curl "https://app.distribution.tech/api/v1/campaigns" \
  -H "Authorization: Bearer $DISTRIBUTION_API_KEY"

Response

200 OK. The body has these fields:

Response fields of GET /campaigns
NameTypeRequiredDescription
campaignsarray of objectYes
200 response body, every field with its type
{
  "campaigns": [
    {
      "id": "<uuid>",
      "display_name": "<string>",
      "company": "<string>",
      "product": "<string>",
      "objective": "<string>",
      "created_at": "<date-time>",
      "plan_status": "awaiting_approval",
      "open_change": false,
      "intent_status": "draft",
      "stage_id": "draft",
      "stage": "Draft",
      "waits_on_you": false,
      "refunded_at": "<date-time>",
      "archived_at": "<date-time>"
    }
  ]
}

Errors

Error statuses of GET /campaigns
StatusWhen
400A parameter this list does not take (limit, offset or any other), or include_archived that is not true or false: details.problems names each one. Since 1.9.0; before, such a parameter was ignored.
401No API key, an unknown one, or a revoked one.
403The key does not have this endpoint's scope.
429Too many requests for this key in the current minute (60); Retry-After and RateLimit-Reset say when to try again. On POST /campaigns and on POST /plans/current/lines when it starts a plan: the brand's 3 new campaigns in 24 hours are used (details.reason daily_campaign_limit); details.resets_at and Retry-After say when the limit reopens, a rolling 24 hours from the first of them, not a calendar day; archiving or deleting a campaign does not give its slot back. On GET /creators and GET /creators/{id}: a creator read limit is used (details.reason per_minute, daily_lists, daily_reveals, daily_seen or locked). daily_seen is your workspace's one pool of 300 creator views a day (300 different creators shown or opened since midnight UTC), shared by the app and every API key of the brand: details.scope workspace and details.limit 300; a creator already seen today, in the app or through any key, still opens and costs nothing. The other reasons are this key's own limit (details.scope key) or the brand's ceiling over all its keys (details.scope api).
500internal: the request failed on our side. Try again.
503unavailable: the service or this part of it is not reachable right now. Try again shortly.

Get access

Keys are created in Developers once your brand is approved. Connect an agent to ask for access, then read the agent guide for the full flow.