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

# Get a customer service record

> Get a specific customer service record.



## OpenAPI

````yaml /openapi/source/external/porting/customer_service_record.json get /customer_service_records/{customer_service_record_id}
openapi: 3.1.0
info:
  version: 2.0.0
  title: Telnyx API
  x-latency-category: responsive
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Customer Service Record
    description: Customer Service Record operations
  - name: Callbacks
    description: Callbacks
paths:
  /customer_service_records/{customer_service_record_id}:
    get:
      tags:
        - Customer Service Record
      summary: Get a customer service record
      description: Get a specific customer service record.
      operationId: GetCustomerServiceRecord
      parameters:
        - $ref: '#/components/parameters/PathCustomerServiceRecordId'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CustomerServiceRecord'
        '401':
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/ResourceNotFoundErrorResponse'
        '500':
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


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


            const customerServiceRecord = await
            client.customerServiceRecords.retrieve(
              'customer_service_record_id',
            );


            console.log(customerServiceRecord.data);
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            customer_service_record = client.customer_service_records.retrieve(
                "customer_service_record_id",
            )
            print(customer_service_record.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcustomerServiceRecord, err := client.CustomerServiceRecords.Get(context.TODO(), \"customer_service_record_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", customerServiceRecord.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.customerservicerecords.CustomerServiceRecordRetrieveParams;

            import
            com.telnyx.sdk.models.customerservicerecords.CustomerServiceRecordRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    CustomerServiceRecordRetrieveResponse customerServiceRecord = client.customerServiceRecords().retrieve("customer_service_record_id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            customer_service_record =
            telnyx.customer_service_records.retrieve("customer_service_record_id")


            puts(customer_service_record)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $customerServiceRecord = $client->customerServiceRecords->retrieve(
                'customer_service_record_id'
              );

              var_dump($customerServiceRecord);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx customer-service-records retrieve \
              --api-key 'My API Key' \
              --customer-service-record-id customer_service_record_id
components:
  parameters:
    PathCustomerServiceRecordId:
      name: customer_service_record_id
      in: path
      description: The ID of the customer service record
      required: true
      schema:
        type: string
  schemas:
    CustomerServiceRecord:
      type: object
      properties:
        id:
          description: Uniquely identifies this customer service record
          type: string
          format: uuid
          example: f1486bae-f067-460c-ad43-73a92848f902
          readOnly: true
        phone_number:
          description: The phone number of the customer service record.
          type: string
          example: '+12065551212'
        status:
          description: The status of the customer service record
          type: string
          enum:
            - pending
            - completed
            - failed
          example: completed
        error_message:
          description: >-
            The error message in case status is `failed`. This field would be
            null in case of `pending` or `completed` status.
          type:
            - string
            - 'null'
          example: CSR information not available.
        result:
          description: >-
            The result of the CSR request. This field would be null in case of
            `pending` or `failed` status.
          type:
            - object
            - 'null'
          properties:
            carrier_name:
              description: The name of the carrier that the customer service record is for.
              type: string
              example: ABC CARRIER, INC.
            associated_phone_numbers:
              description: The associated phone numbers of the customer service record.
              type: array
              items:
                type: string
                example: '+12065551212'
            admin:
              description: The admin of the customer service record.
              type: object
              properties:
                name:
                  description: The name of the customer service record.
                  type: string
                  example: John Doe
                billing_phone_number:
                  description: The billing phone number of the customer service record.
                  type: string
                  example: '+12065551212'
                account_number:
                  description: The account number of the customer service record.
                  type: string
                  example: '1234567890'
                authorized_person_name:
                  description: The authorized person name of the customer service record.
                  type: string
                  example: John Doe
            address:
              description: The address of the customer service record
              type: object
              properties:
                administrative_area:
                  description: The state of the address
                  type: string
                  example: NY
                locality:
                  description: The city of the address
                  type: string
                  example: New York
                postal_code:
                  description: The zip code of the address
                  type: string
                  example: '10001'
                street_address:
                  description: The street address
                  type: string
                  example: 123 Main St
                full_address:
                  description: The full address
                  type: string
                  example: 123 Main St; New York; NY; 10001
        webhook_url:
          type: string
          description: Callback URL to receive webhook notifications.
          example: https://example.com/webhook
        record_type:
          type: string
          example: customer_service_record
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527Z'
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527Z'
          readOnly: true
    UnauthorizedError:
      allOf:
        - $ref: '#/components/schemas/GenericError'
        - properties:
            code:
              example: '10009'
              type: string
            title:
              example: Authentication failed
              type: string
            detail:
              example: >-
                The required authentication headers were either invalid or not
                included in the request.
              type: string
            meta:
              type: object
              properties:
                url:
                  type: string
                  example: https://developers.telnyx.com/docs/overview/errors/10009
          type: object
    ForbiddenError:
      allOf:
        - $ref: '#/components/schemas/GenericError'
        - properties:
            code:
              example: '10010'
              type: string
            title:
              example: Authorization failed
              type: string
            detail:
              example: >-
                You do not have permission to perform the requested action on
                the specified resource or resources.
              type: string
            meta:
              type: object
              properties:
                url:
                  type: string
                  example: https://developers.telnyx.com/docs/overview/errors/10010
          type: object
    ResourceNotFoundError:
      allOf:
        - $ref: '#/components/schemas/GenericError'
        - properties:
            code:
              example: '10005'
              type: string
            title:
              example: Resource not found
              type: string
            detail:
              example: The requested resource or URL could not be found.
              type: string
            meta:
              type: object
              properties:
                url:
                  type: string
                  example: https://developers.telnyx.com/docs/overview/errors/10005
          type: object
    UnexpectedError:
      allOf:
        - $ref: '#/components/schemas/GenericError'
        - properties:
            code:
              example: '10007'
              type: string
            title:
              example: Unexpected error
              type: string
            detail:
              example: An unexpected error occurred.
              type: string
            meta:
              type: object
              properties:
                url:
                  type: string
                  example: https://developers.telnyx.com/docs/overview/errors/10007
          type: object
    GenericError:
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  responses:
    UnauthorizedErrorResponse:
      description: >-
        The required authentication headers were either invalid or not included
        in the request.
      content:
        application/json:
          schema:
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/UnauthorizedError'
    ForbiddenErrorResponse:
      description: >-
        You do not have permission to perform the requested action on the
        specified resource or resources.
      content:
        application/json:
          schema:
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ForbiddenError'
    ResourceNotFoundErrorResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ResourceNotFoundError'
    UnexpectedErrorResponse:
      description: An unexpected error occurred.
      content:
        application/json:
          schema:
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/UnexpectedError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````