---
updatedAt: 2026-06-15T14:41:25.000Z
agentTools:
  projectIndex: https://developers.dexatel.com/llms.txt
---

# Create Campaign

<br />

<TitleSetter title="Create SMS Campaign | Dexatel API" />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Contacts and Messaging",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.dexatel.com",
      "description": "Server base url"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/v1/campaigns": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Create Campaign",
        "operationId": "create_campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignPostRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignPostResponseWrapperDto"
                }
              }
            }
          },
          "400": {
            "description": "<p><strong>Bad Request:</strong></p> <table> <tr> <th>Code</th> <th>Message</th> <th>Description</th> </tr> <tr> <td>1504</td> <td>Invalid message sender</td> <td></td> </tr> <tr> <td>1505</td> <td>Message sender is not found</td> <td></td> </tr> <tr> <td>1512</td> <td>Invalid template id</td> <td></td> </tr> <tr> <td>1513</td> <td>Template is not found</td> <td></td> </tr> <tr> <td>1522</td> <td>Schedule date should be after current date</td> <td></td> </tr> <tr> <td>1603</td> <td>'data.from' is required</td> <td></td> </tr> <tr> <td>1605</td> <td>'data.audience' is required</td> <td></td> </tr> <tr> <td>1607</td> <td>'data.template' is required</td> <td></td> </tr> <tr> <td>1609</td> <td>'data.schedule' is invalid</td> <td></td> </tr> <tr> <td>1615</td> <td>Invalid audience id</td> <td></td> </tr> <tr> <td>1616</td> <td>Audience is not found</td> <td></td> </tr> <tr> <td>1616</td> <td>Template ID does not exist for this channel</td> <td></td> </tr> <tr> <td>1617</td> <td>Audience ID does not exist for this channel</td> <td></td> </tr> <tr> <td>1631</td> <td>'data.name' is invalid</td> <td></td> </tr> <tr> <td>*</td> <td>Channel is required</td> <td></td> </tr> </table>"
          },
          "409": {
            "description": "<p><strong>Conflict:</strong></p> <table> <tr> <th>Code</th> <th>Message</th> </tr> <tr> <td>1614</td> <td>Campaign exist</td> </tr> </table>"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnumCampaignStatuses": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "scheduled",
          "canceled"
        ]
      },
      "EnumChannelsLowerCase": {
        "type": "string",
        "enum": [
          "SMS",
          "VIBER",
          "WHATSAPP"
        ]
      },
      "CampaignResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the campaign"
          },
          "sender": {
            "type": "string",
            "description": "Name (unique identifier) of the sender"
          },
          "account_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the account"
          },
          "template_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the template"
          },
          "audience_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the audience"
          },
          "name": {
            "type": "string",
            "description": "Unique name of the campaign"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnumCampaignStatuses"
              },
              {
                "description": "Status of the campaign.\nEnumeration values [in_progress, completed, scheduled, canceled]"
              }
            ]
          },
          "channel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnumChannelsLowerCase"
              },
              {
                "description": "Channel of the campaign.\nEnumeration values [SMS, VIBER, WHATSAPP]"
              }
            ]
          },
          "schedule": {
            "type": "string",
            "format": "date-time",
            "description": "Schedule date of the campaign in UTC, formatted as yyyy-mm-dd hh:mm:ss"
          },
          "create_date": {
            "type": "string",
            "format": "date-time",
            "description": "Creation date of the campaign in UTC, formatted as yyyy-mm-dd hh:mm:ss"
          },
          "update_date": {
            "type": "string",
            "format": "date-time",
            "description": "Update date of the campaign in UTC, formatted as yyyy-mm-dd hh:mm:ss"
          }
        }
      },
      "CampaignPostRequestDto": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "required": [
              "channel",
              "audience",
              "template",
              "from"
            ],
            "type": "object",
            "properties": {
              "channel": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EnumChannelsLowerCase"
                  },
                  {
                    "description": "Channel of the campaign.\nEnumeration values [SMS, VIBER, WHATSAPP]"
                  }
                ]
              },
              "name": {
                "maxLength": 45,
                "minLength": 0,
                "type": "string",
                "description": "Unique name of the campaign"
              },
              "from": {
                "type": "string",
                "description": "Name (unique identifier) of the sender"
              },
              "audience": {
                "type": "string",
                "format": "uuid",
                "description": "Identifier of the audience"
              },
              "template": {
                "type": "string",
                "format": "uuid",
                "description": "Identifier of the template"
              },
              "schedule": {
                "type": "string",
                "format": "date-time",
                "description": "Campaigns without schedule date are sent immediately.\nOptionally they can be scheduled, and schedule date should be after current date in UTC, formatted as yyyy-mm-dd hh:mm:ss"
              }
            }
          }
        }
      },
      "CampaignPostResponseWrapperDto": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "string",
                    "description": "Unique identifier of the user who initiated the campaign"
                  }
                }
              },
              {
                "$ref": "#/components/schemas/CampaignResponseDto"
              },
              {
                "type": "object",
                "properties": {
                  "links": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/LinksSelf"
                      },
                      {
                        "$ref": "#/components/schemas/LinksAccount"
                      },
                      {
                        "$ref": "#/components/schemas/LinksTemplate"
                      },
                      {
                        "$ref": "#/components/schemas/LinksAudience"
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "LinksSelf": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "description": "URL of the requested resource"
          }
        }
      },
      "LinksAccount": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "description": "URL of the account"
          }
        }
      },
      "LinksTemplate": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string",
            "description": "URL of the template"
          }
        }
      },
      "LinksAudience": {
        "type": "object",
        "properties": {
          "audience": {
            "type": "string",
            "description": "URL of the audience"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Dexatel-Key"
      }
    }
  }
}
```