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

# Add a new subscriber

> Add a new subscriber to your publication. The publication is identified by the API key provided in the Authorization header.

**Requirements:**
- At least one of `email` or `wallet` must be provided
- If both are provided, the subscriber will be associated with both credentials

**Behavior:**
- If the subscriber already exists (by email or wallet), they will not be duplicated



## OpenAPI

````yaml /paragraph-api/openapi.json post /v1/subscribers
openapi: 3.1.0
info:
  title: Paragraph API
  version: 1.0.0
  description: >-
    Public API for interacting with Paragraph publications, posts, users, and
    coined writing.


    ## Rate Limiting

    API requests are rate-limited to ensure fair usage. Contact
    support@paragraph.com for higher limits.


    ## Pagination

    List endpoints support cursor-based pagination using `cursor` and `limit`
    parameters.
  contact:
    name: Paragraph Support
    email: support@paragraph.com
    url: https://paragraph.com/support
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://public.api.paragraph.com/api
    description: Production server
security:
  - {}
tags:
  - name: publications
    description: Operations related to publications
  - name: posts
    description: Operations related to posts and content
  - name: users
    description: Operations related to users and authors
  - name: coins
    description: Operations related to tokenized content
  - name: subscribers
    description: Operations related to subscriber management (requires API key)
paths:
  /v1/subscribers:
    post:
      tags:
        - subscribers
      summary: Add a new subscriber
      description: >-
        Add a new subscriber to your publication. The publication is identified
        by the API key provided in the Authorization header.


        **Requirements:**

        - At least one of `email` or `wallet` must be provided

        - If both are provided, the subscriber will be associated with both
        credentials


        **Behavior:**

        - If the subscriber already exists (by email or wallet), they will not
        be duplicated
      operationId: addSubscriber
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  description: Email address of the subscriber
                wallet:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{40}$
                  description: Wallet address of the subscriber (0x format)
                createdAt:
                  type: number
                  description: >-
                    Timestamp (in milliseconds) when the subscription was
                    created. Defaults to current time.
      responses:
        '200':
          description: Subscriber added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                    description: Whether the subscriber was added
                required:
                  - success
        '400':
          description: Invalid request - must provide email or wallet
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses
                  msg:
                    type: string
                    description: Human-readable error message
                required:
                  - success
                  - msg
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses
                  msg:
                    type: string
                    description: Human-readable error message
                required:
                  - success
                  - msg
        '404':
          description: Publication not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses
                  msg:
                    type: string
                    description: Human-readable error message
                required:
                  - success
                  - msg
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses
                  msg:
                    type: string
                    description: Human-readable error message
                required:
                  - success
                  - msg
      security:
        - apiKey: []
      x-codeSamples:
        - lang: typescript
          label: Add subscriber with email
          source: |-
            import { ParagraphAPI } from "@paragraph-com/sdk"

            const api = new ParagraphAPI({ apiKey: "your-api-key" })
            await api.subscribers.create({ email: "reader@example.com" })
        - lang: typescript
          label: Add subscriber with wallet
          source: |-
            import { ParagraphAPI } from "@paragraph-com/sdk"

            const api = new ParagraphAPI({ apiKey: "your-api-key" })
            await api.subscribers.create({ wallet: "0x1234...abcd" })
        - lang: bash
          label: Add subscriber using curl
          source: |-
            curl -X POST "https://public.api.paragraph.com/api/v1/subscribers" \
              -H "Authorization: Bearer your-api-key" \
              -H "Content-Type: application/json" \
              -d '{"email": "reader@example.com"}'
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        API key for authenticating protected endpoints. Pass as Bearer token in
        Authorization header.

````