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

# Subscribe (Number)

> This endpoint subscribes a contact to a newsletter using their **WhatsApp number**. If the contact does not exist, a new one will be created with default values.

It also supports updating name, email, and custom input fields. If automation is configured for the newsletter, an automation instance will be created.



## OpenAPI

````yaml POST /workspaces/{workspace}/newsletters/{newsletter}/subscribe-number
openapi: 3.1.0
info:
  title: Lancepilot API
  description: API for Lancepilot
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://lancepilot.com/api/v3
security:
  - bearerAuth: []
paths:
  /workspaces/{workspace}/newsletters/{newsletter}/subscribe-number:
    post:
      summary: Subscribe contact by WhatsApp number
      description: >-
        This endpoint subscribes a contact to a newsletter using their
        **WhatsApp number**. If the contact does not exist, a new one will be
        created with default values.


        It also supports updating name, email, and custom input fields. If
        automation is configured for the newsletter, an automation instance will
        be created.
      parameters:
        - name: workspace
          in: path
          description: ID of the workspace.
          required: true
          schema:
            type: string
            format: uuid
        - name: newsletter
          in: path
          required: true
          schema:
            type: integer
          description: The newsletter ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                whatsapp_number:
                  type: string
                  description: WhatsApp phone number of the contact
                  example: '+8801712345678'
                name:
                  type: string
                  nullable: true
                  example: Jane Doe
                email:
                  type: string
                  nullable: true
                  format: email
                  example: jane@example.com
                custom_input_value:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      value:
                        type: string
                        example: Custom answer
                    required:
                      - id
                      - value
                status:
                  type: boolean
                  description: true = subscribed, false = unsubscribed
                  example: true
              required:
                - whatsapp_number
                - status
      responses:
        '200':
          $ref: '#/components/responses/200'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
components:
  responses:
    '200':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties: {}
            required:
              - data
    '401':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
            required:
              - message
    '404':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Resource not found.
              status:
                type: integer
                example: 404
            required:
              - message
              - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````