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 /authwithkeyID+secret, thenAuthorization: Beareron all other routes (see Authentication)
Authentication
Sandbox does not use a different auth scheme. Follow Authentication exactly, but:
- Use the sandbox base URL:
https://api.phonelineplus.com/sandbox - 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
- Obtain sandbox API credentials from your PhoneLine+ / Gamma onboarding contact (separate from production keys).
- Authenticate via
POST /authon the sandbox base URL (same flow as production). - Send the JWT on all subsequent sandbox requests.
- Follow the same guides as production for API behaviour:
Behaviour differences
| Area | Sandbox | Production |
|---|---|---|
| Base URL | https://api.phonelineplus.com/sandbox | https://api.phonelineplus.com/v2 |
| Auth | POST /auth → Bearer JWT (sandbox keys) | POST /auth → Bearer JWT (production keys) |
| Data | Ephemeral / test datastore | Live billing and telephony |
| Jobs | Simulated completion | Real Falcon / CSG orders |
| SIP fields | Example sbcAddress / transport on devices and job destination | Live values from provisioning |
| Side effects | No real calls or billing | Real provisioning |
| Hardware Only upgrade | Stores each user's login email. The first email is also saved as the customer contactEmail for standard, office, and anywhere | Sends 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 /customerswithcontract.term1 (rolling monthly) →GET /customers/{id}returnscontractLength0 -
PATCH .../users/USERID/settingswithnotAnswered.mainandbusy.mainofredirect_externaland an E.164redirectNumber(no leading+) -
POST /customerswithIdempotency-Key, then the same key and body again → the samejobIDand no second customer - Confirm job
details.destinationincludes SIP fields (sbcAddress,transporton hardware plans) -
GET /customers/{id}/users/USERID/devices— verify device SIP provisioning fields -
PATCH .../contractwithtermonly, thenplanonly (two requests) - Leave Hardware Only for
standard,office, andanywherewith ausersentry for every user. The first email is the customer admin email, andGET /customers/{id}returns it ascontactEmail - 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/sandboxtohttps://api.phonelineplus.com/v2and swap credentials - Re-register webhooks against production URLs
- Re-test
POST /authand a single read-only call before bulk migration
Updated 7 days ago
