> ## 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.

# Add RCS test number

> Adds a test phone number to an RCS agent for testing purposes.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging/rcs.yml put /messaging/rcs/test_number_invite/{id}/{phone_number}
openapi: 3.1.0
info:
  title: Telnyx RCS Messaging API
  version: 2.0.0
  description: API for RCS messaging.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /messaging/rcs/test_number_invite/{id}/{phone_number}:
    put:
      tags:
        - RCS
      summary: Add RCS test number
      description: Adds a test phone number to an RCS agent for testing purposes.
      operationId: InviteATestNumberToRCS
      parameters:
        - name: id
          in: path
          description: RCS agent ID
          required: true
          schema:
            type: string
        - name: phone_number
          in: path
          description: Phone number in E164 format to invite for testing
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Test number successfully invited to RCS agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RCSTestNumberInviteResponse'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse'
      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 response = await
            client.messaging.rcs.inviteTestNumber('phone_number', { id: 'id' });


            console.log(response.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
            )
            response = client.messaging.rcs.invite_test_number(
                phone_number="phone_number",
                id="id",
            )
            print(response.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\tresponse, err := client.Messaging.Rcs.InviteTestNumber(\n\t\tcontext.TODO(),\n\t\t\"phone_number\",\n\t\ttelnyx.MessagingRcInviteTestNumberParams{\n\t\t\tID: \"id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.messaging.rcs.RcInviteTestNumberParams;

            import
            com.telnyx.sdk.models.messaging.rcs.RcInviteTestNumberResponse;


            public final class Main {
                private Main() {}

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

                    RcInviteTestNumberParams params = RcInviteTestNumberParams.builder()
                        .id("id")
                        .phoneNumber("phone_number")
                        .build();
                    RcInviteTestNumberResponse response = client.messaging().rcs().inviteTestNumber(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response = telnyx.messaging.rcs.invite_test_number("phone_number",
            id: "id")


            puts(response)
        - lang: CLI
          source: |-
            telnyx messaging:rcs invite-test-number \
              --api-key 'My API Key' \
              --id id \
              --phone-number phone_number
components:
  schemas:
    RCSTestNumberInviteResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            record_type:
              type: string
              example: rcs.test_number_invite
              enum:
                - rcs.test_number_invite
              description: Identifies the type of the resource
            agent_id:
              type: string
              example: TestAgent
              description: RCS agent ID
            phone_number:
              type: string
              example: '+13125551234'
              description: Phone number that was invited for testing
            status:
              type: string
              example: PENDING
              description: Status of the test number invitation
      required:
        - data
    messaging_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/messaging_Error'
    messaging_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
          x-format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
  responses:
    messaging_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````