This documentation is built and maintained by the Flireo AI team to help you create, launch, and scale intelligent phone agents. Access the dashboard here.
| Endpoint | Method | Description |
|---|---|---|
/v1/assistants/{id}/phone-number | GET | Get linked phone number |
/v1/assistants/{id}/phone-number | POST | Link a phone number |
/v1/assistants/{id}/phone-number | DELETE | Unlink phone number |
GET /v1/assistants/{id}/phone-number| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Assistant ID |
{
"data": {
"assistant_id": "660e8400-e29b-41d4-a716-446655440000",
"assistant_name": "Customer Support Agent",
"phone_number": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "+31201234567",
"type": "local",
"locality": "Amsterdam",
"origin": "custom"
}
}
}{
"data": {
"assistant_id": "660e8400-e29b-41d4-a716-446655440000",
"assistant_name": "Customer Support Agent",
"phone_number": null
}
}POST /v1/assistants/{id}/phone-number| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Assistant ID |
| Field | Type | Required | Description |
|---|---|---|---|
phone_number_id | uuid | Yes | The ID of the phone number to link |
{
"message": "Phone number linked successfully",
"data": {
"assistant_id": "660e8400-e29b-41d4-a716-446655440000",
"phone_number": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "+31201234567",
"type": "local",
"locality": "Amsterdam"
},
"previous_phone_number_id": null,
"released_assistants": 0
}
}released_assistants field shows how many were affected.DELETE /v1/assistants/{id}/phone-number| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Assistant ID |
{
"message": "Phone number unlinked successfully",
"data": {
"assistant_id": "660e8400-e29b-41d4-a716-446655440000",
"unlinked_phone_number": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "+31201234567"
}
}
}{
"type": "object",
"properties": {
"phone_number_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the phone number to link (from GET /v1/phone-numbers)"
}
},
"required": ["phone_number_id"]
}{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"assistant_id": { "type": "string", "format": "uuid" },
"assistant_name": { "type": "string" },
"phone_number": {
"type": "object",
"nullable": true,
"properties": {
"id": { "type": "string", "format": "uuid" },
"number": { "type": "string" },
"type": { "type": "string", "enum": ["local", "mobile", "national"], "nullable": true },
"locality": { "type": "string", "nullable": true },
"origin": { "type": "string", "enum": ["default", "custom"] }
}
}
}
}
}
}{
"type": "object",
"properties": {
"message": { "type": "string" },
"data": {
"type": "object",
"properties": {
"assistant_id": { "type": "string", "format": "uuid" },
"phone_number": {
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" },
"number": { "type": "string" },
"type": { "type": "string", "nullable": true },
"locality": { "type": "string", "nullable": true }
}
},
"previous_phone_number_id": { "type": "string", "format": "uuid", "nullable": true },
"released_assistants": { "type": "integer" }
}
}
}
}{
"type": "object",
"properties": {
"message": { "type": "string" },
"data": {
"type": "object",
"properties": {
"assistant_id": { "type": "string", "format": "uuid" },
"unlinked_phone_number": {
"type": "object",
"nullable": true,
"properties": {
"id": { "type": "string", "format": "uuid" },
"number": { "type": "string" }
}
}
}
}
}
}| Code | HTTP Status | Description |
|---|---|---|
invalid_parameters | 400 | Invalid phone_number_id format |
not_found | 404 | Assistant or phone number not found |
forbidden | 403 | Phone number does not belong to you |
already_linked | 400 | Phone number already linked to this assistant |
already_in_use | 400 | Custom phone number is linked to another assistant |
no_phone_number | 400 | No phone number to unlink |