Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.astradial.com/llms.txt

Use this file to discover all available pages before exploring further.

Manage SIP extensions, user accounts, and their call-routing rules.

Authentication

JWT bearer token or API key with users.* permission. See Authentication.

List users

GET /api/v1/users
curl -X GET https://your-server:8000/api/v1/users \
  -H "Authorization: Bearer $JWT"
Response:
[
  {
    "id": "20f84360-3b20-437c-8651-87cd7d36e859",
    "org_id": "...",
    "username": "org_example_1001",
    "extension": "1001",
    "full_name": "Hari Surya",
    "email": "[email protected]",
    "role": "admin",
    "status": "active",
    "call_recording": true,
    "ring_target": "sip",
    "phone_number": null,
    "outbound_did": null,
    "created_at": "2026-03-01T00:00:00Z"
  }
]

Create a user

POST /api/v1/users
curl -X POST https://your-server:8000/api/v1/users \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "extension": "1099",
    "full_name": "Alice Agent",
    "email": "[email protected]",
    "role": "agent",
    "ring_target": "sip",
    "call_recording": true
  }'
FieldTypeRequiredNotes
extensionstringYes4-digit, unique within org
full_namestringYes
emailstringYesMust be unique across all Astradial accounts
rolestringNoowner, admin, supervisor, agent. Default agent.
ring_targetstringNosip (SIP phone) or phone (external number). Default sip.
phone_numberstringIf ring_target=phoneE.164 format
call_recordingbooleanNoDefault inherits org setting
outbound_didstringNoPer-user caller ID override
Response (201): the created user, plus auto-generated SIP credentials you’ll use to register a softphone.

Update a user

PUT /api/v1/users/{id}
All fields optional. Dialplan regenerates automatically on change.
curl -X PUT https://your-server:8000/api/v1/users/<id> \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{"ring_target":"phone","phone_number":"+919944421125"}'

Delete a user

DELETE /api/v1/users/{id}
curl -X DELETE https://your-server:8000/api/v1/users/<id> \
  -H "Authorization: Bearer $JWT"
Removes the SIP endpoint and regenerates the dialplan. Historical CDR records are preserved.

Get a user’s SIP credentials

GET /api/v1/users/{id}/sip-credentials
Use these to register a softphone against the user’s extension.
curl -X GET https://your-server:8000/api/v1/users/<id>/sip-credentials \
  -H "Authorization: Bearer $JWT"
Response:
{
  "username": "org_example_1099",
  "password": "generated-password",
  "domain": "devsip.astradial.com",
  "port": 5060,
  "transport": "UDP"
}
SIP passwords are returned in plaintext. Do not log this response. Rotate credentials via the dashboard if exposed.

Error responses

CodeMeaning
409Extension or email already in use
422Invalid role / ring_target / etc.
404User not in your org