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

# List campaign numbers

> Returns the numbers attached to the campaign at the US 10DLC registry, as `{"numberPreviews": [...]}`. Each entry gives the number, its country and the registry `numberKey`, which you can pass in `numberKeys` on the number endpoints.



## OpenAPI

````yaml openapi-sms.yaml GET /10dlc/campaigns/{id}/numbers
openapi: 3.0.3
info:
  title: Vobiz Messaging API
  description: >
    Send and receive SMS, MMS and RCS messages, buy messaging numbers, register
    for

    US 10DLC and toll-free, run broadcasts, manage conversations, opt-outs and
    webhooks.


    **Base URL:** `https://api.vobiz.ai/api/v1/sms`


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers.

    The account is taken from your credentials; you never put an account ID in a
    path or body.

    Field names in this API are camelCase.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://vobiz.ai
servers:
  - url: https://api.vobiz.ai/api/v1/sms
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Messages
    description: Send messages and inspect their delivery state.
  - name: Numbers
    description: >-
      Messaging-capable numbers on your account, inventory search, purchase and
      release.
  - name: Coverage
    description: Where you can send, per country.
  - name: Conversations
    description: Two-way threads between one of your numbers and a contact.
  - name: Opt-outs
    description: Numbers that must not receive messages on a channel.
  - name: Webhooks
    description: Subscriptions that deliver message and broadcast events to your server.
  - name: Broadcasts
    description: Bulk sends from an uploaded recipient list.
  - name: RCS Senders
    description: RCS sender (agent) identities and their message templates.
  - name: 10DLC Brands
    description: US 10DLC brand registration.
  - name: 10DLC Campaigns
    description: US 10DLC campaigns, toll-free verification and supporting documents.
paths:
  /10dlc/campaigns/{id}/numbers:
    get:
      tags:
        - 10DLC Campaigns
      summary: List campaign numbers
      description: >-
        Returns the numbers attached to the campaign at the US 10DLC registry,
        as `{"numberPreviews": [...]}`. Each entry gives the number, its country
        and the registry `numberKey`, which you can pass in `numberKeys` on the
        number endpoints. Use it to confirm which numbers the registry
        associates with the campaign.
      operationId: list-campaign-numbers
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            Campaign ID (UUID) returned by `POST /10dlc/campaigns` or `POST
            /10dlc/campaigns/toll-free`. An unknown ID, an ID from another
            account, or a value that is not a UUID returns `404` with
            `{"error":"campaign not found"}`.
          schema:
            type: string
            format: uuid
          example: 4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24
      responses:
        '200':
          description: Numbers attached to the campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNumberList'
              example:
                numberPreviews:
                  - numberKey: 6f5e4d3c2b1a4c9d8e7f0a1b2c3d4e5f
                    number: '14155550100'
                    countryCode: US
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: The campaign does not exist on your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: campaign not found
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          description: The US 10DLC registry did not answer. Retry the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenDLCError'
              example:
                error: registration provider unavailable
                providerError: 'registration error 500 (HTTP 500): upstream timeout'
      x-codeSamples:
        - lang: typescript
          label: Node SDK
          source: >
            import { VobizClient } from "@vobiz/sdk";


            const client = new VobizClient({ apiKey: "MA_XXXXXXXX", authToken:
            "YOUR_AUTH_TOKEN" });


            await client.sms.campaigns.listCampaignNumbers({
                id: "4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24"
            })
        - lang: python
          label: Python SDK
          source: |
            from vobiz import Vobiz

            client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")

            client.sms.campaigns.list_campaign_numbers(
                id="4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24",
            )
        - lang: go
          label: Go SDK
          source: |
            import (
                "context"

                vobiz "github.com/vobiz-ai/Vobiz-Go-SDK"
                "github.com/vobiz-ai/Vobiz-Go-SDK/client"
                "github.com/vobiz-ai/Vobiz-Go-SDK/option"
                "github.com/vobiz-ai/Vobiz-Go-SDK/sms"
            )

            c := client.NewClient(
                option.WithAPIKey("MA_XXXXXXXX"),
                option.WithAuthToken("YOUR_AUTH_TOKEN"),
            )

            request := &sms.ListCampaignNumbersRequest{
                    ID: "4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24",
                }
            c.Sms.Campaigns.ListCampaignNumbers(
                    context.TODO(),
                    request,
                )
        - lang: java
          label: Java SDK
          source: |
            import com.vobiz.api.VobizApiClient;

            VobizApiClient client = VobizApiClient
                .builder()
                .apiKey("MA_XXXXXXXX")
                .authToken("YOUR_AUTH_TOKEN")
                .build();

            client.sms().campaigns().listCampaignNumbers(
                "4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24",
                ListCampaignNumbersRequest
                    .builder()
                    .build()
            );
        - lang: ruby
          label: Ruby SDK
          source: >
            require 'vobiz'


            client = Vobiz::Client.new(api_key: 'MA_XXXXXXXX', auth_token:
            'YOUR_AUTH_TOKEN')


            client.sms.campaigns.list_campaign_numbers(id:
            "4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24")
        - lang: csharp
          label: C# SDK
          source: |
            using Vobiz;
            using Vobiz.Sms;

            var client = new VobizApiClient("YOUR_AUTH_TOKEN", "MA_XXXXXXXX");

            await client.Sms.Campaigns.ListCampaignNumbersAsync(
                new ListCampaignNumbersRequest { Id = "4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24" }
            );
        - lang: php
          label: PHP SDK
          source: >
            <?php


            require 'vendor/autoload.php';


            use Vobiz\VobizClient;


            $client = new VobizClient(apiKey: 'MA_XXXXXXXX', authToken:
            'YOUR_AUTH_TOKEN');


            $client->sms->campaigns->listCampaignNumbers(
                '4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24',
            );
