> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexnotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crée un brouillon de campagne



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/marketing-campaigns
openapi: 3.1.0
info:
  title: API DexNotify
  version: '1'
  description: >-
    SMS, e-mail, WhatsApp, notifications push, contacts et campagnes, par une
    seule API. Authentification par clé API dans l’en-tête `x-api-key`.
servers:
  - url: https://api.dexnotify.com
    description: Production et staging
security:
  - api-key: []
tags:
  - name: SMS
  - name: E-mail
  - name: WhatsApp
  - name: Contacts
  - name: Listes de contacts
  - name: Campagnes
  - name: Modèles e-mail
  - name: Automatisations
  - name: Notifications push
  - name: Campagnes push
  - name: Journal des messages
  - name: In-app
  - name: Live Activities
  - name: Utilisateurs et appareils
  - name: Segments
  - name: Modèles push
  - name: Événements
  - name: Statistiques
paths:
  /api/v1/marketing-campaigns:
    post:
      tags:
        - Campagnes
      summary: Crée un brouillon de campagne
      operationId: CampaignsController_create_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                channel:
                  type: string
                  enum:
                    - email
                    - sms
                audience:
                  default:
                    listIds: []
                    excludeListIds: []
                  type: object
                  properties:
                    listIds:
                      default: []
                      maxItems: 50
                      type: array
                      items:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                    excludeListIds:
                      default: []
                      maxItems: 50
                      type: array
                      items:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                email:
                  type: object
                  properties:
                    subject:
                      default: ''
                      type: string
                      maxLength: 250
                    preheader:
                      type: string
                      maxLength: 250
                    fromName:
                      default: ''
                      type: string
                      maxLength: 120
                    fromEmail:
                      default: ''
                      type: string
                      maxLength: 254
                    replyTo:
                      type: string
                      maxLength: 254
                    html:
                      default: ''
                      type: string
                      maxLength: 1000000
                    design: {}
                sms:
                  type: object
                  properties:
                    sender:
                      default: ''
                      type: string
                      maxLength: 11
                    text:
                      default: ''
                      type: string
                      maxLength: 1600
                    unsubscribeMention:
                      default: true
                      type: boolean
              required:
                - name
                - channel
      responses:
        '201':
          description: ''
      security:
        - api-key: []
components:
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Clé API du projet, créée dans le dashboard (Développeurs › Clés API et
        SDK). Une clé `dxn_prod_` vise la production, une clé `dxn_stag_` le
        staging.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.