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

# Create Campaign with Email Touchpoint

> Create a new campaign with an email touchpoint.

### Authorizations

<ParamField header="Authorization" type="string" required>
  Enter your ContactSwing JWT Bearer token.
</ParamField>

### Request Body

<ParamField body="name" type="string" required>
  Campaign display name
</ParamField>

<ParamField body="type" type="string">
  Campaign type.
</ParamField>

<ParamField body="company_plan_id" type="string">
  Campaign type.
</ParamField>

<ParamField body="workspace_id" type="string">
  Campaign type.
</ParamField>

<ParamField body="business_goal" type="string">
  The business goal of the campaign.
</ParamField>

<ParamField body="touchpoint" type="object" required>
  The touchpoint object.

  <ParamField body="name" type="string" required>
    The name of the touchpoint.
  </ParamField>

  <ParamField body="type" type="string" required>
    The type of the touchpoint. e.g. `EMAIL`.
  </ParamField>

  <ParamField body="status" type="string" required>
    The status of the touchpoint. e.g. `scheduled`.
  </ParamField>

  <ParamField body="start_at" type="string" required>
    ISO 8601 scheduled date for the touchpoint.
  </ParamField>

  <ParamField body="assistant_id" type="integer" required>
    The ID of the assistant to be used.
  </ParamField>

  <ParamField body="customer_details" type="array" required>
    An array of customer details objects.

    <ParamField body="id" type="string" required>
      The customer's ID.
    </ParamField>

    <ParamField body="email" type="string" required>
      The customer's email address.
    </ParamField>
  </ParamField>

  <ParamField body="additional_settings" type="object" required>
    Additional settings for the touchpoint.

    <ParamField body="execution_days" type="string[]" required>
      Array of days when the campaign will be executed. e.g. `["mon", "tue"]`
    </ParamField>

    <ParamField body="start_hour" type="integer" required>
      The start hour for the campaign execution.
    </ParamField>

    <ParamField body="end_hour" type="integer" required>
      The end hour for the campaign execution.
    </ParamField>

    <ParamField body="time_zone" type="string" required>
      The timezone for the campaign execution. e.g. `Asia/Kolkata`.
    </ParamField>

    <ParamField body="email" type="string" required>
      The email address to be used.
    </ParamField>

    <ParamField body="from_emails" type="string[]" required>
      The email addresses from which the emails will be sent.
    </ParamField>

    <ParamField body="email_medium" type="string" required>
      The email medium to be used. e.g. `SEND_GRID`.
    </ParamField>
  </ParamField>

  <ParamField body="email_subject" type="string" required>
    The subject of the email.
  </ParamField>

  <ParamField body="email_body" type="string" required>
    The body of the email in HTML format.
  </ParamField>

  <ParamField body="variables" type="string" />
</ParamField>

### Response

**201 Created** - Campaign created successfully

<ResponseField name="ctx_id" type="string">Request context ID</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Campaign ID</ResponseField>
  <ResponseField name="name" type="string">Campaign name</ResponseField>
  <ResponseField name="status" type="string">Campaign status</ResponseField>
</ResponseField>

**400 Bad Request** - Invalid input
