Skip to main content
GET
/
v1
/
voice-agents
Retrieve a list of voice agents
curl --request GET \
  --url https://api.tryhamsa.com/v1/voice-agents \
  --header 'Authorization: <api-key>'
{
  "success": false,
  "message": "success",
  "data": {
    "total": 123,
    "filtered": 123,
    "voiceAgents": [
      {
        "id": "<string>",
        "agentName": "<string>",
        "greetingMessage": "<string>",
        "greetingMessageType": "STATIC",
        "description": "<string>",
        "preamble": "<string>",
        "lang": "<string>",
        "pokeMessages": [
          "<string>"
        ],
        "realTime": true,
        "silenceThreshold": 123,
        "interrupt": true,
        "type": "<string>",
        "outcome": "<string>",
        "outcomeResponseShape": {
          "type": "object",
          "properties": {
            "test": {
              "type": "number",
              "description": "Hello world from Hamsa AI!"
            }
          },
          "required": [
            "test"
          ]
        },
        "projectId": "<string>",
        "apiKeyId": "<string>",
        "voiceId": "<string>",
        "voiceRecordId": "<string>",
        "voiceRecord": {},
        "collectionId": "<string>",
        "isTemplate": true,
        "icon": "<string>",
        "webhookUrl": "https://example.com/webhook",
        "webhookAuth": {
          "authKey": "Token",
          "authSecret": "Secret"
        },
        "params": {},
        "alignment": {
          "greetingMessage": "<string>",
          "preamble": "<string>"
        },
        "tools": {
          "genderDetection": true,
          "smartCallEnd": true
        },
        "webToolsIds": [
          "<string>"
        ],
        "voiceDictionaryIds": [
          "<string>"
        ],
        "knowledgeBaseItemsIds": [
          "<string>"
        ],
        "webToolsOverrides": {},
        "userInactivityTimeout": 123,
        "maxCallDuration": 123,
        "responseDelay": 123,
        "backgroundNoise": true,
        "waitForUserToSpeakFirst": 123,
        "thinkingVoice": true,
        "speakerIdentification": true,
        "llmConfig": {
          "provider": "OpenAI",
          "modelName": "GPT-4.1",
          "baseUrl": "https://api.custom-llm.com/v1",
          "apiKey": "sk-...",
          "temperature": 0.2
        },
        "noiseCancellation": "<string>",
        "cancelNoisePer": "<string>",
        "agenticRag": true,
        "languageDialectSwitcher": true,
        "minInterruptionDuration": 123,
        "vadActivationThreshold": 123,
        "enableAutoGainControl": true,
        "sendDenoisedToStt": true,
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Query Parameters

skip
integer
default:1
take
integer
default:10

A search query to search agents by name

Example:

"Test Agent"

sortField
enum<string>

Optional sort field

Available options:
createdAt
Example:

"createdAt"

sortOrder
enum<string>

Optional sort order

Available options:
asc,
desc
Example:

"desc"

type
string[]

Multi-select filter on the type of the voice agents to return

Example:
["Single Prompt", "Flow Agent"]
language
string[]

Multi-select filter on the language of the voice agents to return

Example:
["ar", "en"]

Response

Successful response

success
boolean
default:false
message
string
default:success
data
object