---
title: "Create Campaign"
method: POST
path: "/api/v1/admin/marketing/campaigns"
tags: ["Admin: Маркетинг"]
---

# Create Campaign

`POST /api/v1/admin/marketing/campaigns`

## Request

- Base URL: `https://api.food24.kz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.food24.kz/api/v1/admin/marketing/campaigns`
- Auth: OAuth 2
  - Password
  - Token URL: `/api/v1/auth/login`
- TypeScript: <https://skmtc.dev/food24/apis/goodfood/docs/api/v1/admin/marketing/campaigns/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- DiscountCampaignCreate
  - `name` string, required
  - `location_id` integer, nullable
  - `discount_pct` number, nullable
  - `round_down` boolean
  - `time_from` string, nullable
  - `time_to` string, nullable
  - `is_active` boolean
  - `category_ids` integer[]
  - `badge_text` string, nullable
  - `badge_bg` string, nullable
  - `badge_color` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/food24/apis/goodfood.md) - [All operations](https://skmtc.dev/food24/apis/goodfood/llms.txt) - [OpenAPI document](https://skmtc.dev/food24/apis/goodfood/revisions/f75c731597d3?raw)
