Tester Ninja

API reference

Everything the app does, it does through these addresses. So can you.

Getting started

Make an API key in the app under Connect, and send it with every request in the Authorization header. A key starts with tn_ and is shown once.

export TESTERNINJA_KEY=tn_...
curl https://testerninja.com/api/projects \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Projects

A project is one site under test. Every other address needs its id.

GET /api/projects

Lists the projects the key can reach. Answers { projects }.

curl https://testerninja.com/api/projects \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects

Adds a site to test. When the workspace already has a project for that host, that project is returned. A key limited to one project cannot do this.

url
The address of the app. It must be reachable from the internet.
name
Optional. A name for the project.
curl -X POST https://testerninja.com/api/projects \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com","name":"Example shop"}'

GET /api/projects/{id}

One project with its conversations. Answers { project, chats, assistant }.

curl https://testerninja.com/api/projects/PROJECT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

PATCH /api/projects/{id}

Changes a project. Fields left out keep their value.

name
The project's name.
summary
What the app is, in plain words. Up to 4000 characters.
presets
The whole list of device presets, sent at once.
defaultPreset
The id of the preset runs use when none is chosen.
device
Device settings for the default preset.
curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Example shop (staging)"}'

DELETE /api/projects/{id}

Deletes the project and everything in it.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Tests

A saved test (a test case) has a state: draft, active or archived. Only active tests join pipeline and scheduled runs.

GET /api/projects/{id}/cases

Lists the saved tests with how each ended last time. Archived tests are left out; add ?status=all to get them too. Answers { cases }.

curl https://testerninja.com/api/projects/PROJECT_ID/cases \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/cases

Creates one test as a draft. Answers { case }.

title
Needed. Short, says the outcome. Up to 120 characters.
goal
Why it matters, one line.
steps
A list of up to 10 short plain steps.
expected
What the page shows at the end.
focus
Comma-separated words on the buttons and links to press first.
folder
Groups related tests. Default: General.
startUrl
The page it starts on. Default: the project's address.
labels
A list of free words to find the test by.
dependsOn
The id of a test that must run first.
configId
The id of saved test data (a login) the test uses.
maxSteps
2 to 14.
agent
The model the tester runs on for this test, from GET /api/projects/{id}/models. Leave it out, or send auto, for the project's.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/cases \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"A visitor can send the contact form","steps":["Open the contact page","Fill in the form","Send it","Check that a thank-you message is shown"],"folder":"Contact"}'

POST /api/projects/{id}/cases

The same address also changes many tests at once, or copies one. Send one of these bodies. Answers { changed } or { case }.

ids + status
Put the listed tests in a state: draft, active or archived.
activate
A list of ids to make active.
ids + label
Put a label on the listed tests. Add remove: true to take it off.
ids + agent
Give the listed tests one tester model, or auto for the project's.
ids + application
Move the listed tests to an application, or main. Their start page moves with them.
copy + toProject
Copy one test to another project of the workspace, as a draft.
duplicate
The id of a test to copy.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/cases \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"ids":["CASE_ID"],"status":"active"}'

PATCH /api/projects/{id}/cases/{caseId}

Changes a test. Takes the fields of a new test (but not maxSteps), and status. A change to what the test does is kept as a version.

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/cases/CASE_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"status":"active"}'

DELETE /api/projects/{id}/cases/{caseId}

Deletes a test.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/cases/CASE_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/projects/{id}/applications

The project's applications: other sites of the same product, such as an admin app. The project's own address is the main app. Answers { main, applications }.

curl https://testerninja.com/api/projects/PROJECT_ID/applications \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/applications

Adds an application. PATCH /api/projects/{id}/applications/{appId} changes one; DELETE removes it and gives its tests back to the main app. Answers { application }.

name
Needed. Up to 60 characters, one per project.
url
Needed. The application's address.
color
blue, green, amber, violet, rose or teal.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/applications \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Admin app","url":"https://admin.example.com"}'

GET /api/projects/{id}/models

The models this workspace can use, with their prices, and the project's picks for the chat, the run review and the tester. Answers { picks, provider, models, auto, usage }.

