Meine erste Kampagne erstellen
Dokumentationsmenü
GET/api/v1/campaigns

Campaigns

List the campaigns in your workspace, archive them, and add or remove locales.

A campaign groups concepts, sizes and locales. These endpoints read and adjust the campaigns in the key's workspace.

List campaigns

GET /api/v1/campaigns lists them from newest to oldest. Requires the read permission (or any of the others).

FieldRequirementDescription
qstring
Optional
Searches the campaign name.
statusstring
Optional
Filters by exact status, for example draft.
limitinteger
Optional
From 1 to 100. Default 50.
cursorstring
Optional
The nextCursor from the previous page.

Pagination

Every list (campaigns, concepts, exports and library) responds { data, hasMore, nextCursor }. If hasMore is true, pass nextCursor as cursor to ask for the next page. An invalid cursor responds 400.

Archive a campaign

DELETE /api/v1/campaigns/:id archives it and responds 204. It can be restored from the app and is deleted for good after 30 days. Requires the generate permission.

Add and remove locales

POST /api/v1/campaigns/:id/locales with { "locale": "en-US" } adds a locale to the campaign and, unless you send "translate": false, translates each concept: one job per concept, at the same cost as "Translate what is missing" in the app. It responds 202 with jobs, or 200 if there was nothing to translate. A campaign accepts up to 10 locales. When each translation finishes you will receive the translation.completed webhook.

DELETE /api/v1/campaigns/:id/locales/:locale removes a locale and its pieces. The base locale cannot be removed (400). Both require the generate permission.

Hinweis. You cannot create campaigns separately from the API yet. When you create a concept without campaignId, a new campaign is created automatically. With a bm_test_ key, the list shows a single sample campaign.
Hat dir diese Seite geholfen?