Sandbox

Integration testing without production customers

Use the Partner API sandbox environment to build and test integrations against the same route shapes and schemas as production without affecting live customers.

Base URL

https://api.phonelineplus.com/sandbox

All paths are relative to that base URL (for example, GET /customers means GET https://api.phonelineplus.com/sandbox/customers). Production uses https://api.phonelineplus.com/v2 instead — see Introduction.

What the sandbox provides

  • Same OpenAPI surface as production v2 (customers, jobs, webhooks, numbers, etc.)
  • Simulated persistence and job processing
  • Same authentication as production — POST /auth with keyID + secret, then Authorization: Bearer on all other routes (see Authentication)

Authentication

Sandbox does not use a different auth scheme. Follow Authentication exactly, but:

  1. Use the sandbox base URL: https://api.phonelineplus.com/sandbox
  2. Use sandbox API key and secret (separate from production keys)

Example:

POST https://api.phonelineplus.com/sandbox/auth
Content-Type: application/json

{
  "keyID": "<sandbox-key-uuid>",
  "secret": "<sandbox-secret>"
}

Then call endpoints under /sandbox/... with the returned JWT, for example GET https://api.phonelineplus.com/sandbox/customers.

How to use it

  1. Obtain sandbox API credentials from your PhoneLine+ / Gamma onboarding contact (separate from production keys).
  2. Authenticate via POST /auth on the sandbox base URL (same flow as production).
  3. Send the JWT on all subsequent sandbox requests.
  4. Follow the same guides as production for API behaviour:

Behaviour differences

AreaSandboxProduction
Base URLhttps://api.phonelineplus.com/sandboxhttps://api.phonelineplus.com/v2
AuthPOST /auth → Bearer JWT (sandbox keys)POST /auth → Bearer JWT (production keys)
DataEphemeral / test datastoreLive billing and telephony
JobsSimulated completionReal Falcon / CSG orders
SIP fieldsExample sbcAddress / transport on devices and job destinationLive values from provisioning
Side effectsNo real calls or billingReal provisioning
Hardware Only upgradeStores each user's login email. The first email is also saved as the customer contactEmail for standard, office, and anywhereSends that same first email as the customer admin email while provisioning

Implementations may enforce the same validation rules as production (for example, contract patch mutual exclusion, and a login email for every user when leaving Hardware Only).

Recommended test checklist

  • Authenticate and refresh JWT before expiry
  • POST /customers → poll job → GET /customers/{id}
  • POST /customers with contract.term 1 (rolling monthly) → GET /customers/{id} returns contractLength 0
  • PATCH .../users/USERID/settings with notAnswered.main and busy.main of redirect_external and an E.164 redirectNumber (no leading +)
  • POST /customers with Idempotency-Key, then the same key and body again → the same jobID and no second customer
  • Confirm job details.destination includes SIP fields (sbcAddress, transport on hardware plans)
  • GET /customers/{id}/users/USERID/devices — verify device SIP provisioning fields
  • PATCH .../contract with term only, then plan only (two requests)
  • Leave Hardware Only for standard, office, and anywhere with a users entry for every user. The first email is the customer admin email, and GET /customers/{id} returns it as contactEmail
  • Reject combined term + plan (expect 400)
  • Reject a Hardware Only upgrade that omits users (expect 400)
  • Create webhook and handle verification callback
  • Suspend and resume a test customer

Production cutover

  • Change base URL from https://api.phonelineplus.com/sandbox to https://api.phonelineplus.com/v2 and swap credentials
  • Re-register webhooks against production URLs
  • Re-test POST /auth and a single read-only call before bulk migration

Did this page help you?