curl https://testerninja.com/api/projects/PROJECT_ID/models \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/models

Changes the project's picks. Each is auto or a model id from the list; fields left out keep their value. Answers { picks }.

chat
{ model, effort } for the chat assistant. effort is auto, low or high.
review
{ model, effort } for the written review of a run.
tester
A model id, or auto.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/models \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"tester":"auto","chat":{"model":"auto","effort":"high"}}'

GET /api/projects/{id}/cases/{caseId}/trace

The test, its versions, its last runs and the steps of one run. Add ?run=RUN_ID for a given run; the newest is used without it.

curl https://testerninja.com/api/projects/PROJECT_ID/cases/CASE_ID/trace \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/cases/{caseId}/review

Says whether the result of a test in one run was right. A result marked wrong is told to the tester the next time.

runId
Needed. The run the result is from.
correct
Needed. true or false.
note
Why, in up to 500 characters.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/cases/CASE_ID/review \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"runId":"RUN_ID","correct":false,"note":"The form was sent; the message is only shown after a few seconds."}'

POST /api/projects/{id}/cases/steps

Writes steps for a test from its goal. Nothing is saved: the steps come back as { steps }. Answers 503 when no model is set up.

goal
What the test should prove. The title is used when it is left out.
title
The test's title.
expected
What the page shows at the end.
startUrl
The page it starts on.
steps
Steps already written, to carry on from.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/cases/steps \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"goal":"A visitor can add a product to the cart"}'

Plans

A test plan is a named list of tests that run together, in order.

GET /api/projects/{id}/plans

Lists the plans. Answers { plans }.

curl https://testerninja.com/api/projects/PROJECT_ID/plans \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/plans

Creates a plan. Answers { id }.

name
Needed.
description
Up to 300 characters.
caseIds
The tests of the plan. The order sent is the order they run in.
reruns
0 to 3: how often tests that did not pass are tried again. Default 1.
environment
The id of a saved environment the plan runs against. Empty means Production.
preset
A device preset the plan uses.
review
Notes on how to judge the results.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/plans \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Smoke","caseIds":["CASE_ID"]}'

GET /api/projects/{id}/plans/{planId}

One plan and its runs. Answers { plan, runs }.

curl https://testerninja.com/api/projects/PROJECT_ID/plans/PLAN_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

PATCH /api/projects/{id}/plans/{planId}

Changes a plan. Takes the same fields, and archived (true or false).

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/plans/PLAN_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"reruns":2}'

DELETE /api/projects/{id}/plans/{planId}

Deletes a plan. Its tests stay.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/plans/PLAN_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Schedules

An automation does something by itself: runs a plan, maps the site, or gives the assistant instructions.

GET /api/projects/{id}/automations

Lists the automations and what they did lately. Answers { automations, history }.

curl https://testerninja.com/api/projects/PROJECT_ID/automations \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/automations

Creates an automation. Answers { automation }.

name
Needed.
description
Up to 300 characters.
active
true or false. Default true.
trigger
{ type: "manual" }, or { type: "schedule", every, hour, minute, weekday, tz } where every is daily, weekdays, weekly, hours, monthly or once.
action
{ type: "plan", planId }, { type: "crawl" } or { type: "assistant", prompt }.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/automations \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Smoke every morning","trigger":{"type":"schedule","every":"weekdays","hour":7,"minute":0,"tz":"Europe/Berlin"},"action":{"type":"plan","planId":"PLAN_ID"}}'

PATCH /api/projects/{id}/automations/{automationId}

Changes an automation. Fields left out keep their value.

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/automations/AUTOMATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"active":false}'

POST /api/projects/{id}/automations/{automationId}

Runs the automation now. Answers { result }.

curl -X POST https://testerninja.com/api/projects/PROJECT_ID/automations/AUTOMATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

DELETE /api/projects/{id}/automations/{automationId}

Deletes an automation.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/automations/AUTOMATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Runs and results

A run tests the app in a real browser, in the cloud. It usually takes 1 to 5 minutes. Start one, then ask for it every 10 seconds or so until its status is done or failed.