components:
  schemas:
    CampaignNumberList:
      type: object
      properties:
        numberPreviews:
          type: array
          items:
            $ref: '#/components/schemas/CampaignNumberPreview'
          description: One entry per attached number. Empty when no numbers are attached.
      description: Numbers the US 10DLC registry associates with a campaign.
    Error:
      type: object
      description: >-
        The body of every error response: a flat object with one `error` string
        that explains what went wrong. Use the HTTP status code to decide how to
        handle the error, and log `error` for diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          example: 'recipient has opted out: +14155550123'
          description: >-
            Human-readable explanation of the error, for example `phoneNumber is
            required` or `recipient has opted out: +14155550123`. Branch on the
            HTTP status code rather than on this text.
    TenDLCError:
      description: >-
        Error returned when the US 10DLC registry declines or cannot process a
        request. `error` is a human-readable message you can show or log. When
        the registry answers with `400`, `404`, `409`, `422` or `429`, the same
        status is passed through with this body; `502` means the registry did
        not answer and `503` means it did not accept Vobiz's service
        credentials.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            providerError:
              type: string
              description: >-
                Opaque diagnostic string you can quote to support. Do not parse
                it.
              example: 'registration error 400 (HTTP 400): brand legalName is required'
    CampaignNumberPreview:
      type: object
      properties:
        numberKey:
          type: string
          description: >-
            Registry key for the number. Pass it in `numberKeys` on campaign
            number requests.
          example: 6f5e4d3c2b1a4c9d8e7f0a1b2c3d4e5f
        number:
          type: string
          description: >-
            The number, as digits with country code and no `+` (for example
            `14155550100`).
          example: '14155550100'
        countryCode:
          type: string
          example: US
          description: ISO 3166-1 alpha-2 country code of the number, for example `US`.
      description: One number attached to a campaign at the US 10DLC registry.
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing or invalid credentials
    ServerError:
      description: Unexpected error. Retry with the same idempotency key where one applies.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal error
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.