---
title: "Get a phone number by its ID."
method: GET
path: "/v1/voice-agents/phone-number"
---

# Get a phone number by its ID.

`GET /v1/voice-agents/phone-number`

## Query parameters

- `pid` string, required — Phone number ID

## Response `200`

Successful response

- GetPhoneNumberResponse
  - `success` boolean
  - `message` string
  - `data` PhoneNumberRecord
    - `id` string
    - `number` string
    - `label` string
    - `type` 'TWILIO' | 'SIP'
    - `userId` string
    - `sipInboundConfigs` object
      - `originationUri` 'sip:sip.eu.tryhamsa.com:5060;transport=tcp'
    - `sipOutboundConfigs` object
      - `address` string
      - `transportType` 'TCP' | 'UDP'
      - `customHeaders` object
    - `voiceAgentId` string, nullable
    - `voiceAgent` object
      - `id` string
      - `name` string
    - `createdAt` string
    - `updatedAt` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Server Side Error

---

[API](https://skmtc.net/tryhamsa/apis/hamsa-api.md) · [All operations](https://skmtc.net/tryhamsa/apis/hamsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryhamsa/hamsa-api/versions/ecbeb5d8dc13/schema)
