NUDG3 Public - Subscribe API

The Public - Subscribe API from NUDG3 — 3 operation(s) for public - subscribe.

GitHub OpenAPI

Operations 3

POST /public/subscribe/validate-email Validate Email for Subscribe #
POST /public/subscribe/create-session Create Subscription Session #
POST /public/subscribe/complete Complete Subscription #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nudg3-ai:nudg3-ai-public-subscribe-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nudg3-ai-public-subscribe-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nudg3 Public - Subscribe API
  description: '# Nudg3 Brand Intelligence API


    The Nudg3 API provides programmatic access to brand visibility analytics across AI providers.


    ## Public API v1


    The Public API (`/api/v1/`) is designed for third-party integrations and provides:


    ### Analytics Endpoints (Tier 1 - Basic)

    - Brand visibility scores and trends

    - Sentiment analysis across AI responses

    - Source citation tracking

    - Prompt performance metrics

    - Google AI Overview (AIO) coverage


    ### Export Endpoints (Tier 2 - Premium)

    - Full response data exports (CSV/TSV)

    - Source citations bulk download

    - Dashboard time-series data

    - Prompt-mention pair exports


    ## Authentication


    ### API Key (Public API v1)

    ```bash

    curl -H "Authorization: Bearer nudg3_live_ak_xxx..." \

    https://api.nudg3.com/api/v1/dashboard

    ```


    ### JWT (Dashboard API)

    ```bash

    curl -H "Authorization: Bearer eyJ..." \

    https://api.nudg3.com/analytics/dashboard

    ```


    ## Rate Limits


    | Tier | Per Minute | Per Hour | Monthly Quota |

    |------|------------|----------|---------------|

    | Basic | 60 | 600 | 5,000 |

    | Premium | 300 | 3,000 | 50,000 |


    ## Response Format


    All responses follow a standard envelope:

    ```json

    {

    "success": true,

    "data": { ... },

    "message": "Success"

    }

    ```


    ## Support


    - Documentation: https://docs.nudg3.com

    - API Status: https://status.nudg3.com

    - Support: support@nudg3.com'
  version: 1.1.0
  termsOfService: https://nudg3.com/terms
  contact:
    name: Nudg3 API Support
    url: https://nudg3.com/support
    email: support@nudg3.com
  license:
    name: Proprietary
    url: https://nudg3.com/license
servers:
- url: https://api.nudg3.com
  description: Production API
- url: https://api-staging.nudg3.com
  description: Staging API (for testing)
- url: http://localhost:8000
  description: Local Development
