API reference / Operations by tag
calls
Call tracking: providers, numbers, pools, buyers, routes and call log.
31 operations. Base URL https://api.metrixed.com/v1; see authentication, errors and pagination.
Operations
| Method | Path | Summary |
|---|---|---|
| GET | /calls/destinations | List destinations |
| POST | /calls/destinations | Create CallDestination |
| GET | /calls/destinations/{id} | Get CallDestination |
| PATCH | /calls/destinations/{id} | Update CallDestination |
| DELETE | /calls/destinations/{id} | Delete CallDestination |
| GET | /calls/log | Call log (filters: state, qualification, partner_id, offer_id, number_id, attribution, has_recording, q) |
| GET | /calls/log/{id} | Get a call |
| GET | /calls/numbers | List numbers |
| POST | /calls/numbers | Create CallNumber |
| GET | /calls/numbers/{id} | Get CallNumber |
| PATCH | /calls/numbers/{id} | Update CallNumber |
| DELETE | /calls/numbers/{id} | Delete CallNumber |
| GET | /calls/numbers/available | Search purchasable numbers at the provider |
| GET | /calls/pools | List pools |
| POST | /calls/pools | Create CallPool |
| GET | /calls/pools/{id} | Get CallPool |
| PATCH | /calls/pools/{id} | Update CallPool |
| DELETE | /calls/pools/{id} | Delete CallPool |
| POST | /calls/pools/{id}/publish | Republish the pool to Redis (DNI assignment source) |
| GET | /calls/pools/{id}/snippet | DNI script tag for the pool |
| GET | /calls/provider | Call provider settings (secret write-only) |
| PUT | /calls/provider | Set the telephony provider (twilio|fake), credentials and public webhook origin |
| GET | /calls/routes | List routes |
| POST | /calls/routes | Create CallRoute |
| GET | /calls/routes/{id} | Get CallRoute |
| PATCH | /calls/routes/{id} | Update CallRoute |
| DELETE | /calls/routes/{id} | Delete CallRoute |
| GET | /calls/stats | Call totals, by day and by partner |
| POST | /calls/voice/{provider}/{tenant} | Provider call-control webhook (returns TwiML/JSON); authenticated by the provider signature, not an API key |
| POST | /calls/webhook/{provider}/{tenant} | Provider status + recording webhook; authenticated by the provider signature, not an API key |
| GET | /partner/calls/stats | Partner portal: own call totals, by number and recent calls |
GET /calls/destinations
List destinations
Operation getCallsDestinations. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallDestinationList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/destinations?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /calls/destinations
Create CallDestination
Operation postCallsDestinations. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): CallDestinationCreate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | required | |
e164 | string | required | |
offer_id | string | ||
advertiser_id | string | ||
timezone | string | ||
business_hours | object (free-form) | mon..sun -> [[HH:MM,HH:MM]]; empty = always open | |
status | enum: active, paused |
| Status | Description | Body |
|---|---|---|
| 201 | ok | application/json CallDestination |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/calls/destinations' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"","e164":""}'
Example 201 response:
{
"external_ref": ""
}
GET /calls/destinations/{id}
Get CallDestination
Operation getCallsDestinationsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallDestination |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/destinations/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /calls/destinations/{id}
Update CallDestination
Operation patchCallsDestinationsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): CallDestinationUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | ||
e164 | string | ||
offer_id | string | ||
advertiser_id | string | ||
timezone | string | ||
business_hours | object (free-form) | mon..sun -> [[HH:MM,HH:MM]]; empty = always open | |
status | enum: active, paused |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallDestination |
| default | error | application/json Error |
curl -X PATCH 'https://api.metrixed.com/v1/calls/destinations/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"","e164":"","offer_id":"","advertiser_id":""}'
Example 200 response:
{
"external_ref": ""
}
DELETE /calls/destinations/{id}
Delete CallDestination
Operation deleteCallsDestinationsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/calls/destinations/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
GET /calls/log
Call log (filters: state, qualification, partner_id, offer_id, number_id, attribution, has_recording, q)
Operation getCallsLog. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
from | query | string | no | |
to | query | string | no | |
state | query | string | no | |
qualification | query | string | no | |
partner_id | query | string | no | |
offer_id | query | string | no | |
number_id | query | string | no | |
route_id | query | string | no | |
attribution | query | string | no | |
has_recording | query | string | no |
curl 'https://api.metrixed.com/v1/calls/log?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
GET /calls/log/{id}
Get a call
Operation getCallsLogId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/calls/log/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"id": "",
"provider_call_sid": "",
"number_id": "",
"called_e164": ""
}
GET /calls/numbers
List numbers
Operation getCallsNumbers. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallNumberList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/numbers?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /calls/numbers
Create CallNumber
Operation postCallsNumbers. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): CallNumberCreate
| Field | Type | Flags | Description |
|---|---|---|---|
e164 | string | required | |
label | string | ||
country | string | ||
kind | enum: static, pool | ||
pool_id | string | ||
partner_id | string | ||
offer_id | string | ||
route_id | string | ||
status | enum: active, released | ||
purchase | boolean |
| Status | Description | Body |
|---|---|---|
| 201 | ok | application/json CallNumber |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/calls/numbers' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"e164":""}'
Example 201 response:
{
"external_ref": ""
}
GET /calls/numbers/{id}
Get CallNumber
Operation getCallsNumbersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallNumber |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/numbers/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /calls/numbers/{id}
Update CallNumber
Operation patchCallsNumbersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): CallNumberUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
e164 | string | ||
label | string | ||
country | string | ||
kind | enum: static, pool | ||
pool_id | string | ||
partner_id | string | ||
offer_id | string | ||
route_id | string | ||
status | enum: active, released | ||
purchase | boolean |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallNumber |
| default | error | application/json Error |
curl -X PATCH 'https://api.metrixed.com/v1/calls/numbers/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"e164":"","label":"","country":"","kind":"static"}'
Example 200 response:
{
"external_ref": ""
}
DELETE /calls/numbers/{id}
Delete CallNumber
Operation deleteCallsNumbersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/calls/numbers/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
GET /calls/numbers/available
Search purchasable numbers at the provider
Operation getCallsNumbersAvailable. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
country | query | string | no | |
area_code | query | string | no | |
limit | query | string | no |
curl 'https://api.metrixed.com/v1/calls/numbers/available' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}
GET /calls/pools
List pools
Operation getCallsPools. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallPoolList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/pools?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /calls/pools
Create CallPool
Operation postCallsPools. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): CallPoolCreate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | required | |
offer_id | string | ||
partner_id | string | ||
route_id | string | ||
ttl_seconds | integer | ||
fallback_e164 | string | ||
status | enum: active, paused |
curl -X POST 'https://api.metrixed.com/v1/calls/pools' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":""}'
Example 201 response:
{
"external_ref": ""
}
GET /calls/pools/{id}
Get CallPool
Operation getCallsPoolsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/calls/pools/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /calls/pools/{id}
Update CallPool
Operation patchCallsPoolsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): CallPoolUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | ||
offer_id | string | ||
partner_id | string | ||
route_id | string | ||
ttl_seconds | integer | ||
fallback_e164 | string | ||
status | enum: active, paused |
curl -X PATCH 'https://api.metrixed.com/v1/calls/pools/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"","offer_id":"","partner_id":"","route_id":""}'
Example 200 response:
{
"external_ref": ""
}
DELETE /calls/pools/{id}
Delete CallPool
Operation deleteCallsPoolsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/calls/pools/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
POST /calls/pools/{id}/publish
Republish the pool to Redis (DNI assignment source)
Operation postCallsPoolsIdPublish. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X POST 'https://api.metrixed.com/v1/calls/pools/<id>/publish' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}
GET /calls/pools/{id}/snippet
DNI script tag for the pool
Operation getCallsPoolsIdSnippet. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
swap | query | string | no |
curl 'https://api.metrixed.com/v1/calls/pools/<id>/snippet' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}
GET /calls/provider
Call provider settings (secret write-only)
Operation getCallsProvider. Auth: API key (Bearer) or session cookie.
curl 'https://api.metrixed.com/v1/calls/provider' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}
PUT /calls/provider
Set the telephony provider (twilio|fake), credentials and public webhook origin
Operation putCallsProvider. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): Ok
| Field | Type | Flags | Description |
|---|---|---|---|
ok | boolean |
curl -X PUT 'https://api.metrixed.com/v1/calls/provider' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ok":false}'
Example 200 response:
{
"ok": false
}
GET /calls/routes
List routes
Operation getCallsRoutes. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json CallRouteList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/calls/routes?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /calls/routes
Create CallRoute
Operation postCallsRoutes. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): CallRouteCreate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | required | |
offer_id | string | ||
strategy | enum: round_robin, weighted, priority | ||
fallback_e164 | string | ||
ivr | object (free-form) | enabled, prompt, options[{digit,label,destination_id}] | |
targets | array of object (free-form) | ||
min_duration_sec | integer | ||
require_business_hours | boolean | ||
repeat_window_hours | integer | ||
goal | string | ||
payout | string | ||
revenue | string | ||
currency | string | ||
status | enum: active, paused |
curl -X POST 'https://api.metrixed.com/v1/calls/routes' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":""}'
Example 201 response:
{
"external_ref": ""
}
GET /calls/routes/{id}
Get CallRoute
Operation getCallsRoutesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/calls/routes/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /calls/routes/{id}
Update CallRoute
Operation patchCallsRoutesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): CallRouteUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | ||
offer_id | string | ||
strategy | enum: round_robin, weighted, priority | ||
fallback_e164 | string | ||
ivr | object (free-form) | enabled, prompt, options[{digit,label,destination_id}] | |
targets | array of object (free-form) | ||
min_duration_sec | integer | ||
require_business_hours | boolean | ||
repeat_window_hours | integer | ||
goal | string | ||
payout | string | ||
revenue | string | ||
currency | string | ||
status | enum: active, paused |
curl -X PATCH 'https://api.metrixed.com/v1/calls/routes/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"","offer_id":"","strategy":"round_robin","fallback_e164":""}'
Example 200 response:
{
"external_ref": ""
}
DELETE /calls/routes/{id}
Delete CallRoute
Operation deleteCallsRoutesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/calls/routes/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
GET /calls/stats
Call totals, by day and by partner
Operation getCallsStats. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | no | |
to | query | string | no |
curl 'https://api.metrixed.com/v1/calls/stats' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}
POST /calls/voice/{provider}/{tenant}
Provider call-control webhook (returns TwiML/JSON); authenticated by the provider signature, not an API key
Operation postCallsVoiceProviderTenant. Auth: none (public endpoint).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | enum: twilio, fake | yes | |
tenant | path | string | yes | |
step | query | string | no |
Request body (application/json, required): Ok
| Field | Type | Flags | Description |
|---|---|---|---|
ok | boolean |
curl -X POST 'https://api.metrixed.com/v1/calls/voice/<provider>/<tenant>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ok":false}'
Example 200 response:
{
"ok": false
}
POST /calls/webhook/{provider}/{tenant}
Provider status + recording webhook; authenticated by the provider signature, not an API key
Operation postCallsWebhookProviderTenant. Auth: none (public endpoint).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | enum: twilio, fake | yes | |
tenant | path | string | yes | |
step | query | string | no |
Request body (application/json, required): Ok
| Field | Type | Flags | Description |
|---|---|---|---|
ok | boolean |
curl -X POST 'https://api.metrixed.com/v1/calls/webhook/<provider>/<tenant>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ok":false}'
Example 200 response:
{
"ok": false
}
GET /partner/calls/stats
Partner portal: own call totals, by number and recent calls
Operation getPartnerCallsStats. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | no | |
to | query | string | no |
curl 'https://api.metrixed.com/v1/partner/calls/stats' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"ok": false
}