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

# Create a signup form

> Creates a signup form for an audience. Turnstile credentials are required when CAPTCHA is enabled.



## OpenAPI

````yaml /openapi.json post /marketing/forms
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Email
    description: Send transactional email
  - name: Outbound
    description: 'Outbound sending: keys, SMTP users, domains, logs, suppression'
  - name: Inbound
    description: Inbound routing, domains and forward destinations
  - name: DMARC
    description: DMARC aggregate-report domain setup, DNS verification and analytics
  - name: Marketing
    description: >-
      Marketing suite: templates, audiences, contacts, broadcasts, themes,
      assets and signup forms
  - name: Signup Forms
    description: Hosted signup pages and form submissions
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /marketing/forms:
    post:
      tags:
        - Marketing
      summary: Create a signup form
      description: >-
        Creates a signup form for an audience. Turnstile credentials are
        required when CAPTCHA is enabled.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MarketingSignupFormInput'
                - type: object
                  required:
                    - name
                    - audienceId
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - id
                  - public_id
                  - form_url
                properties:
                  success:
                    type: boolean
                    example: true
                  id:
                    type: string
                    format: uuid
                  public_id:
                    type: string
                    example: form_oCiNpdGJPDhgV4kFa6t1jeoF
                  form_url:
                    type: string
                    format: uri
        '400':
          description: Invalid name, audience, field configuration or Turnstile credentials
        '401':
          description: Missing or invalid Bearer token
        '500':
          description: Unable to create the form
        '503':
          description: Service temporarily unavailable
components:
  schemas:
    MarketingSignupFormInput:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          example: Website newsletter
        audienceId:
          type: string
          description: Owned audience that successful submissions join.
        status:
          type: string
          enum:
            - active
            - paused
          default: active
        fields:
          type: array
          minItems: 1
          maxItems: 20
          items:
            $ref: '#/components/schemas/MarketingSignupFormField'
        settings:
          $ref: '#/components/schemas/MarketingSignupFormSettings'
        turnstileEnabled:
          type: boolean
          default: false
        turnstileSiteKey:
          type: string
          maxLength: 200
          description: >-
            Cloudflare Turnstile widget site key. Required when Turnstile is
            enabled.
        turnstileSecretKey:
          type: string
          maxLength: 500
          writeOnly: true
          description: >-
            Cloudflare Turnstile secret. Required when enabling CAPTCHA or
            changing the site key.
    MarketingSignupFormField:
      type: object
      required:
        - name
        - label
        - type
        - required
        - placeholder
      properties:
        name:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Built-in field name (`email`, `firstName`, `lastName`) or an
            existing custom marketing-field key.
          example: email
        label:
          type: string
          maxLength: 100
          example: Email address
        type:
          type: string
          enum:
            - email
            - text
          example: email
        required:
          type: boolean
          description: Email is always required.
          example: true
        placeholder:
          type: string
          maxLength: 150
          example: you@example.com
    MarketingSignupFormSettings:
      type: object
      properties:
        heading:
          type: string
          maxLength: 160
          example: Stay in the loop
        description:
          type: string
          maxLength: 500
          example: Get product news and updates delivered to your inbox.
        buttonLabel:
          type: string
          maxLength: 80
          example: Subscribe
        successMessage:
          type: string
          maxLength: 300
          example: You're subscribed. Thanks for joining!
        errorMessage:
          type: string
          maxLength: 300
          example: Something went wrong. Please try again.
        requireConsent:
          type: boolean
          default: false
        consentLabel:
          type: string
          maxLength: 500
          example: I agree to receive marketing emails. I can unsubscribe at any time.
        redirectUrl:
          type: string
          format: uri
          maxLength: 2048
          description: Optional http(s) destination after a successful browser submission.
        backgroundColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#ffffff'
        textColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#111827'
        inputColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#ffffff'
        buttonColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#111827'
        buttonTextColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#ffffff'
        borderColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          example: '#d1d5db'
        fontFamily:
          type: string
          enum:
            - Arial, sans-serif
            - Helvetica, Arial, sans-serif
            - Georgia, serif
            - Verdana, sans-serif
            - system-ui, sans-serif
        borderRadius:
          type: integer
          minimum: 0
          maximum: 24
          example: 8
        hideBranding:
          type: boolean
          description: Paid plans may hide JetEmail branding.
        optInMode:
          type: string
          enum:
            - single
            - double
          default: single
        pendingMessage:
          type: string
          maxLength: 300
        confirmationFromName:
          type: string
          maxLength: 64
        confirmationFromEmail:
          type: string
          format: email
          maxLength: 320
          description: Verified sender required for double opt-in.
        confirmationSubject:
          type: string
          maxLength: 200
        confirmationMessage:
          type: string
          maxLength: 500
        confirmationButtonLabel:
          type: string
          maxLength: 80
        confirmationRedirectUrl:
          type: string
          format: uri
          maxLength: 2048
        autoProtection:
          type: boolean
          default: true
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````