RelayAPI

Create a campaign

POST
/v1/ads/campaigns
AuthorizationBearer <token>

API key (rlay_live_* or rlay_test_*)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.relayapi.dev/v1/ads/campaigns" \  -H "Content-Type: application/json" \  -d '{    "ad_account_id": "string",    "name": "string",    "objective": "awareness"  }'
{
  "data": {
    "id": "string",
    "ad_account_id": "string",
    "platform": "meta",
    "platform_campaign_id": "string",
    "name": "string",
    "objective": "string",
    "status": "draft",
    "daily_budget_cents": 0,
    "lifetime_budget_cents": 0,
    "currency": "string",
    "start_date": "2019-08-24T14:15:22Z",
    "end_date": "2019-08-24T14:15:22Z",
    "is_external": true,
    "ad_count": 0,
    "metrics": {
      "impressions": 0,
      "reach": 0,
      "clicks": 0,
      "spend_cents": 0,
      "conversions": 0,
      "ctr": 0,
      "cpc_cents": 0,
      "cpm_cents": 0
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}

Found something wrong? Help us improve this page.

Submit an Issue
Requires a GitHub account.View repo