POST /api/projects/{id}/runs

Starts a run: a plan, a list of tests, or every saved test that is not archived when neither is sent. Answers { run } with the run's id and the number of tests. Answers 402 when the workspace has no runs left.

planId
Run this plan. A plan's own environment and preset are used unless you send others.
caseIds
Run only these tests.
url
Test this address instead: a preview or staging deployment of the same app.
environment
The name or id of a saved environment. Ignored when url is sent.
preset
The name or id of a saved device preset.
device
desktop or phone.
withDependencies
false to run only the picked tests, without the ones they depend on.
trigger
A short word kept with the run to say what started it, for example api.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/runs \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"planId":"PLAN_ID","environment":"Staging","trigger":"api"}'

GET /api/projects/{id}/runs

The last 50 runs, newest first. Answers { runs }.

curl https://testerninja.com/api/projects/PROJECT_ID/runs \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/projects/{id}/runs/{runId}

One run: its status (queued, running, verifying, done, failed), each test with its result (passed, failed, blocked) and note, and the confirmed bugs. A run passed when its status is done and no test failed or was blocked.

curl https://testerninja.com/api/projects/PROJECT_ID/runs/RUN_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/runs/{runId}

The full report of a run, as the report page shows it: every bug with its steps, what was expected and what happened. No key is needed: the run id is long and random and is the key, like the report link. Treat it like a password.

curl https://testerninja.com/api/runs/RUN_ID

GET /api/runs/{runId}/export

The run as a file, one row per test. JSON, or CSV with ?format=csv. No key is needed, as above.

curl -O -J "https://testerninja.com/api/runs/RUN_ID/export?format=csv"

Coverage

GET /api/projects/{id}/coverage

The pages the map knows, which of them a test has opened, the buttons and fields tests have used, and where to test next.

curl https://testerninja.com/api/projects/PROJECT_ID/coverage \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/projects/{id}/crawls

The newest crawl of the site and the list of crawls. Answers { crawl, crawls }.

curl https://testerninja.com/api/projects/PROJECT_ID/crawls \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/crawls

Maps the site again. Answers { crawlId }, or 409 while a crawl is running. Send { reset: true } instead to make the map forget what it knows; tests and runs are not touched.

area
Start on this page: a path such as /pricing, or a full address on the same site.
depth
1 to 3. Default 2.
intent
What to look for, in plain words.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/crawls \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"area":"/pricing","depth":2}'

GET /api/projects/{id}/crawls/{crawlId}

One crawl with its pages. Answers { crawl }.

curl https://testerninja.com/api/projects/PROJECT_ID/crawls/CRAWL_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/crawls/{crawlId}

Stops a running crawl. Send { stop: true }.

curl -X POST https://testerninja.com/api/projects/PROJECT_ID/crawls/CRAWL_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"stop":true}'

GET /api/projects/{id}/insights

Runs, results, bugs, run times and time saved over a period. Add ?days=30 (1 to 365), or ?from=2026-01-01&to=2026-01-31.

curl https://testerninja.com/api/projects/PROJECT_ID/insights?days=30 \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

PATCH /api/projects/{id}/insights-settings

The numbers behind time saved and cost saved. Fields left out keep their value. Answers { settings }.

minutesPerTest
Minutes a person needs to run one test by hand.
testerRate
What an hour of manual testing costs.
scriptHours
Hours to write one test script by hand.
engineerRate
What an hour of an engineer costs.
currency
USD, EUR, GBP, INR, CAD, AUD or JPY.
curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/insights-settings \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"minutesPerTest":6,"currency":"EUR"}'

Knowledge

What the testers know about the app: notes, rules, memories, skills and documents. Rules are given to the tester on every run.

GET /api/projects/{id}/knowledge

Everything known, with the project summary. Answers { knowledge, summary, summaryAt, crawlAt, targets }.

curl https://testerninja.com/api/projects/PROJECT_ID/knowledge \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/knowledge

Saves one item. Answers { item }.

