VoIP phone lines and call management
| Method | Path | Summary |
|---|---|---|
GET | /phone/calls | List calls |
POST | /phone/calls | Make a call |
GET | /phone/lines | List phone lines |
POST | /phone/lines | Provision a phone line |
{% api-endpoint method=“GET” path=“/phone/calls” /%}
List calls
Operation ID: listCalls
| Name | Type | Required | Description |
| ----------- | ---------- | ----------- | ------------- | ----------------------------- |
| page | integer | No | Default: 1 |
| perPage | integer | No | Default: 20 |
| lineId | string | No | - |
| direction | "inbound" | "outbound" | No | Values: inbound, outbound |
Paginated list of calls
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | No | - |
pagination | object | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.phone.listCalls({
page: 1,
perPage: 1,
lineId: "abc-123",
direction: "example-value",
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.phone.list_calls(
page=1,
per_page=1,
line_id="abc-123",
direction="example-value"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/phone/calls?page=1&perPage=1&lineId=abc-123&direction=example-value' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/phone/calls” /%}
Make a call
Operation ID: makeCall
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
fromLineId | string | Yes | - |
toNumber | string | Yes | - |
record | boolean | No | Default: false |
transcribe | boolean | No | Default: false |
webhookUrl | string (uri) | No | - |
Call initiated
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
lineId | string | No | - |
direction | string | No | Values: inbound, outbound |
fromNumber | string | No | - |
toNumber | string | No | - |
status | string | No | - |
duration | integer | No | - |
recordingUrl | string (uri) | No | - |
transcript | string | No | - |
createdAt | string (date-time) | No | - |
updatedAt | string (date-time) | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.phone.makeCall({
fromLineId: "abc-123",
toNumber: "example-value",
record: false,
transcribe: false,
webhookUrl: "https://example.com",
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.phone.make_call(
from_line_id="abc-123",
to_number="example-value",
record=True,
transcribe=True,
webhook_url="https://example.com"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/phone/calls' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"fromLineId": "abc-123",
"toNumber": "example-value",
"record": false,
"transcribe": false,
"webhookUrl": "https://example.com"
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“GET” path=“/phone/lines” /%}
List phone lines
Operation ID: listPhoneLines
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | Default: 1 |
perPage | integer | No | Default: 20 |
Paginated list of phone lines
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | No | - |
pagination | object | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.phone.listPhoneLines({
page: 1,
perPage: 1,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.phone.list_phone_lines(
page=1,
per_page=1
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/phone/lines?page=1&perPage=1' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/phone/lines” /%}
Provision a phone line
Operation ID: provisionPhoneLine
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
areaCode | string | No | - |
country | string | No | Default: "US" |
capabilities | string[] | No | - |
name | string | No | - |
Phone line provisioned
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
number | string | No | - |
name | string | No | - |
status | string | No | - |
capabilities | string[] | No | - |
monthlyCost | number | No | - |
organizationId | string | No | - |
createdAt | string (date-time) | No | - |
updatedAt | string (date-time) | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.phone.provisionPhoneLine({
areaCode: "example-value",
country: "US",
capabilities: [],
name: "example-value",
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.phone.provision_phone_line(
area_code="example-value",
country="example-value",
capabilities=[],
name="example-value"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/phone/lines' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"areaCode": "example-value",
"country": "US",
"capabilities": [],
"name": "example-value"
}'
{% /tab %} {% /tabs %}