Skip to content
Docs

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

MethodPathSummary
GET/calls/destinationsList destinations
POST/calls/destinationsCreate CallDestination
GET/calls/destinations/{id}Get CallDestination
PATCH/calls/destinations/{id}Update CallDestination
DELETE/calls/destinations/{id}Delete CallDestination
GET/calls/logCall log (filters: state, qualification, partner_id, offer_id, number_id, attribution, has_recording, q)
GET/calls/log/{id}Get a call
GET/calls/numbersList numbers
POST/calls/numbersCreate CallNumber
GET/calls/numbers/{id}Get CallNumber
PATCH/calls/numbers/{id}Update CallNumber
DELETE/calls/numbers/{id}Delete CallNumber
GET/calls/numbers/availableSearch purchasable numbers at the provider
GET/calls/poolsList pools
POST/calls/poolsCreate CallPool
GET/calls/pools/{id}Get CallPool
PATCH/calls/pools/{id}Update CallPool
DELETE/calls/pools/{id}Delete CallPool
POST/calls/pools/{id}/publishRepublish the pool to Redis (DNI assignment source)
GET/calls/pools/{id}/snippetDNI script tag for the pool
GET/calls/providerCall provider settings (secret write-only)
PUT/calls/providerSet the telephony provider (twilio|fake), credentials and public webhook origin
GET/calls/routesList routes
POST/calls/routesCreate CallRoute
GET/calls/routes/{id}Get CallRoute
PATCH/calls/routes/{id}Update CallRoute
DELETE/calls/routes/{id}Delete CallRoute
GET/calls/statsCall 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/statsPartner portal: own call totals, by number and recent calls

GET /calls/destinations

List destinations

Operation getCallsDestinations. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CallDestinationList
defaulterrorapplication/json Error
bash
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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /calls/destinations

Create CallDestination

Operation postCallsDestinations. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): CallDestinationCreate

FieldTypeFlagsDescription
namestringrequired
e164stringrequired
offer_idstring
advertiser_idstring
timezonestring
business_hoursobject (free-form)mon..sun -> [[HH:MM,HH:MM]]; empty = always open
statusenum: active, paused
StatusDescriptionBody
201okapplication/json CallDestination
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

GET /calls/destinations/{id}

Get CallDestination

Operation getCallsDestinationsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json CallDestination
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/destinations/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /calls/destinations/{id}

Update CallDestination

Operation patchCallsDestinationsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): CallDestinationUpdate

FieldTypeFlagsDescription
namestring
e164string
offer_idstring
advertiser_idstring
timezonestring
business_hoursobject (free-form)mon..sun -> [[HH:MM,HH:MM]]; empty = always open
statusenum: active, paused
StatusDescriptionBody
200okapplication/json CallDestination
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

DELETE /calls/destinations/{id}

Delete CallDestination

Operation deleteCallsDestinationsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/calls/destinations/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "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.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
fromquerystringno
toquerystringno
statequerystringno
qualificationquerystringno
partner_idquerystringno
offer_idquerystringno
number_idquerystringno
route_idquerystringno
attributionquerystringno
has_recordingquerystringno
StatusDescriptionBody
200okapplication/json CallList
defaulterrorapplication/json Error
bash
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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

GET /calls/log/{id}

Get a call

Operation getCallsLogId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Call
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/log/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "id": "",
  "provider_call_sid": "",
  "number_id": "",
  "called_e164": ""
}

GET /calls/numbers

List numbers

Operation getCallsNumbers. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CallNumberList
defaulterrorapplication/json Error
bash
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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /calls/numbers

Create CallNumber

Operation postCallsNumbers. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): CallNumberCreate

FieldTypeFlagsDescription
e164stringrequired
labelstring
countrystring
kindenum: static, pool
pool_idstring
partner_idstring
offer_idstring
route_idstring
statusenum: active, released
purchaseboolean
StatusDescriptionBody
201okapplication/json CallNumber
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

GET /calls/numbers/{id}

Get CallNumber

Operation getCallsNumbersId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json CallNumber
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/numbers/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /calls/numbers/{id}

Update CallNumber

Operation patchCallsNumbersId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): CallNumberUpdate

FieldTypeFlagsDescription
e164string
labelstring
countrystring
kindenum: static, pool
pool_idstring
partner_idstring
offer_idstring
route_idstring
statusenum: active, released
purchaseboolean
StatusDescriptionBody
200okapplication/json CallNumber
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

