Skip to content

OpenAPI REST

Thirdlane REST API

Thirdlane provides a REST API with interactive documentation powered by Scalar. The API documentation is available at /apitest/openapi/ on your server, and from the Tools > OpenAPI REST menu item in Configuration Manager.

The API uses HTTP verbs and a RESTful endpoint structure. Request and response payloads are formatted as JSON. All API definitions follow the OpenAPI 3.1 specification.

What Can You Do with Thirdlane REST API

Thirdlane API allows you to create, update and delete configuration objects across 29 API endpoints, organized in two categories:

Platform Administration (global scope):

  • Tenant Management
  • Administrator Management
  • Reseller Management
  • Server Management
  • Location Management
  • SIP Trunk Management

Tenant Configuration (tenant-scoped):

  • User Extensions Management
  • Agent Management
  • Queue Management
  • Hunt Group Management
  • Pickup Group Management
  • DID Management
  • Inbound Routes Management
  • Outbound Routes Management
  • IVR / Voice Menu Management
  • Schedule Management
  • Feature Code Management
  • Special Endpoints Management
  • Mailbox Management
  • Conference Room Management
  • Company Contacts Management
  • Department, Emergency Location, and Tag Management
  • Managed Device Management
  • Web Call Widget Management
  • Office Mode Management
  • API Key and Webhook Management

How to Use the Interactive API Documentation

The API documentation interface provides a convenient way to explore and test the REST API.

Selecting a Tenant

For tenant-scoped operations, use the tenant selector at the top of the page to choose which tenant to work with. The selected tenant is automatically applied to all API paths.

Testing API Calls

Each endpoint includes a Test Request button that sends the request using your active Configuration Manager session. No additional authentication setup is needed when accessed from within the application.

API Categories

  • Platform Administration — Operations on global objects like tenants, servers, and administrators
  • Tenant Configuration — Operations on tenant-scoped objects like extensions, queues, and routes

How to Use Thirdlane REST API Programmatically

You can use Thirdlane REST API from applications written in any language capable of submitting HTTP requests and processing JSON. Here are examples using curl.

Authentication

API requests require authentication via Basic Authentication:

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/ \
--user username:password

Curl Example: List Tenants

This example lists all tenants the authenticated user has permission to access:

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/ \
-X GET --user username:password

Curl Example: Create a Tenant

This example creates a tenant “test1000” cloned from “thirdlane”:

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/ \
-X POST --user username:password \
-H "Content-Type: application/json" \
--data-binary '{
"tenant": "test1000",
"callerid": "14155551212",
"emergency_callerid": "14155551313",
"tenant_to_clone": "thirdlane",
"tenant_limits": "1",
"tenant_routes": "1",
"tenant_schedules": "1",
"tenant_menus": "1",
"tenant_queues": "1",
"tenant_voiceprompts": "1",
"description": "Test tenant"
}'

Curl Example: Create a User Extension

This example creates extension “201” for tenant “thirdlane”:

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/thirdlane/extensions/ \
-X POST --user username:password \
-H "Content-Type: application/json" \
--data-binary '{
"name": "201",
"protocol": "SIP",
"last_name": "Last",
"first_name": "First",
"email": "test@example.com"
}'

Curl Example: List Extensions for a Tenant

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/thirdlane/extensions/ \
-X GET --user username:password

Curl Example: Update an Extension

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/thirdlane/extensions/201 \
-X PUT --user username:password \
-H "Content-Type: application/json" \
--data-binary '{
"callerid": "John Doe <201>",
"email": "john.doe@example.com"
}'

Curl Example: Delete an Extension

Terminal window
curl https://yourhost.yourdomain.com/api/tenants/thirdlane/extensions/201 \
-X DELETE --user username:password

Note: When using self-signed certificates, add --insecure to curl commands. Do not use this option in production environments.