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

# Import Subscribers

> Import newsletter subscribers from structured data or CSV text.



## OpenAPI

````yaml /openapi.json post /newsletter/subscribers/import
openapi: 3.0.3
info:
  title: Maito API Reference
  version: 0.1.0
  description: Supported endpoints for external Maito integrations.
servers:
  - url: https://api.getmaito.com/v1
    description: Maito Cloud
security:
  - bearerAuth: []
tags:
  - name: Newsletter
    description: Manage newsletter settings, subscribers, issues, and analytics.
  - name: Media Uploads
    description: Upload media assets for social and newsletter content.
paths:
  /newsletter/subscribers/import:
    post:
      tags:
        - Newsletter
      summary: Import Subscribers
      description: Import newsletter subscribers from structured data or CSV text.
      operationId: importNewsletterSubscribers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewsletterImportSubscribersPayload'
            example:
              subscribers:
                - email: reader@example.com
              optInAttestation: true
      responses:
        '201':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsletterSubscribersResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    NewsletterImportSubscribersPayload:
      type: object
      required:
        - optInAttestation
      properties:
        subscribers:
          type: array
          items:
            $ref: '#/components/schemas/NewsletterImportSubscriber'
        csvText:
          type: string
        optInAttestation:
          type: boolean
          enum:
            - true
      oneOf:
        - required:
            - subscribers
            - optInAttestation
        - required:
            - csvText
            - optInAttestation
      description: >-
        Provide either subscribers or csvText, not both. optInAttestation must
        be true.
    NewsletterSubscribersResponse:
      allOf:
        - $ref: '#/components/schemas/ApiSuccess'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/NewsletterSubscriber'
    NewsletterImportSubscriber:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
        tags:
          type: array
          items:
            type: string
        customFields:
          $ref: '#/components/schemas/JsonObject'
        sourceType:
          $ref: '#/components/schemas/NewsletterSubscriberSourceType'
        source:
          type: string
          maxLength: 160
        sourceIssueId:
          type: string
        sourcePostId:
          type: string
        sourceCtaLinkId:
          type: string
        sourcePlatform:
          $ref: '#/components/schemas/NewsletterSourcePlatform'
    ApiSuccess:
      type: object
      required:
        - ok
        - data
      properties:
        ok:
          type: boolean
          enum:
            - true
        data: {}
    NewsletterSubscriber:
      type: object
      required:
        - id
        - workspaceId
        - accountSetId
        - emailNormalized
        - emailOriginal
        - status
        - sourceType
        - subscribedAt
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        workspaceId:
          type: string
        accountSetId:
          type: string
          format: uuid
        emailNormalized:
          type: string
          format: email
        emailOriginal:
          type: string
        status:
          $ref: '#/components/schemas/NewsletterSubscriberStatus'
        sourceType:
          $ref: '#/components/schemas/NewsletterSubscriberSourceType'
        source:
          type: string
          nullable: true
        sourceIssueId:
          type: string
          nullable: true
        sourcePostId:
          type: string
          nullable: true
        sourceCtaLinkId:
          type: string
          nullable: true
        sourcePlatform:
          allOf:
            - $ref: '#/components/schemas/NewsletterSourcePlatform'
          nullable: true
        sourceVisitorId:
          type: string
          nullable: true
        subscribedAt:
          type: string
        unsubscribedAt:
          type: string
          nullable: true
        createdAt:
          type: string
        updatedAt:
          type: string
    ErrorResponse:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          additionalProperties: true
    JsonObject:
      type: object
      additionalProperties: true
    NewsletterSubscriberSourceType:
      type: string
      enum:
        - manual
        - subscribe_page
        - social_post
        - embed
        - import
        - api
        - referral
    NewsletterSourcePlatform:
      type: string
      enum:
        - x
        - linkedin
    NewsletterSubscriberStatus:
      type: string
      enum:
        - subscribed
        - unsubscribed
        - bounced
        - complained
        - blocked
  responses:
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            ok: false
            error:
              code: UNAUTHORIZED
              message: Authentication required.
    ValidationError:
      description: The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            ok: false
            error:
              code: VALIDATION_ERROR
              message: Invalid document query.
              details: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: your-api-key

````