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

# Retrieve toll-free campaign

> Retrieve a toll-free campaign by ID.



## OpenAPI

````yaml GET /toll_free_campaigns/{campaign_id}
openapi: 3.1.1
info:
  title: Surge
  version: '1.0'
servers:
  - url: https://api.surge.app
security:
  - authorization: []
paths:
  /toll_free_campaigns/{campaign_id}:
    get:
      tags:
        - Toll-Free Campaigns
      summary: Retrieve a toll-free campaign
      description: Retrieves a toll-free campaign object.
      operationId: GetTollFreeCampaign
      parameters:
        - in: path
          name: campaign_id
          required: true
          schema:
            description: The ID of the toll-free campaign to retrieve.
            example: tfc_01j9a43avnfqzbjfch6pygv1td
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TollFreeCampaign'
          description: Toll-free campaign
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Surge from '@surgeapi/node';


            const client = new Surge({
              apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
            });


            const tollFreeCampaign = await
            client.tollFreeCampaigns.retrieve('tfc_01j9a43avnfqzbjfch6pygv1td');


            console.log(tollFreeCampaign.id);
        - lang: Python
          source: |-
            import os
            from surge import Surge

            client = Surge(
                api_key=os.environ.get("SURGE_API_KEY"),  # This is the default and can be omitted
            )
            toll_free_campaign = client.toll_free_campaigns.retrieve(
                "tfc_01j9a43avnfqzbjfch6pygv1td",
            )
            print(toll_free_campaign.id)
        - lang: Ruby
          source: >-
            require "surge_api"


            surge = SurgeAPI::Client.new(api_key: "My API Key")


            toll_free_campaign =
            surge.toll_free_campaigns.retrieve("tfc_01j9a43avnfqzbjfch6pygv1td")


            puts(toll_free_campaign)
components:
  schemas:
    TollFreeCampaign:
      title: TollFreeCampaign
      description: A toll-free campaign registration for a phone number.
      properties:
        consent_flows:
          items:
            $ref: '#/components/schemas/TollFreeCampaignConsentFlow'
          type: array
        description:
          type:
            - string
            - 'null'
        id:
          description: The toll-free campaign ID
          type: string
        includes:
          items:
            enum:
              - age_gated
            type: string
          type: array
        message_samples:
          items:
            type: string
          type: array
        phone_number_id:
          description: The toll-free phone number ID
          type: string
        privacy_policy_url:
          format: uri
          type:
            - string
            - 'null'
        status:
          description: The current status of the toll-free campaign.
          enum:
            - active
            - canceled
            - created
            - in_review
            - rejected
          type: string
        terms_and_conditions_url:
          format: uri
          type:
            - string
            - 'null'
        use_cases:
          items:
            enum:
              - two_factor_authentication
              - account_notification
              - customer_care
              - charity
              - delivery_notification
              - fraud_alert
              - event
              - higher_education
              - k12_education
              - marketing
              - polling_voting
              - political
              - public_service_announcement
              - security_alert
            type: string
          type: array
      required:
        - id
        - phone_number_id
        - status
        - use_cases
        - description
        - message_samples
        - includes
        - privacy_policy_url
        - terms_and_conditions_url
        - consent_flows
      type: object
    ErrorResponse:
      title: ErrorResponse
      description: An error response
      example:
        error:
          message: The requested resource could not be found.
          type: not_found
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      type: object
    TollFreeCampaignConsentFlow:
      title: TollFreeCampaignConsentFlow
      description: A consent flow returned on toll-free campaign responses.
      oneOf:
        - properties:
            script:
              type: string
            type:
              enum:
                - verbal
              type: string
          required:
            - type
            - script
          type: object
        - properties:
            form_url:
              format: uri
              type: string
            type:
              enum:
                - web_form
              type: string
          required:
            - type
            - form_url
          type: object
        - properties:
            screenshot:
              properties:
                reason:
                  enum:
                    - behind_login
                    - under_construction
                    - other
                  type: string
                reason_other:
                  maxLength: 500
                  minLength: 1
                  type: string
              required:
                - reason
              type: object
            type:
              enum:
                - web_form
              type: string
          required:
            - type
            - screenshot
          type: object
        - properties:
            keywords:
              items:
                maxLength: 70
                pattern: ^[a-zA-Z0-9]+$
                type: string
              maxItems: 1
              type: array
            type:
              enum:
                - text
              type: string
          required:
            - type
          type: object
        - properties:
            type:
              enum:
                - paper_form
              type: string
          required:
            - type
          type: object
      type: object
    Error:
      title: Error
      description: An error response
      example:
        message: The requested resource was not found.
        type: not_found
      properties:
        detail:
          additionalProperties: true
          description: Additional details about the error.
          type: object
        message:
          description: A human-readable error message.
          example: The requested resource was not found.
          type: string
        type:
          description: A unique error code.
          example: not_found
          type: string
      required:
        - type
        - message
      type: object
  securitySchemes:
    authorization:
      bearerFormat: Surge API token
      scheme: bearer
      type: http

````

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