Skip to main content

SIP configuration API

Bring your own number so an agent can answer or place calls. MediaSFU-provided numbers are for outgoing non-AI calls only.

Endpoint: https://mediasfu.com/v1/sipconfigs

Authenticate with Authorization: Bearer <api-username>:<api-key> from your server. Try every action and copy the request in the API Sandbox.

Add a number​

POST https://mediasfu.com/v1/sipconfigs with action: "create"

Register your own SIP number.

Required fields​

FieldTypeDescriptionDefault
contactNumbertextPhone number. The number this config controls, E.164 format.
providertextProvider. Your telephony provider.
curl -X POST https://mediasfu.com/v1/sipconfigs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"create","contactNumber":"+15551234567","provider":"twilio"}'

Update a number​

POST https://mediasfu.com/v1/sipconfigs with action: "update"

Change a SIP config, identified by number.

Required fields​

FieldTypeDescriptionDefault
contactNumbertextPhone number. The number this config controls, E.164 format.
curl -X POST https://mediasfu.com/v1/sipconfigs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"update","contactNumber":"+15551234567"}'

Remove a number​

POST https://mediasfu.com/v1/sipconfigs with action: "delete"

Delete a SIP config by number.

Required fields​

FieldTypeDescriptionDefault
contactNumbertextPhone number. The number this config controls, E.164 format.
curl -X POST https://mediasfu.com/v1/sipconfigs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"delete","contactNumber":"+15551234567"}'

List / get​

GET https://mediasfu.com/v1/sipconfigs with action: "get"

Retrieve records. Everything is optional — send as-is to list all.

No fields are required.

Optional: Filters​

All optional — narrow or page the results.

FieldTypeDescriptionDefault
startIndexnumberStart index0
pageSizenumber (1–100)Page size20
curl "https://mediasfu.com/v1/sipconfigs?action=get" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"

Example response:

{
"success": true,
"sipConfigs": [
{
"id": "65f0c3…",
"name": "primary-trunk",
"provider": "telnyx",
"contactNumber": "+15551234567",
"supportSipActive": true
}
],
"total": 1
}

See errors and response format for failure handling.