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

# Get Agent Transfer Variables

> Get agent transfer variables before configuring a Connect To Agent node in an IVR menu.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

Get agent transfer variables before configuring a Connect To Agent node in an IVR menu. The response reads the target's latest published version so you can provide the fallback values required for publishing.

## Before you begin

* Publish the non-IVR target agent in the same workspace.
* Get its ID from [List Agents](/docs/api-reference/v1/agents/list).

## Get Agent Transfer Variables Request

```http theme={null}
GET /v1/agents/agent_abc123/transfer-variables
```

## Verify the result

A `200` response contains `data.variables` and `data.defaults`. Set a non-empty string fallback for every returned variable on the IVR node. Defaults include existing string values that can prefill those fields. This endpoint does not save those values.

## Errors and recovery

`401` means the API key is missing or invalid. Missing, deleted, unpublished, or out-of-workspace targets return empty variables and defaults. An empty response alone does not prove the target is usable; verify its published state. Reads are safe to retry.

## Related endpoints

* [IVR handoff variables](/docs/agents/ivr-agents#handoff-variables-and-publishing-warnings)
* [Update Agent](/docs/api-reference/v1/agents/update)


## OpenAPI

````yaml GET /v1/agents/{id}/transfer-variables
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
paths:
  /v1/agents/{id}/transfer-variables:
    get:
      tags:
        - Agents
      summary: Get Agent Transfer Variables
      description: >-
        Returns required variables and string defaults from the target agent's
        latest published version. Missing, deleted, unpublished, or
        out-of-workspace targets return empty variables and defaults.
      operationId: getAgentTransferVariables
      parameters:
        - name: id
          in: path
          required: true
          schema:
            example: agent_2g7Xy3tY53gRlp
            type: string
          description: Agent ID from List Agents.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: boolean
                  statusCode:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      variables:
                        type: array
                        items:
                          type: string
                      defaults:
                        type: object
                        additionalProperties:
                          type: string
                    required:
                      - variables
                      - defaults
                  timestamp:
                    type: string
                    format: date-time
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
              examples:
                success:
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      variables:
                        - customer_name
                      defaults:
                        customer_name: caller
                    timestamp: '2026-09-07T06:00:00.000Z'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 401
                    message: Missing or invalid API key.
                    error: Unauthorized
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: phone_number must be a valid E.164 phone number
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````