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

# Create subscription

> Subscribe someone to a form.



## OpenAPI

````yaml /en/marketing-addons-api/api-reference/openapi-marketing-addons.json post /v1/forms/subscriptions
openapi: 3.0.3
info:
  title: Notifique API. Forms (marketing add-on)
  description: >-
    API v1 para **formulários de marketing** (templates: BLANK, CONTACT, SURVEY,
    WAITLIST, NEWSLETTER) em `/v1/forms`.


    **Autenticação:** `Authorization: Bearer sk_live_xxxxx` ou cabeçalho
    `x-api-key`.


    **Escopos:**

    - **forms:manage**, listar, criar, atualizar e excluir formulários; listar
    inscrições.

    - **forms:submit**, criar inscrições, confirmar double opt-in e cancelar.


    **Validação:** submissões API validam contra o schema `hostedPageForm` do
    formulário.


    **Webhooks:** `form.submitted`, `form.confirmed`, `form.unsubscribed`.


    **403** com `code: ONBOARDING_REQUIRED` se o onboarding não estiver
    concluído.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfAddonsBearerAuth: []
  - ntfAddonsApiKeyHeader: []
tags:
  - name: Forms
    description: >-
      Formulários de marketing unificados (`/v1/forms/*`). Escopos:
      **forms:manage**, **forms:submit**.
paths:
  /v1/forms/subscriptions:
    post:
      tags:
        - Forms
      summary: Create subscription
      description: Subscribe someone to a form.
      operationId: ntfAddons_postV1FormsSubscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfAddons_FormSubscribeRequest'
      responses:
        '200':
          description: Inscrito, duplicata ou SKIPPED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfAddons_FormSubscribeEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFoundForm'
components:
  schemas:
    NtfAddons_FormSubscribeRequest:
      type: object
      required:
        - listId
      properties:
        listId:
          type: string
          description: ID do formulário (20–36 caracteres alfanuméricos)
          minLength: 20
          maxLength: 36
          pattern: ^[a-zA-Z0-9]+$
        email:
          type: string
        name:
          type: string
        phone:
          type: string
        extraData:
          type: object
          additionalProperties: true
          description: Campos extras mapeados no hostedPageForm
        preferences:
          type: object
          additionalProperties:
            type: string
          description: Newsletter, substitui preferências existentes
    NtfAddons_FormSubscribeEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/NtfAddons_WaitlistSubscribeData'
    NtfAddons_WaitlistSubscribeData:
      oneOf:
        - type: object
          properties:
            subscriptionId:
              type: string
              nullable: true
            status:
              type: string
              enum:
                - SKIPPED
            message:
              type: string
          required:
            - status
        - type: object
          properties:
            subscriptionId:
              type: string
            status:
              type: string
              enum:
                - PENDING_CONFIRMATION
                - CONFIRMED
                - ACTIVE
                - UNSUBSCRIBED
                - CANCELLED
            queuePosition:
              type: integer
              nullable: true
            subscribedAt:
              type: string
              format: date-time
            confirmedAt:
              type: string
              format: date-time
              nullable: true
            confirmationToken:
              type: string
              description: Só com double opt-in
          required:
            - subscriptionId
            - status
    NtfAddons_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: HTTP-style error label (e.g. Unauthorized, Bad Request, Not Found).
        message:
          type: string
          description: >-
            Human-readable message for end users (localized via Accept-Language
            / x-locale when applicable).
        code:
          type: string
          description: >-
            Stable API v1 code (enum). Always present on errors. Use with the
            HTTP status to decide retry or fix. See [Error
            responses](/en/guides/conceitos/resposta-de-erros).
      required:
        - success
        - error
        - message
        - code
  responses:
    BadRequest:
      description: Validação
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAddons_ErrorResponse'
    Unauthorized:
      description: API Key ausente ou inválida
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAddons_ErrorResponse'
    PaymentRequired:
      description: Plano expirado ou workspace suspenso
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAddons_ErrorResponse'
    Forbidden:
      description: Escopo insuficiente ou onboarding incompleto (`ONBOARDING_REQUIRED`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAddons_ErrorResponse'
    NotFoundForm:
      description: Formulário não encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAddons_ErrorResponse'
  securitySchemes:
    ntfAddonsBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Authorization: Bearer sk_live_xxxxx'
    ntfAddonsApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````