---
title: "[Internal] Update a campaign"
method: PATCH
path: "/api/campaigns/{slug}"
tags: ["Campaigns"]
---

# \[Internal\] Update a campaign

`PATCH /api/campaigns/{slug}`

## Request

- Base URL: `https://api.typless.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.typless.com/api/campaigns/{slug}`
- Auth: none declared

Partially update a campaign. Platform admins only.

Deactivating a live campaign is `{"is_active": false}`; the slug itself is
immutable, see UpdateCampaignRequest.

## Path parameters

- `slug` string, required

## Request body

- UpdateCampaignRequest: Partial update. Omitted fields are left untouched. `slug` is absent on purpose: it is the identity the frontend namespaces dismiss state under, so renaming it would re-show the toast to every user who had dismissed it. Use POST to publish a new campaign instead. Note the asymmetry for nullable fields -- omitting `image_url` keeps the current value, whereas sending `null` clears it. That is the whole reason this uses the Unspecified sentinel rather than plain optionals.
  - `title` union, required
    - object
    - 'UNSPECIFIED'
  - `body` union, required
    - object
    - 'UNSPECIFIED'
  - `cta_label` union, required
    - object
    - 'UNSPECIFIED'
  - `cta_href` union, required
    - string
    - 'UNSPECIFIED'
  - `icon` union, required
    - string
    - 'UNSPECIFIED'
  - `image_url` union, required
    - string
    - 'UNSPECIFIED'
  - `is_active` union, required
    - boolean
    - 'UNSPECIFIED'
  - `valid_from` union, required
    - string, date-time
    - 'UNSPECIFIED'
  - `valid_to` union, required
    - string, date-time
    - 'UNSPECIFIED'

## Response `200`

Successful Response

- CampaignResponse
  - `aggregate_id` string, uuid, required
  - `slug` string, required
  - `title` object, required
  - `body` object, required
  - `cta_label` object, required
  - `cta_href` string, required
  - `icon` string, required
  - `image_url` string, nullable, required
  - `is_active` boolean, required
  - `valid_from` string, date-time, nullable, required
  - `valid_to` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `version` integer, required

## Other responses

- `422`: Validation Error

---

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