kind
note, rule, memory, skill or document. Default: note.
title
A short name. A skill needs one.
content
The text.
target
For a rule: { kind: "folder", value: folder name } or { kind: "plan", value: plan id }. Without it the rule holds for every run.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/knowledge \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"kind":"rule","title":"Never press Delete account"}'

POST /api/projects/{id}/knowledge

The same address also handles the project summary.

action: "save-summary"
Saves the text sent as summary.
action: "summary-from-crawl"
Writes a summary from the newest crawl and returns it. Nothing is saved.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/knowledge \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"action":"save-summary","summary":"A shop for bike parts. Visitors can buy without an account."}'

PATCH /api/projects/{id}/knowledge/{itemId}

Changes an item.

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/knowledge/ITEM_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"content":"Never press Delete account or Cancel subscription."}'

DELETE /api/projects/{id}/knowledge/{itemId}

Deletes an item.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/knowledge/ITEM_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Configs (test data)

Logins, inboxes, files and values the tests use. Secrets are write-only: a password, a key, a file or request headers can be sent, but no address ever sends them back. A config is answered with its public part and hasSecret: true or false.

GET /api/projects/{id}/configs

Lists the saved test data, and the kinds there are. Answers { configs, types }.

curl https://testerninja.com/api/projects/PROJECT_ID/configs \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/configs

Saves test data. Use a throwaway test account, never a real one. Answers { config }.

type
Needed. login, login_2fa, generated_login, inbox, file, api_key, api_request, fields, one_time or test_card.
name
A name to find it by.
description
Up to 300 characters.
login
username, password, and basicAuth: true when it is for the browser's own password box.
login_2fa
As login, plus otpUri: the authenticator setup link (otpauth://...).
generated_login
password is optional: one is made when it is left out. The email address is made for you.
inbox
Nothing more: the address is made for you.
file
fileName and fileData (the file as base64, up to 25 MB).
api_key
key, sendAs (header, query or form) and fieldName (default Authorization).
api_request
method, url, headers (one per line, Name: value) and body.
fields
fields: a list of { name, value }.
one_time
values: a list, or text with one value per line. Each run uses up one.
test_card
provider (stripe, braintree, adyen, checkout or generic), number (a published test card number only), expiry (MM/YY, default 12/34), cvc (default 123) and postal (optional).
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/configs \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"type":"login","name":"Test customer","username":"test@example.com","password":"a-throwaway-password"}'

PATCH /api/projects/{id}/configs/{configId}

Changes test data. Fields that are sent replace what was there; a field left out or sent empty stays as it was, secrets too. The type cannot be changed.

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/configs/CONFIG_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Test customer 2"}'

DELETE /api/projects/{id}/configs/{configId}

Deletes test data.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/configs/CONFIG_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/projects/{id}/inbox

Mail received by the project's test inboxes. Answers { addresses, messages }.

curl https://testerninja.com/api/projects/PROJECT_ID/inbox \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Environments

Other addresses of the same app: staging, a preview. Production is the project's own address and is always in the list.

GET /api/projects/{id}/environments

Lists the environments. Answers { environments }.

curl https://testerninja.com/api/projects/PROJECT_ID/environments \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/environments

Saves an environment. Sending a name that exists changes that one. Headers and the password are secrets: they are kept encrypted and never sent back.

name
Needed. For example Staging. Not Production.
url
Needed. The address.
maxParallel
1 to 4 tests at the same time. Default 4.
live
true or false: whether real people use this address.
headers
Headers sent with every request, one per line as Name: value. Ten at most.
basicUser, basicPassword
For the browser's own password box.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/environments \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Staging","url":"https://staging.example.com"}'

DELETE /api/projects/{id}/environments/{environmentId}

Deletes an environment.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/environments/ENVIRONMENT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Todos

Things a person has to do before the testers can go on: give a login, unblock a page.

GET /api/projects/{id}/todos

Lists the todos. Answers { todos }.

curl https://testerninja.com/api/projects/PROJECT_ID/todos \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/todos

Raises a todo. A todo with the same title is counted again, not made twice. Answers { todo }.

