Async Jobs

jobID, polling, and asynchronous operations

Several write operations provision or change resources in the background. They respond immediately with a jobID (HTTP 202 Accepted) rather than waiting for completion.

Operations that return a jobID

ActionMethodPath
Create customerPOST/customers
Delete customerDELETE/customers/{customerID}
Update contractPATCH/customers/{customerID}/contract

Example response

{
    "jobID": "ORD-12345-abcde"
}

Store jobID in your system before returning success to your own users.

Poll job status

Single job

GET /v2/jobs/{jobID}
Authorization: Bearer <token>

Example response:

{
    "jobID": "ORD-12345-abcde",
    "type": "New Company",
    "status": "In Progress",
    "customerID": "550e8400-e29b-41d4-a716-446655440000",
    "details": {
        "adminUserID": "660e8400-e29b-41d4-a716-446655440001",
        "numberE164": "441234567890",
        "destination": {
            "registrationServer": "https://...",
            "sipID": "...",
            "sipPassword": "...",
            "stunPort": "...",
            "stunServer": "...",
            "sbcAddress": "p01-s01-gb-plcl.gammaapi.net",
            "transport": {
                "type": "UDP",
                "port": "5060",
                "media": "SRTP"
            }
        }
    }
}

details is populated when provisioning has progressed (admin user, and optionally number or SIP destination). It may be absent early in the job lifecycle. numberE164 appears only when a number was provided in the create request.

When destination is present (typically on hardware-only plans), it includes SIP credentials plus optional provisioning fields:

FieldDescription
registrationServerSIP registration server
sipIDSIP username / endpoint ID
sipPasswordSIP password
stunPortSTUN port
stunServerSTUN server URL
sbcAddressSBC hostname for device provisioning (when configured for the brand)
transportCurrently enabled transport — type, port, and media (e.g. UDP / SRTP)

sbcAddress and transport are omitted when not applicable to the customer's plan or brand.

List jobs

GET /v2/jobs?limit=10&offset=0
Authorization: Bearer <token>

Recommended integration pattern

  1. Call the async endpoint and persist jobID. On POST /customers, send an Idempotency-Key so a retry returns that same jobID.
  2. Poll GET /jobs/{jobID} on an interval (with backoff) until status indicates completion or failure.
  3. Confirm outcome with GET /customers/{customerID} or domain-specific reads (users, numbers).
  4. Optionally subscribe to Webhooks (customer_created, contract_updated, etc.) instead of or in addition to polling.

Synchronous alternatives

These update state inline (no jobID):

ActionMethodPath
Update customer contact detailsPATCH/customers/{customerID}
Suspend customerPOST/customers/{customerID}/suspend
Resume customerPOST/customers/{customerID}/resume

See Customer lifecycle for when to use each.


Did this page help you?