---
docId: doc_4a9718d4d9f543b4a8978aceed625a51
title: Create a campaign
description: Create a new campaign in your workspace.
api:
  group: campañas
  auth: bearer
  operations:
    - operationId: createCampaign
      method: POST
      path: /v1/campaigns
      postmanName: Create a campaign
---

<script>
  import { Ways } from '$lib/components';
</script>

# Create a campaign

Create a new campaign in your workspace.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/campaigns \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spring sale",
    "category": "marketing",
    "templateName": "spring_sale"
  }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.campaigns.create({ title: "Spring sale", category: "marketing", templateName: "spring_sale" });
```

</Ways.Way>
</Ways>

## Request body

```json
{
  "title": "Summer promo 2026",
  "category": "marketing",
  "platform": "whatsapp",
  "templateName": "summer_promo_2026",
  "owners": ["marketing@acme.com", "crm@acme.com"]
}
```

## Body parameters

| Parameter | Type | Description | Requirement | Default |
| --- | --- | --- | --- | --- |
| `title` | string | Campaign title (unique within the workspace) | required | - |
| `category` | string | Category: `"marketing"` or `"utility"` | required | - |
| `platform` | string | Send platform | optional | `"whatsapp"` |
| `templateName` | string | Name of the Meta/WhatsApp template (validated against the workspace) | optional | - |
| `message` | string | Message associated with the campaign | optional | - |
| `template` | string | Serialized representation of the template | optional | - |
| `language` | string | The language version of `templateName`, such as `es_MX`. It chooses which version of the template the campaign sends. Without it, the only one there is or, if there are several, an approved one ([the rule](/api-reference/whatsapp-templates/get#which-version-answers)) | optional | - |
| `wabaId` | string | Associated WABA | optional | - |
| `owners` | string[] | List of responsible-user emails | optional | `[]` |

## Response `201 Created`

```json
{
  "status": "success",
  "message": "Campaign created successfully",
  "data": {
    "id": "pV6PvG2lc8ChQb2VmETr",
    "title": "Summer promo 2026",
    "category": "marketing",
    "platform": "whatsapp",
    "templateName": "summer_promo_2026",
    "owners": ["marketing@acme.com", "crm@acme.com"],
    "language": "es_MX",
    "wabaId": "waba_xyz",
    "creationDate": "2026-03-02T21:33:36.049Z",
    "lastUpdate": "2026-03-02T21:33:36.050Z"
  }
}
```

`language` in the response is the version that was stored: the one the campaign sends.

## Template errors

| Status | `details.code` | When |
| --- | --- | --- |
| `400` | `TEMPLATE_NOT_FOUND` | There is no template with that name, or it does not have the `language` you sent. In the second case `details.languages` lists the ones it has |
| `400` | `TEMPLATE_NOT_APPROVED` | The chosen version is not approved. `details.status` says what state it is in |