title
Needed. Up to 140 characters.
description
Why it is needed.
nextStep
What the person should do.
type
credentials, integration, test_user, environment, start_url, blocked, ownership, device_preset or other.
priority
low, medium, high or urgent. Default: medium.
assignee
An email address.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/todos \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"Give a test login for the admin area","type":"credentials","priority":"high"}'

POST /api/projects/{id}/todos

The same address also changes or deletes many todos at once: send ids with the fields to change, or ids with remove: true. Answers { changed }.

curl -X POST https://testerninja.com/api/projects/PROJECT_ID/todos \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"ids":["TODO_ID"],"status":"done"}'

GET /api/projects/{id}/todos/{todoId}

One todo.

curl https://testerninja.com/api/projects/PROJECT_ID/todos/TODO_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

PATCH /api/projects/{id}/todos/{todoId}

Changes a todo: the fields above, and status (open, done or rejected, with a reason when rejected).

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/todos/TODO_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"status":"rejected","reason":"We do not test the admin area."}'

DELETE /api/projects/{id}/todos/{todoId}

Deletes a todo.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/todos/TODO_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Notifications

Where the result of a run is sent: a webhook, Slack, Teams or email. A project can have 20.

GET /api/projects/{id}/notifications

Lists them. The address of a webhook is never sent back, only its host. Answers { notifications, canKeepSecrets }.

curl https://testerninja.com/api/projects/PROJECT_ID/notifications \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/notifications

Adds one. For a webhook the answer also holds secret, the key the messages are signed with: it is shown this once. Email goes only to people of the workspace.

kind
Needed. webhook, slack, teams or email.
target
Needed. The address to send to, or the email address.
on
failure to hear only about runs that did not pass. Default: always.
planId
Only for runs of this plan.
curl -X POST https://testerninja.com/api/projects/PROJECT_ID/notifications \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"kind":"webhook","target":"https://example.com/hooks/tests","on":"failure"}'

PATCH /api/projects/{id}/notifications/{notificationId}

Turns one on or off (enabled), or changes on.

curl -X PATCH https://testerninja.com/api/projects/PROJECT_ID/notifications/NOTIFICATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"enabled":false}'

POST /api/projects/{id}/notifications/{notificationId}

Sends a test message.

curl -X POST https://testerninja.com/api/projects/PROJECT_ID/notifications/NOTIFICATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

DELETE /api/projects/{id}/notifications/{notificationId}

Deletes one.

curl -X DELETE https://testerninja.com/api/projects/PROJECT_ID/notifications/NOTIFICATION_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Chat

A conversation with the assistant, which can explore the site, suggest tests and run them. Its status is working, waiting or idle.

GET /api/projects/{id}/chats

The project's conversations. Answers { chats }.

curl https://testerninja.com/api/projects/PROJECT_ID/chats \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/projects/{id}/chats

Starts an empty conversation. Answers { chat }.

curl -X POST https://testerninja.com/api/projects/PROJECT_ID/chats \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/chats/{chatId}

A conversation and what was said. Ask again while its status is working. Answers { chat, messages }.

curl https://testerninja.com/api/chats/CHAT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/chats/{chatId}

Sends a message. Answers 202 at once; the assistant's answer arrives in the conversation.

text
What to do, in plain words.
curl -X POST https://testerninja.com/api/chats/CHAT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"text":"Explore the site and suggest the top five tests"}'

PATCH /api/chats/{chatId}

Renames a conversation (title), archives it (archived: true or false), or rates an answer (messageId with rating: up, down or null).

curl -X PATCH https://testerninja.com/api/chats/CHAT_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"Checkout tests"}'

POST /api/chats/{chatId}/actions

Presses a button on a card in the conversation. Send messageId (the card), action (the button) and what the button needs. For a card of suggested tests: action create_cases with selected, the positions of the tests to create, counted from 0.

curl -X POST https://testerninja.com/api/chats/CHAT_ID/actions \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"messageId":12,"action":"create_cases","selected":[0,1]}'

GET /api/chats/history?project={id}

Every conversation of a project, up to 500. Add show=archived or show=all, and q to search. Answers { chats }.

