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

# Create Mailing List

> If qrcode_url is provided, it will be used as the default QR Code URL when placing orders with this mailing list.



## OpenAPI

````yaml post /mailing-lists/
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://www.thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /mailing-lists/:
    post:
      tags:
        - Mailing Lists
      summary: Create Mailing List
      description: >-
        If qrcode_url is provided, it will be used as the default QR Code URL
        when placing orders with this mailing list.
      operationId: createMailingList
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  example: Birthday List
                sub_account_id:
                  type: integer
                  description: >-
                    ID of the sub-account to associate with this mailing list.
                    If not provided, the mailing list will be associated with
                    the main account.
                  example: 7
                qrcode_url:
                  type: string
                  description: QR Code URL for the mailing list.
                  example: https://www.google.com
              required:
                - description
      responses:
        '201':
          description: Created
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: manual
                    enum:
                      - csv
                      - manual
                      - map
                      - friends
                      - retarget
                      - leads
                      - zapier
                      - radius
                      - highlevel
                      - qrscans
                  description:
                    type: string
                    example: New Mailing List (Created via API 09/07/2024)
                  sub_account_id:
                    type:
                      - integer
                      - 'null'
                    example: 7
                  user_id:
                    type: integer
                    example: 2
                  updated_at:
                    type: string
                    example: '2024-09-07 02:10:32'
                  created_at:
                    type: string
                    example: 1 second ago
                  id:
                    type: integer
                    example: 610
              example:
                type: manual
                description: New Mailing List (Created via API 09/07/2024)
                sub_account_id: 7
                user_id: 2
                updated_at: '2024-09-07 02:10:32'
                created_at: 1 second ago
                id: 610
        '403':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````