On this page
Authentication
The API takes one credential: a key you create in the dashboard. It authenticates the REST API, the MCP server and anything else you drive with curl or CI.
Make an API key
In the dashboard, open Setup, then xtest API keys, and press Create a key. Give it a name you will recognise later. The key is shown once, when it is created, so copy it then. It looks like xtest_live_ followed by 48 characters and can do anything you can do through the API in the workspace it was made for, so keep it with your other secrets.
If you are in a company, the sheet asks which workspace the key is for. A company key sees that company's tests and stops working if you leave the company; a key for your personal workspace sees nothing that belongs to a company. The REST API page has the details.
Send it
# Either header works.
curl https://xtest.io/api/v1/suites -H "X-API-Key: xtest_live_…"
curl https://xtest.io/api/v1/suites -H "Authorization: Bearer xtest_live_…"There is no sign-in endpoint and no token to refresh: a key works until you revoke it, or, for a company key, until you leave the company. The login your browser uses for the dashboard is a different credential, and the API does not accept it.
When it is refused
# No key, an unknown key, or a revoked one:
# 401 { "error": "…" }
# A valid key, something that is not in its workspace:
# 404 { "error": "Suite not found" } ← never 403: we do not confirm it exists.
# A valid key sent with X-Organization-Id naming another workspace:
# 403 { "error": "This key can see only …", "code": "KEY_WORKSPACE_MISMATCH" }
# A company key whose maker has left that company:
# 403 { "error": "This key was made for …", "code": "KEY_CREATOR_LEFT" }Keys the xtest app makes when you connect a computer are listed beside yours, named after that computer. They can only do that computer's own work, and are refused everywhere else. Revoking one disconnects the computer with it.
Losing one
Revoke it under Setup, xtest API keys and make another. Nothing else has to change: keys are independent, so a build server and a laptop can each have their own and lose one without the other noticing.