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

# Schedule Campaign

> API for scheduling campaign. If the schedule_at  is not given, the campaign will schedule for the current time.



## OpenAPI

````yaml /openapi-v1.json post /campaign/schedule/{id}
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /campaign/schedule/{id}:
    post:
      tags:
        - Campaigns
      summary: Schedule Campaign
      description: >-
        API for scheduling campaign. If the schedule_at  is not given, the
        campaign will schedule for the current time.
      operationId: schedule-campaign
      parameters:
        - name: id
          in: path
          required: true
          description: Campaign Id
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          description: application/json
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                scheduled_at:
                  type: string
                  minLength: 1
                  description: >-
                    Schedule time for your email campaign. Pass your timezone
                    date-time format for accurate results.


                    Format: 2021-04-23 15:04:05
            examples:
              example-1:
                value:
                  scheduled_at: '2021-04-17 15:48:00'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      field:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
              examples:
                example-1:
                  value:
                    message: Campaign has been scheduled
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      field:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
              examples:
                example-1:
                  value:
                    errors:
                      - field: scheduled_at
                        message: >-
                          scheduled_at does not match the YYYY-MM-DD hh:mm:ss
                          format
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      field:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
              examples:
                example-1:
                  value:
                    errors:
                      - field: ''
                        message: Authorization failed
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          minLength: 1
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: id
                        message: Record not found with the given Id
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````