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

Read only

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](https://dialnexa.com/docs/api-reference/v1/agents/list.md).

## 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](https://dialnexa.com/docs/agents/ivr-agents.md#handoff-variables-and-publishing-warnings)
* [Update Agent](https://dialnexa.com/docs/api-reference/v1/agents/update.md)


## 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: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
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
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

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