Skip to content

docs: update API token samples to the new swapi_ format - #690

Open
Devon-White wants to merge 3 commits into
mainfrom
devon/api-token-swapi-format
Open

Devon-White wants to merge 3 commits into
mainfrom
devon/api-token-swapi-format

Conversation

@Devon-White

Copy link
Copy Markdown
Collaborator

Closes #679.

Project API tokens now begin with swapi_ and are 42 characters long, replacing the PT prefix and 50-character length. Tokens created before the change keep working, so this PR only updates sample values and adds the format to the docs.

Sample values replaced

Every project API token sample in MDX and TypeSpec now uses the canonical placeholder from the issue, swapi_0123456789ab0123456789ab0123456789ab, or a masked 42-character equivalent.

File What changed
specs/signalwire-rest/project-api/tokens/models/core.tsp @example on CreateTokenResponse.token
specs/compatibility-api/tokens/models/core.tsp @example on Token.token
fern/products/apis/pages/core/authorization.mdx Sample token plus all three base64 strings, re-encoded
fern/products/compatibility-api/pages/rest-api/core/authorization.mdx Same, on the near-duplicate compatibility page
fern/products/compatibility-api/pages/cxml/guides/sending-your-first-sms.mdx Masked token in the credentials list
fern/products/server-sdks/pages/guides/manage-resources/account-setup.mdx API Token row of the credentials format table
.../integrations/FreeSWITCH/sending-an-sms-from-freeswitch-xml-dialplan-through-signalwire-cloud.mdx api_token= in the dialplan sample

The base64 examples on the two authorization pages hid a PT token inside the encoded value, so each was decoded, updated, and re-encoded rather than edited in place.

Documentation added

A ### Token format section on API credentials states both formats, confirms existing PT tokens are not deprecated and need no migration, and tells readers to treat a token as an opaque string. Both authorization pages carry a short pointer to it.

fern/products/platform/changelog/2026-09-14.mdx records the change for customers, tagged apis.

Unrelated fix worth a look

fern/snippets/browser-sdk/v3/create-room-object-options.mdx described the token option of createRoomObject as a "SignalWire project token" with a PT example. That is wrong: the same reference page passes token: "<YourJWT>" in its own example, and a browser SDK never takes a project API token. Rather than carry the error forward with a swapi_ value, the row now describes a Video Room Token and links to the Create Room Token endpoint. Happy to split this out if you would rather keep the PR to the format change.

Two things to confirm

  • The changelog is dated 2026-09-14 based on the issue saying the change was expected to go live with the 9/14 deploy. Please adjust if it landed on a different date.
  • The credentials page says tokens created "earlier" begin with PT rather than naming a cutover date, so the prose stays correct if the deploy date moved.

Checks

  • yarn build:specs succeeds; both regenerated OpenAPI files are committed and their only diff is the token example.
  • yarn fern-md-check passes over all 2747 MDX files.
  • yarn fern-check reports only a missing-redirects check skipped because it could not reach FDR from this environment (403). That is unrelated to these changes.
  • Links added were copied from the target pages' own slug: frontmatter. No anchor fragments were touched.

Project API tokens now begin with `swapi_` and are 42 characters long,
replacing the `PT` prefix and 50-character length. Existing tokens are
unaffected and there is no migration.

- Replace every sample token value in MDX and TypeSpec, including the
  base64-encoded Basic auth examples on both authorization pages.
- Document the format and the opaque-string guidance on the API
  credentials page, with a short pointer from the authorization pages.
- Add a changelog entry for 2026-09-14.
- Correct the Browser SDK v3 `createRoomObject` option table, which
  described its `token` as a project token; the page's own example
  passes a Video Room Token.

Closes #679
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API Change] New format for Project API tokens

2 participants