---
title: "Create a campaign"
method: POST
path: "/api/campaigns"
tags: ["Campaigns"]
---

# Create a campaign

`POST /api/campaigns`

## Request

- Base URL: `https://api.payware.eu`
- URL: `https://api.payware.eu/api/campaigns`
- Auth: HTTP bearer

## Request body

- CampaignRequest
  - `name` string, required: Campaign name, up to 100 characters
  - `startsOn` string: First day, YYYY-MM-DD
  - `endsOn` string: Last day, YYYY-MM-DD
  - `status` string: DRAFT, ACTIVE or ENDED. Descriptive: it does not switch placements on or off
  - `externalRef` string: An agency's own campaign code, up to 100 characters

## Response `201`

Created

## Other responses

- `400`: Invalid campaign
- `401`: Unauthenticated - missing, malformed or expired credentials
- `403`: Forbidden - the caller is authenticated but not permitted (plan or capability gate, KYC state, or tenant scope)
- `429`: Too many requests - the caller exceeded its per-partner rate limit. Carries errorCode ERR_RATE_LIMIT_EXCEEDED and a Retry-After header, in seconds. The request was not processed, so the identical request is safe to retry once the window has passed.

---

[API](https://skmtc.dev/payware/apis/payware-api.md) · [All operations](https://skmtc.dev/payware/apis/payware-api/llms.txt) · [OpenAPI document](https://skmtc.dev/payware/apis/payware-api/revisions/7b3352ca947b?raw)
