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

> ## Agent Instructions
> Every Lath operation is POST https://platform.trylath.com/<operation name with dots replaced by slashes>, with a JSON body and `Authorization: Bearer <key>`. `email.send` is POST /email/send.
> Branch on `error.code`, never on `error.message`. Every refusal also carries `error.fix`, which names the next step.
> Send an `Idempotency-Key` header on any operation that is not retry-safe, so a retry cannot run it twice.
> A `lath_test_` key emails only the account's own members and sends no SMS; a `lath_live_` key reaches real recipients and is billed.
> The OpenAPI document, generated from the same registry as the routes, is at https://platform.trylath.com/openapi.json.

# sms.number.search

> Searches the carrier for local phone numbers that can carry SMS and are free to buy right now, by country and optionally area code or digits the number contains. Returns each number's place and what it can carry (SMS, MMS, voice), with the monthly price from the rate book and how many numbers per live environment are free. Nothing is reserved: a number found here can be taken by someone else before it is bought.



## OpenAPI

````yaml /api-reference/openapi.json post /sms/number/search
openapi: 3.1.0
info:
  title: Lath API
  version: 0.1.0
  description: >-
    Every operation is one POST. The same set is reachable over MCP, the SDK and
    the CLI; nothing is dashboard-only.
servers:
  - url: https://platform.trylath.com
    description: This deployment
security: []
paths:
  /sms/number/search:
    post:
      tags:
        - sms
      summary: sms.number.search
      description: >-
        Searches the carrier for local phone numbers that can carry SMS and are
        free to buy right now, by country and optionally area code or digits the
        number contains. Returns each number's place and what it can carry (SMS,
        MMS, voice), with the monthly price from the rate book and how many
        numbers per live environment are free. Nothing is reserved: a number
        found here can be taken by someone else before it is bought.
      operationId: sms.number.search
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                country:
                  default: US
                  description: >-
                    Country to search. Local numbers in the US and Canada are
                    covered by the carrier registration this product files.
                  type: string
                  enum:
                    - US
                    - CA
                areaCode:
                  type: string
                  pattern: ^[2-9]\d{2}$
                contains:
                  description: >-
                    Digits (or letters, spelled on a keypad) the number must
                    contain, e.g. 555 or LATH.
                  type: string
                  pattern: ^[0-9A-Za-z*]{2,10}$
                limit:
                  default: 10
                  type: integer
                  minimum: 1
                  maximum: 20
              additionalProperties: false
      responses:
        '200':
          description: '{ activityId, result }. activityId is empty for reads.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  activityId:
                    type: string
                    description: The activity this call created, or empty for a read.
                  result:
                    $schema: https://json-schema.org/draft/2020-12/schema
                    type: object
                    properties:
                      numbers:
                        type: array
                        items:
                          type: object
                          properties:
                            phoneNumber:
                              type: string
                            locality:
                              type:
                                - string
                                - 'null'
                            region:
                              type:
                                - string
                                - 'null'
                            capabilities:
                              type: object
                              properties:
                                sms:
                                  type: boolean
                                mms:
                                  type: boolean
                                voice:
                                  type: boolean
                              required:
                                - sms
                                - mms
                                - voice
                              additionalProperties: {}
                          required:
                            - phoneNumber
                            - locality
                            - region
                            - capabilities
                          additionalProperties: {}
                      monthlyCents:
                        description: >-
                          Cents a month for each number above the free ones, in
                          live. Null until the rate is published.
                        type:
                          - number
                          - 'null'
                      freePerEnvironment:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                    required:
                      - numbers
                      - monthlyCents
                      - freePerEnvironment
                    additionalProperties: {}
                required:
                  - activityId
                  - result
        '400':
          description: invalid_input or invalid_json
        '401':
          description: unauthenticated
        '403':
          description: forbidden
        '404':
          description: not_found
        '409':
          description: 'conflict: idempotency_mismatch, email_taken, last_key'
        '413':
          description: body_too_large
        '429':
          description: rate_limited
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A Lath API key: lath_live_sk… or lath_test_sk… on a server,
        lath_live_pk… or lath_test_pk… in a browser.

````