Skip to content

Interactive API Reference (Swagger UI)

The CX Platform provides a live, interactive API reference through Swagger UI. You can explore documented endpoints, inspect request/response schemas, and execute real API calls directly from your browser.


Accessing Swagger UI

Swagger UI is served directly from the CX Platform API server:

Open Swagger UI

The underlying OpenAPI specification (JSON) is available at:

https://cx2-main.pit.cxgp.us/cx/oas/cx-oas.json

Swagger UI URL vs API operation URLs

Swagger UI itself remains available at the documented /cx/oas/... URLs. Partner API operations should be called using their published versioned paths, such as /cx/v2/.... See API Versioning.


Authenticating in Swagger UI

To make authenticated requests from Swagger UI:

  1. Open Swagger UI in your browser.
  2. Click the Authorize button (🔒) at the top-right of the page.
  3. In the dialog, enter your API key in the CX-API-KEY field.
  4. Click Authorize, then Close.
  5. All subsequent "Try it out" requests will include your key automatically.

Use PIT (Test) Keys

When testing with "Try it out", always use your PIT (test) environment API key to avoid modifying production data.

Authorization and "Try it out" Visual Walkthrough

These visuals show the two most common Swagger UI actions.

Swagger UI authorization flow

Swagger UI try-it-out flow


Browsing Endpoints

Once authenticated, you can:

  1. Browse — Expand any endpoint group (Customers, Payments, etc.) to see available operations.
  2. Try it out — Click Try it out on any endpoint, fill in the required parameters, confirm the versioned path shown for the operation, and click Execute to make a live request.
  3. Inspect — View the response status code, headers, and body directly in the UI.
  4. View schemas — Scroll to the Schemas section at the bottom to see all request/response DTOs and their field definitions.

Using the OpenAPI Spec File

The JSON spec at https://cx2-main.pit.cxgp.us/cx/oas/cx-oas.json can be used outside of Swagger UI:

  • Import into Postman or Insomnia for a team-shared API collection
  • Download and store locally for pinned integrations and CI workflows

Download the OpenAPI spec

Invoke-WebRequest -Uri "https://cx2-main.pit.cxgp.us/cx/oas/cx-oas.json" -OutFile "cx-oas.json"
curl -L "https://cx2-main.pit.cxgp.us/cx/oas/cx-oas.json" -o cx-oas.json

Run Swagger UI locally against the spec file

docker run --rm -p 8080:8080 -e SWAGGER_JSON=/openapi/cx-oas.json -v "${PWD}\:/openapi" swaggerapi/swagger-ui
docker run --rm -p 8080:8080 -e SWAGGER_JSON=/openapi/cx-oas.json -v "$(pwd):/openapi" swaggerapi/swagger-ui

Then open http://localhost:8080 in your browser.

Next Steps