Skip to main content

API and tokens

Use the API to add pages from your own tools, or put check results in your own dashboard. It starts at Small Team. More about the API.

Make a token​

Go to Settings, then API and MCP, then API tokens. Name it after the tool that will use it, choose Read only or Read and change, and press Make a token.

  • We show it once, so copy it straight away.
  • A token acts as you, and sees what you can see.
  • You can see when each one was last used, and revoke them one at a time.
  • Your original API key keeps working until you revoke it.

Keep tokens out of your code and out of emails. If one gets out, revoke it.

Calls​

Send the token in the Authorization header. Each page you watch has its own entry, so "site" here means one address. Its id is the permalink in the list.

List your sites​

curl https://littlewarden.com/api/sites \
-H 'Authorization: Token token="'$LW_TOKEN'"'

Read one​

curl https://littlewarden.com/api/sites/SITE_ID \
-H 'Authorization: Token token="'$LW_TOKEN'"'

You get one entry for each check, with a title, some text and a status: danger, warning, all good, not enabled or not checked yet.

Add a site​

curl -X POST https://littlewarden.com/api/sites \
-H 'Authorization: Token token="'$LW_TOKEN'"' \
-H 'Content-Type: application/json' \
--data '{"url":"https://example.com","enable":["google-analytics"],"disable":["404-page-check"]}'

To use a template, add its API id as saved_settings_id.

Switch checks on or off​

curl -X PATCH https://littlewarden.com/api/sites/SITE_ID \
-H 'Authorization: Token token="'$LW_TOKEN'"' \
-H 'Content-Type: application/json' \
--data '{"enable":["google-analytics"],"disable":["404-page-check"]}'

Delete a site​

This can't be undone.

curl -X DELETE https://littlewarden.com/api/sites/SITE_ID \
-H 'Authorization: Token token="'$LW_TOKEN'"'

Check names​

Every name for enable and disable is in your account: Settings, then API and MCP, then API documentation.

When it goes wrong​

  • 401: the token is missing, wrong or revoked.
  • 403: the token is read only.
  • 404: there's no site with that id that you can see, or you've used a deploy token.
  • 422: we couldn't save it. The reply says why.

To tell us about a release, use deploy checks. To ask questions in plain English, use the MCP server.