curl https://testerninja.com/api/chats/history?project=PROJECT_ID&show=all \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Pipeline

Two addresses made for shell scripts: they answer plain key=value lines, so a pipeline needs nothing but curl. The ready-made script at /ci.sh uses them.

POST /api/ci?project={id}

Starts a run of every active test, or of one plan. Answers 201 with three lines: run, tests and url.

project
Needed. The project id.
plan
A plan's name or id.
url
Test this address instead.
environment
The name of a saved environment.
curl -X POST https://testerninja.com/api/ci?project=PROJECT_ID&plan=Smoke \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

GET /api/ci?project={id}&run={runId}

How the run is going. Lines: status, result (running, passed or failed), passed, failed, blocked, bugs and url.

curl https://testerninja.com/api/ci?project=PROJECT_ID&run=RUN_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Metrics

GET /api/metrics

Numbers in the text form Prometheus reads, per project: runs by status, tests and bugs of the last finished run, when it ended and how long it took, and saved tests by state. A read-only key is enough. A key limited to one project gets that project only.

curl https://testerninja.com/api/metrics \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

Badge

GET /api/badge/{id}.svg

A small picture that says how the project's last run ended, for a README. No key is needed: it gives away nothing but the result.

curl https://testerninja.com/api/badge/PROJECT_ID.svg

API keys

Keys are usually made in the app, under Connect. A key limited to one project cannot use these addresses.

GET /api/keys

Lists the keys: name, first characters, what each can do, its project, and when it was last used. Never the key itself.

curl https://testerninja.com/api/keys \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

POST /api/keys

Makes a key. The full key is in the answer this once.

name
A name to tell the keys apart.
scope
read for a key that can only read. Default: write.
projectId
Limit the key to this project. Without it the key reaches every project.
curl -X POST https://testerninja.com/api/keys \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Pipeline","scope":"write","projectId":"PROJECT_ID"}'

DELETE /api/keys/{keyId}

Revokes a key. Anything using it stops working at once.

curl -X DELETE https://testerninja.com/api/keys/KEY_ID \
  -H "Authorization: Bearer $TESTERNINJA_KEY"

MCP

Coding agents (Claude Code, Cursor, Codex) can use Tester Ninja as tools over MCP, at /api/mcp (streamable HTTP, POST). It takes the same key in the same header; there is no other way to sign in. A read-only key is offered only the tools that read. A key limited to one project is offered only tools that work inside a project, sees only that project in list_projects, and cannot create a project.

claude mcp add --transport http testerninja https://testerninja.com/api/mcp \
  --header "Authorization: Bearer $TESTERNINJA_KEY"
curl -X POST https://testerninja.com/api/mcp \
  -H "Authorization: Bearer $TESTERNINJA_KEY" \
  -H "content-type: application/json" \
  -H "accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The tools: list_projects, create_project, ask_assistant, get_chat, list_test_cases, create_test_cases, update_test_case, run_tests, get_run, list_runs, get_finding, get_test_trace, get_coverage, save_knowledge, delete_knowledge, list_knowledge, save_test_login, list_configs, list_test_plans, add_to_plan, schedule_plan, list_environments, save_environment, list_pull_requests, read_inbox, list_todos, raise_todo.

Setup for each agent is in the app under Connect. A page written for agents is at /agent-quickstart.md.

Command-line tool

A small tool that calls the addresses above. It is one file, scripts/cli.mjs in the Tester Ninja repository, and needs only Node 18 or newer. It is not on npm yet.

# Save a key on this computer (it is asked for and not shown), or set TESTERNINJA_KEY
node scripts/cli.mjs login

node scripts/cli.mjs projects
node scripts/cli.mjs tests "Example shop"

# Start a run and wait for it. The exit code is 1 when it does not pass.
node scripts/cli.mjs run "Example shop" --plan Smoke --environment Staging --wait

node scripts/cli.mjs status RUN_ID
node scripts/cli.mjs open RUN_ID

For a pipeline that has no Node, the shell script at /ci.sh does the same with curl.