Skip to main content
This guide walks you through the minimum steps to go from zero to a live, provisioned extension on LaraCopilot. You will authenticate as the platform admin, create a tenant account, add a VoIP extension to it, and confirm the extension is visible in the system — all using the REST API.
1

Authenticate

Send your admin credentials to POST /api/admin/login. On success the server sets a session cookie that authenticates all subsequent requests.
curl -X POST https://your-domain.com/api/admin/login \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{
    "email": "admin@business.com",
    "password": "admin123"
  }'
Save the cookie jar (the -c cookies.txt flag in cURL) and pass it with every subsequent request using -b cookies.txt.
If the credentials are wrong the API returns HTTP 422 with "message": "Invalid credentials.". Double-check the email and password and retry.
2

Create a tenant

A tenant represents one customer organisation on your platform. Every resource — extensions, DIDs, queues — belongs to a tenant. Send POST /api/tenants with the required fields.
curl -X POST https://your-domain.com/api/tenants \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "name": "Acme Corp",
    "slug": "acme-corp",
    "domain": "acme.your-domain.com",
    "status": "active",
    "timezone": "America/New_York",
    "max_extensions": 50
  }'
Note the id returned in the response — you will use it as tenant_id in the next step.
Both slug and domain must be unique across all tenants. The API returns HTTP 422 with validation errors if either value is already taken.
3

Add an extension

Provision a SIP extension for the tenant. The extension_number is the diallable short code, and secret is the SIP registration password for the endpoint device.
curl -X POST https://your-domain.com/api/extensions \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "tenant_id": 1,
    "extension_number": "1001",
    "display_name": "Alice Smith",
    "email": "alice@acme.example.com",
    "secret": "s3cur3P@ssw0rd",
    "status": "active",
    "voicemail_enabled": true
  }'
The secret field is used as the SIP registration password and is stored as provided. Use a strong, randomly generated value and never reuse passwords across extensions.
4

Verify the extension

Confirm the extension is listed by calling GET /api/extensions. You can optionally filter by search query parameter to narrow results by extension_number, display_name, or email.
curl -X GET "https://your-domain.com/api/extensions?search=1001" \
  -H "Accept: application/json" \
  -b cookies.txt

What’s next

You now have an authenticated session, a tenant, and a live extension. From here you can:
  • Assign a DID — send POST /api/dids to assign a direct inward dialing number to the tenant and route it to the extension.
  • Create a call queue — send POST /api/queues to build an ACD queue and add the extension as an agent.
  • Configure SMS — send POST /api/sms-gateways to attach an SMS gateway to the tenant, then use POST /api/sms-gateways/{smsGateway}/send to send messages.