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

# Remove an RCS agent test device

> Removes a test device from an RCS agent and its provider registration.



## OpenAPI

````yaml /openapi/source/external/messaging/rcs-registration.json delete /rcs/agents/{id}/test_devices/{test_device_id}
openapi: 3.1.0
info:
  title: Telnyx RCS Registration API
  description: >-
    Create RCS brands and agents, submit them for external review, manage test
    devices, and track carrier launch.
  version: 1.0.0
  contact:
    email: support@telnyx.com
  x-latency-category: responsive
  x-endpoint-cost: light
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: RCS Brands
    description: Manage the legal business entities that operate RCS agents.
  - name: RCS Agents
    description: Manage RCS agent registration, testing, verification, and launch.
paths:
  /rcs/agents/{id}/test_devices/{test_device_id}:
    delete:
      tags:
        - RCS Agents
      summary: Remove an RCS agent test device
      description: Removes a test device from an RCS agent and its provider registration.
      operationId: RemoveRcsAgentTestDevice
      parameters:
        - $ref: '#/components/parameters/AgentId'
        - $ref: '#/components/parameters/TestDeviceId'
      responses:
        '204':
          description: The test device was removed.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '502':
          $ref: '#/components/responses/ProviderError'
      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
            });

            await client.rcs.agents.testDevices.delete('id', 'test_device_id');
        - 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
            )
            client.rcs.agents.test_devices.delete(
                "id",
                "test_device_id",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\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\terr := client.Rcs.Agents.TestDevices.Delete(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\t\"test_device_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

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

            public final class Main {
                private Main() {}

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

                    client.rcs().agents().testDevices().delete("id", "test_device_id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response = telnyx.rcs.agents.test_devices.delete("id",
            "test_device_id")


            puts(response)
        - 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 {
              $response = $client->rcs->agents->testDevices->delete(
                'id',
                'test_device_id',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx rcs:agents:test-devices delete \
              --api-key 'My API Key' \
              --id id \
              --test-device-id test_device_id
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: The Telnyx-assigned agent identifier.
      schema:
        type: string
        format: uuid
    TestDeviceId:
      name: test_device_id
      in: path
      required: true
      description: The Telnyx-assigned test device identifier.
      schema:
        type: string
        format: uuid
  responses:
    Unauthorized:
      description: The request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: >-
        The resource does not exist, is not owned by the organization, or the
        provider does not support the requested capability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ProviderError:
      description: The RCS provider rejected or could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
        errors:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
      example:
        detail: The requested RCS resource was not found.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````