DELETE /calls/numbers/{id}

Delete CallNumber

Operation deleteCallsNumbersId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/calls/numbers/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

GET /calls/numbers/available

Search purchasable numbers at the provider

Operation getCallsNumbersAvailable. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
countryquerystringno
area_codequerystringno
limitquerystringno
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/numbers/available' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /calls/pools

List pools

Operation getCallsPools. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CallPoolList
defaulterrorapplication/json Error
bash
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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /calls/pools

Create CallPool

Operation postCallsPools. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): CallPoolCreate

FieldTypeFlagsDescription
namestringrequired
offer_idstring
partner_idstring
route_idstring
ttl_secondsinteger
fallback_e164string
statusenum: active, paused
StatusDescriptionBody
201okapplication/json CallPool
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

GET /calls/pools/{id}

Get CallPool

Operation getCallsPoolsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json CallPool
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/pools/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /calls/pools/{id}

Update CallPool

Operation patchCallsPoolsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): CallPoolUpdate

FieldTypeFlagsDescription
namestring
offer_idstring
partner_idstring
route_idstring
ttl_secondsinteger
fallback_e164string
statusenum: active, paused
StatusDescriptionBody
200okapplication/json CallPool
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

DELETE /calls/pools/{id}

Delete CallPool

Operation deleteCallsPoolsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/calls/pools/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

POST /calls/pools/{id}/publish

Republish the pool to Redis (DNI assignment source)

Operation postCallsPoolsIdPublish. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
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:

json
{
  "ok": false
}

GET /calls/pools/{id}/snippet

DNI script tag for the pool

Operation getCallsPoolsIdSnippet. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
swapquerystringno
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/pools/<id>/snippet' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /calls/provider

Call provider settings (secret write-only)

Operation getCallsProvider. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/provider' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "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

FieldTypeFlagsDescription
okboolean
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
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:

json
{
  "ok": false
}

GET /calls/routes

List routes

Operation getCallsRoutes. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CallRouteList
defaulterrorapplication/json Error
bash
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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /calls/routes

Create CallRoute

Operation postCallsRoutes. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): CallRouteCreate

FieldTypeFlagsDescription
namestringrequired
offer_idstring
strategyenum: round_robin, weighted, priority
fallback_e164string
ivrobject (free-form)enabled, prompt, options[{digit,label,destination_id}]
targetsarray of object (free-form)
min_duration_secinteger
require_business_hoursboolean
repeat_window_hoursinteger
goalstring
payoutstring
revenuestring
currencystring
statusenum: active, paused
StatusDescriptionBody
201okapplication/json CallRoute
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

GET /calls/routes/{id}

Get CallRoute

Operation getCallsRoutesId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json CallRoute
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/routes/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /calls/routes/{id}

Update CallRoute

Operation patchCallsRoutesId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): CallRouteUpdate

FieldTypeFlagsDescription
namestring
offer_idstring
strategyenum: round_robin, weighted, priority
fallback_e164string
ivrobject (free-form)enabled, prompt, options[{digit,label,destination_id}]
targetsarray of object (free-form)
min_duration_secinteger
require_business_hoursboolean
repeat_window_hoursinteger
goalstring
payoutstring
revenuestring
currencystring
statusenum: active, paused
StatusDescriptionBody
200okapplication/json CallRoute
defaulterrorapplication/json Error
bash
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:

json
{
  "external_ref": ""
}

DELETE /calls/routes/{id}

Delete CallRoute

Operation deleteCallsRoutesId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/calls/routes/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

GET /calls/stats

Call totals, by day and by partner

Operation getCallsStats. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
fromquerystringno
toquerystringno
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/calls/stats' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "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).

ParameterInTypeRequiredDescription
providerpathenum: twilio, fakeyes
tenantpathstringyes
stepquerystringno

Request body (application/json, required): Ok

FieldTypeFlagsDescription
okboolean
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
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:

json
{
  "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).

ParameterInTypeRequiredDescription
providerpathenum: twilio, fakeyes
tenantpathstringyes
stepquerystringno

Request body (application/json, required): Ok

FieldTypeFlagsDescription
okboolean
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
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:

json
{
  "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.

ParameterInTypeRequiredDescription
fromquerystringno
toquerystringno
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/partner/calls/stats' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}