tags:
- name: Public - Subscribe
paths:
  /public/subscribe/validate-email:
    post:
      tags:
      - Public - Subscribe
      summary: Validate Email for Subscribe
      description: 'Validate email before starting checkout.


        Checks:

        - Email format validity

        - Email not already registered

        - Not a disposable email domain


        **Rate Limits**: 10 requests per minute (per IP)


        **No authentication required** - This is a public validation endpoint.'
      operationId: validate_email_public_subscribe_validate_email_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateEmailRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateEmailResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /public/subscribe/create-session:
    post:
      tags:
      - Public - Subscribe
      summary: Create Subscription Session
      description: 'Create a subscription session for landing page checkout.


        This endpoint:

        1. Validates email (not exists, not disposable)

        2. Validates plan and billing cycle

        3. Creates pending company, workspace, subscription

        4. Generates PayFast payment URL

        5. Returns payment URL to redirect user


        **Rate Limits**: 3 requests per minute, 10 per hour (per email)


        **No authentication required** - This handles new user registration.'
      operationId: create_subscription_session_public_subscribe_create_session_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionSessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionSessionResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '409':
          description: Email already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /public/subscribe/complete:
    post:
      tags:
      - Public - Subscribe
      summary: Complete Subscription
      description: 'Complete subscription after successful payment.


        Called after PayFast redirects back to the success page.

        This endpoint:

        1. Verifies the pending signup session

        2. Creates Firebase user

        3. Creates PostgreSQL user

        4. Activates subscription

        5. Returns access token for auto-login


        **Idempotent**: Safe to call multiple times with same pending_signup_id.


        **No authentication required** - Uses pending_signup_id for verification.'
      operationId: complete_subscription_public_subscribe_complete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteSubscriptionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompleteSubscriptionResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '409':
          description: Already completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '410':
          description: Session expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSessionErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateSubscriptionSessionResponse:
      properties:
        pending_signup_id:
          type: string
          title: Pending Signup Id
          description: Unique ID for the pending signup (used in complete-subscription)
        payment_url:
          type: string
          title: Payment Url
          description: PayFast payment URL to redirect the user to
        payment_provider:
          type: string
          enum:
          - payfast
          - stripe
          title: Payment Provider
          description: Payment provider being used
          default: payfast
        plan_name:
          type: string
          title: Plan Name
          description: Name of the selected plan
        amount:
          type: number
          title: Amount
          description: Payment amount in the appropriate currency
        currency:
          type: string
          enum:
          - ZAR
          - USD
          title: Currency
          description: Currency code
      type: object
      required:
      - pending_signup_id
      - payment_url
      - plan_name
      - amount
      - currency
      title: CreateSubscriptionSessionResponse
      description: 'Response from create-session endpoint.


        Contains the pending signup ID and payment URL to redirect the user.'
      example:
        amount: 3499.0
        currency: ZAR
        payment_provider: payfast
        payment_url: https://www.payfast.co.za/eng/process?...
        pending_signup_id: 550e8400-e29b-41d4-a716-446655440000
        plan_name: Professional
    CreateSubscriptionSessionRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
          description: User email address (will be validated for duplicates and disposables)
        password:
          type: string
          minLength: 8
          title: Password
          description: Password (minimum 8 characters)
        name:
          type: string
          maxLength: 100
          minLength: 2
          title: Name
          description: User's full name (required - used for company/workspace naming)
        brand_name:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: Brand Name
          description: Brand/company name (optional - collected during onboarding)
        brand_domain:
          anyOf:
          - type: string
            maxLength: 255
          - type: 'null'
          title: Brand Domain
          description: Brand website domain (optional - collected during onboarding)
        plan_slug:
          type: string
          enum:
          - starter
          - professional
          - enterprise
          title: Plan Slug
          description: Subscription plan slug
        billing_cycle:
          type: string
          enum:
          - monthly
          - yearly
          title: Billing Cycle
          description: Billing frequency
          default: monthly
        country_code:
          type: string
          maxLength: 2
          minLength: 2
          title: Country Code
          description: ISO 3166-1 alpha-2 country code (e.g., 'ZA', 'US')
      type: object
      required:
      - email
      - password
      - name
      - plan_slug
      - country_code
      title: CreateSubscriptionSessionRequest
      description: 'Request to create a subscription session from landing page checkout.


        This is called when user submits the checkout form on the landing page.

        It validates the data, creates a pending signup record, and returns

        a PayFast payment URL for the user to complete payment.


        Note: This is a SIMPLIFIED form - only email and password are required.

        Brand setup happens during onboarding after payment is complete.'
      example:
        billing_cycle: yearly
        brand_domain: acme.com
        brand_name: Acme Inc
        country_code: ZA
        email: user@company.com
        name: John Doe
        password: securepassword123
        plan_slug: professional
    CompleteSubscriptionRequest:
      properties:
        pending_signup_id:
          type: string
          title: Pending Signup Id
          description: Pending signup ID from create-session response
        payment_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Payment Reference
          description: PayFast m_payment_id or pf_payment_id (for verification)
      type: object
      required:
      - pending_signup_id
      title: CompleteSubscriptionRequest
      description: 'Request to complete subscription after payment success.


        Called either:

        1. By the frontend after PayFast redirect (return URL)

        2. By the PayFast webhook (for reliability)


        The endpoint is idempotent - calling it multiple times with the same

        pending_signup_id is safe.'
      example:
        payment_reference: '12345678'
        pending_signup_id: 550e8400-e29b-41d4-a716-446655440000
    ValidateEmailRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
          description: Email to validate
      type: object
      required:
      - email
      title: ValidateEmailRequest
      description: Request to validate email before checkout.
      example:
        email: user@company.com
    ValidateEmailResponse:
      properties:
        valid:
          type: boolean
          title: Valid
          description: Whether email is valid and available
        available:
          type: boolean
          title: Available
          description: Whether email is not already registered
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
          description: Error code if validation failed
        message:
          anyOf:
          - type: string
          - type: 'null'
          title: Message
          description: Human-readable message
        suggestion:
          anyOf:
          - type: string
          - type: 'null'
          title: Suggestion
          description: Suggested correction for typos (e.g., 'Did you mean user@gmail.com?')
      type: object
      required:
      - valid
      - available
      title: ValidateEmailResponse
      description: Response from email validation endpoint.
      example:
        available: true
        valid: true
    SubscriptionSessionErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        error:
          type: string
          enum:
          - email_exists
          - email_invalid
          - email_disposable
          - password_weak
          - plan_not_found
          - payment_failed
          - session_expired
          - session_not_found
          - already_completed
          - server_error
          title: Error
          description: Error code for programmatic handling
        message:
          type: string
          title: Message
          description: Human-readable error message
        login_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Login Url
          description: Login URL if user already exists
      type: object
      required:
      - error
      - message
      title: SubscriptionSessionErrorResponse
      description: Error response for subscription session operations.
      example:
        error: email_exists
        login_url: https://app.nudg3.ai/login
        message: This email is already registered. Please log in instead.
        success: false
    CompleteSubscriptionResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether subscription was completed successfully
          default: true
        message:
          type: string
          title: Message
          description: Human-readable success message
        user_id:
          type: string
          title: User Id
          description: Created user ID
        email:
          type: string
          title: Email
          description: User email address
        workspace_id:
          type: string
          title: Workspace Id
          description: Created workspace ID
        access_token:
          type: string
          title: Access Token
          description: JWT access token for auto-login
        token_type:
          type: string
          title: Token Type
          description: Token type (always 'bearer')
          default: bearer
        expires_in:
          type: integer
          title: Expires In
          description: Token expiration time in seconds
        dashboard_url:
          type: string
          title: Dashboard Url
          description: URL to redirect user to after login
        plan_name:
          type: string
          title: Plan Name
          description: Subscribed plan name
        trial_end_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Trial End Date
          description: Trial end date if applicable (ISO 8601)
      type: object
      required:
      - message
      - user_id
      - email
      - workspace_id
      - access_token
      - expires_in
      - dashboard_url
      - plan_name
      title: CompleteSubscriptionResponse
      description: 'Response from complete-subscription endpoint.


        Contains everything needed for the frontend to auto-login the user

        and redirect to the dashboard.'
      example:
        access_token: eyJhbGciOiJIUzI1NiIs...
        dashboard_url: https://app.nudg3.ai
        email: user@company.com
        expires_in: 1800
        message: Welcome to Nudg3! Your Professional subscription is now active.
        plan_name: Professional
        success: true
        token_type: bearer
        user_id: 660e8400-e29b-41d4-a716-446655440001
        workspace_id: 770e8400-e29b-41d4-a716-446655440002
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '

        API Key authentication for Public API v1 endpoints.


        **Format:** `nudg3_live_ak_xxx...` or `nudg3_test_ak_xxx...`


        **Usage:**

        ```

        Authorization: Bearer nudg3_live_ak_your_key_here

        ```


        Or use the header:

        ```

        X-API-Key: nudg3_live_ak_your_key_here

        ```


        **Obtain API Keys:**

        Generate API keys from your Nudg3 dashboard under Settings > API Keys.


        **Tiers:**

        - **Basic:** `read:analytics` scope - Analytics endpoints only

        - **Premium:** `read:analytics` + `export:data` scopes - Analytics + Exports

        '
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '

        JWT authentication for internal dashboard endpoints.


        Obtain tokens via `/auth/login` endpoint.

        '
externalDocs:
  description: Nudg3 API Documentation
  url: https://docs.nudg3.com/api