Prelude Lookup API

Phone number intelligence - line type, carrier, and flags.

OpenAPI Specification

prelude-so-lookup-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Prelude Lookup API
  description: 'Prelude is a phone and email verification, transactional messaging, phone number intelligence (lookup), and anti-fraud API - "the trust layer between your signups and your business." This document models Prelude''s public REST API v2 (base https://api.prelude.dev/v2) across four products: Verify (create / check one-time passcodes over SMS, WhatsApp, RCS, Viber, and voice), Notify (transactional messaging), Lookup / Intel (phone number intelligence - line type, carrier, ported / temporary flags, CNAM), and Watch (anti-fraud risk prediction and feedback). All requests authenticate with a Bearer API key (Authorization: Bearer YOUR_API_KEY) obtained from the Prelude dashboard under All Services > Configure > Keys. Endpoint paths and request / response schemas are grounded in the live Prelude documentation at docs.prelude.so as of 2026-07-11; the Watch events (dispatch-events) endpoint is modeled from documentation references and marked accordingly.'
  version: '2.0'
  contact:
    name: Prelude
    url: https://prelude.so
servers:
- url: https://api.prelude.dev/v2
  description: Prelude API v2
security:
- bearerAuth: []
tags:
- name: Lookup
  description: Phone number intelligence - line type, carrier, and flags.
paths:
  /lookup/{phone_number}:
    get:
      operationId: lookupPhoneNumber
      tags:
      - Lookup
      summary: Look up a phone number
      description: Returns intelligence about a phone number - line type, current and original carrier (network) info, ported / temporary flags, and optionally the caller name (CNAM). Useful for number validation and anti-fraud enrichment.
      parameters:
      - name: phone_number
        in: path
        required: true
        description: An E.164 formatted phone number to look up.
        schema:
          type: string
          example: '+30123456789'
      - name: type
        in: query
        required: false
        description: Optional lookup features to include. Currently supports `cnam` to retrieve the caller ID name (requires enablement on your account).
        schema:
          type: array
          items:
            type: string
            enum:
            - cnam
      responses:
        '200':
          description: Phone number intelligence.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    NetworkInfo:
      type: object
      properties:
        carrier_name:
          type: string
        mcc:
          type: string
          description: Mobile Country Code.
        mnc:
          type: string
          description: Mobile Network Code.
    LookupResponse:
      type: object
      properties:
        phone_number:
          type: string
        country_code:
          type: string
        network_info:
          $ref: '#/components/schemas/NetworkInfo'
        original_network_info:
          $ref: '#/components/schemas/NetworkInfo'
        flags:
          type: array
          description: Flags such as `ported` or `temporary`.
          items:
            type: string
            enum:
            - ported
            - temporary
        caller_name:
          type: string
          description: CNAM data; requires enablement.
        line_type:
          type: string
          enum:
          - mobile
          - fixed_line
          - voip
          - toll_free
          - premium_rate
          - unknown
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        type:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer API key passed as `Authorization: Bearer YOUR_API_KEY`. Obtain keys from the Prelude dashboard under All Services > Configure > Keys.'