# WatchTower15 Developers > The WatchTower15 REST API, the metric and log ingest APIs, their OpenAPI specifications and the official SDKs. The REST API is at https://rest.watchtower15.com/v1 and takes an API key as `Authorization: Bearer wt15ak_…`; the metric and log ingest APIs are at https://api.watchtower15.com and take a source's token. A key never belongs in a web page: the API sends no CORS headers. Every page below is Markdown. ## REST API - [WatchTower15 API](https://developer.watchtower15.com/index.md): The WatchTower15 REST API at rest.watchtower15.com/v1 — what it reads and changes, keys and organisations, the first call, the guides, and the ingest APIs, specifications and SDKs beside it. - [Authentication and keys](https://developer.watchtower15.com/api/authentication.md): How API keys work — who can create one and how, the key format, scopes, the role limit, expiry, the emails about your keys, what revokes a key, turning keys off for an organisation, single sign-on organisations and what WatchTower15 records about a key. - [Errors](https://developer.watchtower15.com/api/errors.md): How the API reports a failure — a problem document with a stable code, its fields, the request id to quote to support, and a page for every error code. - [Pagination](https://developer.watchtower15.com/api/pagination.md): How list operations page — page, per_page and total on the page lists, a cursor on the lists that page by time, and the forms of a list parameter. - [Idempotent requests](https://developer.watchtower15.com/api/idempotent-requests.md): Send an Idempotency-Key with every POST, PUT and DELETE so a retry after a timeout never runs twice — how a key is matched, what a repeat answers and the answers that hold a secret. - [Rate limits](https://developer.watchtower15.com/api/rate-limits.md): The API's limits — 240 calls a minute per key, 600 a minute and 20,000 a day per organisation, and 2 requests in flight at once — the headers that report them, repeated reads and what to do on a 429. - [Times and windows](https://developer.watchtower15.com/api/times-and-windows.md): How the API writes times and takes time windows — epoch milliseconds, dates, period, from and to, and the default and longest window of each operation. - [Changing resources](https://developer.watchtower15.com/api/changing-resources.md): Every write the API offers and the rules each follows — the status each kind of write answers, PUT as a full replacement, the Idempotency-Key every write takes, write-only fields, one-time secrets, a refused delete and the refusals of a create. - [Multi-step services](https://developer.watchtower15.com/api/multi-step-services.md): Create a service of one to ten steps, test it before you save it, and read its runs and versions with cURL and the PHP SDK. - [Acting on incidents and scans](https://developer.watchtower15.com/api/acting-on-incidents-and-scans.md): The API's three writes — acknowledge an incident, resolve an incident and run a domain scan — what each answers, how to follow a scan and the 10-minute cooldown. - [OS updates](https://developer.watchtower15.com/api/os-updates.md): Read what a server's package manager has waiting, how severe it is and whether it needs a reboot, list the packages, and ask the agent to read them again after you patch. - [Vulnerabilities in containers](https://developer.watchtower15.com/api/container-vulnerabilities.md): List the containers a server runs and what was found in each, see where every security finding comes from, and find every image in your organisation that has a given vulnerability. - [Route alarms to Slack](https://developer.watchtower15.com/api/route-alarms-to-slack.md): Create a Slack alarm channel, add it to an alarm policy and send a test message, with the API alone. - [Quiet a noisy alarm](https://developer.watchtower15.com/api/quiet-a-noisy-alarm.md): Find an alarm that fires too often, switch it off or retune it, do the same for a whole fleet through a server profile's alarm templates, and snooze a server, a server profile or a service for a while, with the API alone. - [Charting custom metrics](https://developer.watchtower15.com/api/charting-custom-metrics.md): Read a custom metric's raw samples, chart it with the aggregation and step you choose, read a whole metric source at once, summarise a window, and find the metrics with alarms and the incidents of a source, with the API alone. - [Investigating logs](https://developer.watchtower15.com/api/investigating-logs.md): Open one line from a console link, read the exact time and source of a line's time, count message patterns, count log lines by a field, search with several terms (exclusions, whole words, patterns, match all or any), read the lines around one line, filter journal lines by systemd unit, read the status, path and duration of web access lines, and page through up to 2,000 lines at a time, with the API alone. - [Versioning and deprecation](https://developer.watchtower15.com/api/versioning.md): What may change within /v1 (additions only), what is a breaking change, how a retirement is announced, and the three version numbers you will meet. ## Error codes - [daily_limit_reached](https://developer.watchtower15.com/api/errors/daily_limit_reached.md): The API error daily_limit_reached (HTTP 429) — what it means, the fields it adds and what a client should do. - [forbidden](https://developer.watchtower15.com/api/errors/forbidden.md): The API error forbidden (HTTP 403) — what it means, the fields it adds and what a client should do. - [held_limit_reached](https://developer.watchtower15.com/api/errors/held_limit_reached.md): The API error held_limit_reached (HTTP 422) — what it means, the fields it adds and what a client should do. - [internal_error](https://developer.watchtower15.com/api/errors/internal_error.md): The API error internal_error (HTTP 500) — what it means, the fields it adds and what a client should do. - [invalid_request](https://developer.watchtower15.com/api/errors/invalid_request.md): The API error invalid_request (HTTP 422) — what it means, the fields it adds and what a client should do. - [invoice_overdue](https://developer.watchtower15.com/api/errors/invoice_overdue.md): The API error invoice_overdue (HTTP 402) — what it means, the fields it adds and what a client should do. - [limit_reached](https://developer.watchtower15.com/api/errors/limit_reached.md): The API error limit_reached (HTTP 422) — what it means, the fields it adds and what a client should do. - [method_not_allowed](https://developer.watchtower15.com/api/errors/method_not_allowed.md): The API error method_not_allowed (HTTP 405) — what it means, the fields it adds and what a client should do. - [not_found](https://developer.watchtower15.com/api/errors/not_found.md): The API error not_found (HTTP 404) — what it means, the fields it adds and what a client should do. - [payment_required](https://developer.watchtower15.com/api/errors/payment_required.md): The API error payment_required (HTTP 402) — what it means, the fields it adds and what a client should do. - [rate_limited](https://developer.watchtower15.com/api/errors/rate_limited.md): The API error rate_limited (HTTP 429) — what it means, the fields it adds and what a client should do. - [store_unavailable](https://developer.watchtower15.com/api/errors/store_unavailable.md): The API error store_unavailable (HTTP 503) — what it means, the fields it adds and what a client should do. - [unauthorized](https://developer.watchtower15.com/api/errors/unauthorized.md): The API error unauthorized (HTTP 401) — what it means, the fields it adds and what a client should do. - [unknown_parameter](https://developer.watchtower15.com/api/errors/unknown_parameter.md): The API error unknown_parameter (HTTP 422) is retired and no longer sent — what it meant, and what a client sees now. ## API reference - [WatchTower15 REST API](https://developer.watchtower15.com/api/reference.md): Every operation of the WatchTower15 REST API, one page per resource, generated from its OpenAPI document. - [Alarm channels](https://developer.watchtower15.com/api/reference/alarm-channels.md): Alarm channels: the Slack, Microsoft Teams and webhook destinations alarms notify; their destinations are write-only. The Alarm channels operations of the WatchTower15 REST API, with curl and SDK samples. - [Alarm policies](https://developer.watchtower15.com/api/reference/alarm-policies.md): Alarm policies: who and which channels an alarm notifies. The Alarm policies operations of the WatchTower15 REST API, with curl and SDK samples. - [Alarms](https://developer.watchtower15.com/api/reference/alarms.md): Alarm rules and the alarms they raised. The Alarms operations of the WatchTower15 REST API, with curl and SDK samples. - [Alarm rules](https://developer.watchtower15.com/api/reference/alarm-rules.md): The alarm catalogue: the rules an alarm can be based on, with their defaults. The Alarm rules operations of the WatchTower15 REST API, with curl and SDK samples. - [Audit actions](https://developer.watchtower15.com/api/reference/audit-actions.md): The organisation's audit trail: who did what to which resource, and when. The Audit actions operations of the WatchTower15 REST API, with curl and SDK samples. - [Audit actors](https://developer.watchtower15.com/api/reference/audit-actors.md): The members and service accounts that can appear as the actor of an audit action. The Audit actors operations of the WatchTower15 REST API, with curl and SDK samples. - [Audit categories](https://developer.watchtower15.com/api/reference/audit-categories.md): The audit categories an audit action falls in, to filter the audit trail by. The Audit categories operations of the WatchTower15 REST API, with curl and SDK samples. - [Custom metrics](https://developer.watchtower15.com/api/reference/custom-metrics.md): Custom metrics the organisation sends itself: their definitions, series and limits. The Custom metrics operations of the WatchTower15 REST API, with curl and SDK samples. - [Databases](https://developer.watchtower15.com/api/reference/databases.md): Monitored databases: collectors, queries, findings, storage and the advice drawn from them. The Databases operations of the WatchTower15 REST API, with curl and SDK samples. - [Domains](https://developer.watchtower15.com/api/reference/domains.md): Monitored domains: expiry, certificate, DNS, reachability and uptime, and the verification of ownership. The Domains operations of the WatchTower15 REST API, with curl and SDK samples. - [Health](https://developer.watchtower15.com/api/reference/health.md): The organisation's health at a glance: a summary and a map of what needs attention. The Health operations of the WatchTower15 REST API, with curl and SDK samples. - [Incidents](https://developer.watchtower15.com/api/reference/incidents.md): Incidents: what went wrong, its timeline and how to act on it. The Incidents operations of the WatchTower15 REST API, with curl and SDK samples. - [Log sources](https://developer.watchtower15.com/api/reference/log-sources.md): The sources that send logs: their tokens, their settings and what they have sent. The Log sources operations of the WatchTower15 REST API, with curl and SDK samples. - [Logs](https://developer.watchtower15.com/api/reference/logs.md): Search, count and facet the organisation's collected log lines over a time window. The Logs operations of the WatchTower15 REST API, with curl and SDK samples. - [Me](https://developer.watchtower15.com/api/reference/me.md): The key making the request and the organisation it belongs to. The Me operations of the WatchTower15 REST API, with curl and SDK samples. - [Metric sources](https://developer.watchtower15.com/api/reference/metric-sources.md): The sources that send custom metrics: their tokens, their settings and the tags they apply. The Metric sources operations of the WatchTower15 REST API, with curl and SDK samples. - [Organisation](https://developer.watchtower15.com/api/reference/organisation.md): The organisation the key acts in: its account type, its limits and what is used, and, for a key that may see billing, its billing details. The Organisation operations of the WatchTower15 REST API, with curl and SDK samples. - [Scans](https://developer.watchtower15.com/api/reference/scans.md): Scans: the checks run on domains and servers, their results and their changes over time. The Scans operations of the WatchTower15 REST API, with curl and SDK samples. - [Security images](https://developer.watchtower15.com/api/reference/security-images.md): Container images running on the organisation's servers, with the servers that run them and the vulnerabilities found in them. The Security images operations of the WatchTower15 REST API, with curl and SDK samples. - [Server profiles](https://developer.watchtower15.com/api/reference/server-profiles.md): Reusable server profiles: the checks and thresholds a group of servers share. The Server profiles operations of the WatchTower15 REST API, with curl and SDK samples. - [Servers](https://developer.watchtower15.com/api/reference/servers.md): Monitored servers: their state, metrics, processes, services, packages, security findings and the settings the agent reports against. The Servers operations of the WatchTower15 REST API, with curl and SDK samples. - [Services](https://developer.watchtower15.com/api/reference/services.md): Monitored services: HTTP, TCP and API checks, their results, their scans and the parameters a check takes. The Services operations of the WatchTower15 REST API, with curl and SDK samples. - [Tag groups](https://developer.watchtower15.com/api/reference/tag-groups.md): Tag groups: sets of tags that apply together. The Tag groups operations of the WatchTower15 REST API, with curl and SDK samples. - [Tags](https://developer.watchtower15.com/api/reference/tags.md): Tags: labels to group monitored resources. The Tags operations of the WatchTower15 REST API, with curl and SDK samples. - [Your AI clients](https://developer.watchtower15.com/api/reference/user-ai-clients.md): The calling user's own AI-client connections in the key's organisation: status, access and today's calls. The Your AI clients operations of the WatchTower15 REST API, with curl and SDK samples. - [Your API keys](https://developer.watchtower15.com/api/reference/user-api-keys.md): The calling user's own API keys in the key's organisation: status, scopes and today's calls. The Your API keys operations of the WatchTower15 REST API, with curl and SDK samples. ## Ingest - [Ingest APIs](https://developer.watchtower15.com/ingest.md): The two ingest APIs — custom metric points and log lines pushed to api.watchtower15.com with a source's own token, never an API key — and where each is documented. - [Metrics ingest API](https://developer.watchtower15.com/ingest/metrics.md): Push your own numbers into WatchTower15 over HTTP with a per-source bearer token — no SDK, no signing, no gzip required. - [Log ingest API](https://developer.watchtower15.com/ingest/logs.md): Push log lines into WatchTower15 over HTTP with a per-source bearer token — no SDK, no signing, no gzip required. - [WatchTower15 Ingest API](https://developer.watchtower15.com/ingest/reference.md): Every operation of the WatchTower15 ingest API (custom metric points and log lines), generated from its OpenAPI document. - [Metrics ingest](https://developer.watchtower15.com/ingest/reference/metrics.md): Send custom metric points with a metric source's token, and read back the points and limits that token's source holds. The Metrics ingest operations of the WatchTower15 ingest API, with curl and SDK samples. - [Logs ingest](https://developer.watchtower15.com/ingest/reference/logs.md): Send log lines with a log source's token. The Logs ingest operations of the WatchTower15 ingest API, with curl and SDK samples. ## Specifications - [OpenAPI specifications](https://developer.watchtower15.com/specs.md): The OpenAPI 3.1 documents of the REST API and the ingest API, as JSON and YAML, with each document's fingerprint, size and SHA-256, and the Postman collection generated from them. - [OpenAPI document of the REST API](https://developer.watchtower15.com/openapi/v1.json): the contract every REST API page is built from, JSON. - [OpenAPI document of the REST API, on the API host](https://rest.watchtower15.com/v1/openapi.json): the same document, served by the API itself without a key; every answer names it in a `Link` header. - [OpenAPI document of the ingest API](https://developer.watchtower15.com/openapi/ingest.json): the metric and log ingest contract, JSON. ## SDKs - [SDKs](https://developer.watchtower15.com/sdks.md): The official WatchTower15 SDKs — each language's package, install line and runtime, the PHP framework bridges, how SDKs are versioned, and recipes. - [PHP SDK](https://developer.watchtower15.com/sdks/php.md): The official WatchTower15 PHP SDK on Packagist — the REST API, custom metrics and logs in one library, with Laravel, Symfony and CakePHP bridges. - [Configuration](https://developer.watchtower15.com/sdks/php/configuration.md): Build a WatchTower15 PHP SDK client — the options and their defaults, the environment variables, the URL rule, timeouts, retries and the User-Agent. - [The REST API from PHP](https://developer.watchtower15.com/sdks/php/api.md): Call every WatchTower15 /v1 operation from PHP — services and methods, filters, typed models, paging, errors, retries, writes and waiting for a scan. - [Custom metrics from PHP](https://developer.watchtower15.com/sdks/php/metrics.md): Push custom metrics from PHP, or count in the request path with the aggregator and flush once a minute — keys, stores, the flush and the heartbeat. - [Logs from PHP](https://developer.watchtower15.com/sdks/php/logs.md): Send application logs to WatchTower15 from PHP with the Monolog handler or the PSR-3 logger — batching, stream names, bounds and what happens when ingest is down. - [Laravel](https://developer.watchtower15.com/sdks/php/laravel.md): The WatchTower15 Laravel bridge — install, configure custom metrics bindings, the cache store, the two ways to flush, the log channel, the commands and testing. - [Symfony](https://developer.watchtower15.com/sdks/php/symfony.md): The WatchTower15 Symfony bundle — install, the configuration tree, the HTTP client, the metrics store, the two ways to flush, the Monolog handler and the commands. - [CakePHP](https://developer.watchtower15.com/sdks/php/cakephp.md): The WatchTower15 CakePHP plugin — install, the WatchTower15 configuration key, the Cache-engine metrics store, flushing, the log engine and the commands. - [Plain PHP and other frameworks](https://developer.watchtower15.com/sdks/php/other-frameworks.md): Use the WatchTower15 PHP SDK core without a bridge — the client from the environment, a log handler, a store and the cron line, and serverless. - [Testing your integration](https://developer.watchtower15.com/sdks/php/testing.md): Test code that uses the WatchTower15 PHP SDK without a network — FakeClient, MockTransport, FakeAggregator and the Laravel Wt15 fake. - [Node.js SDK](https://developer.watchtower15.com/sdks/node.md): The official WatchTower15 Node.js SDK on npm — the REST API, custom metrics and logs in one library, with pino, winston and NestJS packages and recipes for Express, Fastify, Hono and Next.js. - [Configuring the Node.js SDK](https://developer.watchtower15.com/sdks/node/configuration.md): Build a WatchTower15 client from options or the environment — the five variables, every option and default, local credential checks, the URL rule, timeouts, retries and the User-Agent. - [The REST API from Node.js](https://developer.watchtower15.com/sdks/node/api.md): Call every WatchTower15 /v1 operation from Node.js — resources, params, paging, errors, retries and idempotency, raw responses, the scan waiter and request() for newer operations. - [Custom metrics from Node.js](https://developer.watchtower15.com/sdks/node/metrics.md): Push custom metrics from Node.js, or count in the request path with the aggregator and flush once a minute — keys, the allow-list, the heartbeat, the timer and serverless flushing. - [Logs from Node.js](https://developer.watchtower15.com/sdks/node/logs.md): Send logs from Node.js to WatchTower15 — ingest.logs.push, the Logger, the pino and winston transports, level maps, stream names, batches, the breaker and the counted reasons. - [NestJS and the Node.js SDK](https://developer.watchtower15.com/sdks/node/nestjs.md): Use WatchTower15 in a NestJS 11 or 12 application — the module, its providers, declared metric keys, the logger, shutdown hooks and forTesting(). - [WatchTower15 in Express](https://developer.watchtower15.com/sdks/node/express.md): Use the Node.js SDK in an Express 5 app — one client and one aggregator per process, closed when the server closes. A tested recipe. - [WatchTower15 in Fastify](https://developer.watchtower15.com/sdks/node/fastify.md): Use the Node.js SDK in a Fastify 5 app — the aggregator closed on onClose, and Fastify's own pino shipping logs through @watchtower15/pino. A tested recipe. - [WatchTower15 in Hono](https://developer.watchtower15.com/sdks/node/hono.md): Use the Node.js SDK in a Hono app on Node — the aggregator closed when the server closes — and on Cloudflare Workers with waitUntil. A tested recipe for Node. - [WatchTower15 in Next.js](https://developer.watchtower15.com/sdks/node/nextjs.md): Use the Node.js SDK in a Next.js 16 route handler — server code only, the aggregator flushed with after(). A tested recipe. - [The Node.js SDK in serverless functions](https://developer.watchtower15.com/sdks/node/serverless.md): Send metrics and logs from AWS Lambda, Vercel and Cloudflare Workers — flush before the invocation answers or in waitUntil and after(), and why minute buckets need it. - [Testing your Node.js integration](https://developer.watchtower15.com/sdks/node/testing.md): Test code that uses the WatchTower15 SDK with FakeClient, MockFetch and FakeAggregator — no network, no real credential, assertions that fail with an AssertionError. - [Python SDK](https://developer.watchtower15.com/sdks/python.md): The official WatchTower15 Python SDK on PyPI — the REST API, custom metrics and logs in one library, sync and async, with integrations for Django, FastAPI, Flask and Celery. - [Configuring the Python SDK](https://developer.watchtower15.com/sdks/python/configuration.md): Build a WatchTower15 client from arguments or the environment — the five variables, every argument and default, local credential checks, the URL rule, timeouts, retries, the logger and the User-Agent. - [The REST API from Python](https://developer.watchtower15.com/sdks/python/api.md): Call every WatchTower15 /v1 operation from Python — resources, keyword parameters, NOT_GIVEN, paging, errors, retries and idempotency, raw responses, the scan waiter and request() for newer operations. - [Custom metrics from Python](https://developer.watchtower15.com/sdks/python/metrics.md): Push custom metrics from Python, or count in the request path with the aggregator and flush once a minute — keys, the allow-list, the heartbeat, the thread and one store per process. - [Logs from Python](https://developer.watchtower15.com/sdks/python/logs.md): Send logs from Python to WatchTower15 — ingest.logs.push, the logging handler, structlog and loguru, level maps, stream names, batches, the breaker and the counted reasons. - [WatchTower15 in Django](https://developer.watchtower15.com/sdks/python/django.md): Use the Python SDK in Django 5.2 or 6 — settings.WATCHTOWER15, the shared client and aggregator, the log handler, the middleware for per-request flushing and fake mode for tests. - [WatchTower15 in FastAPI](https://developer.watchtower15.com/sdks/python/fastapi.md): Use the Python SDK in FastAPI — one WatchTower15 object, the shared AsyncClient with Depends, the aggregator, the lifespan that closes them, per-request flushing for Lambda and fake mode. - [WatchTower15 in Flask](https://developer.watchtower15.com/sdks/python/flask.md): Use the Python SDK in Flask 3 — the extension, the WATCHTOWER15_ config keys, the shared client and aggregator in app.extensions, per-request flushing and fake mode. - [WatchTower15 in Celery](https://developer.watchtower15.com/sdks/python/celery.md): Use the Python SDK in Celery 5 workers — install() connects the worker's lifecycle to your aggregator and log handler, reinitialises after the prefork, and flushes at shutdown or after each task. - [Servers, workers and serverless](https://developer.watchtower15.com/sdks/python/deployment.md): Run the Python SDK under gunicorn, uWSGI, Celery prefork, a forked http_client, AWS Lambda and the free-threaded build — what each needs and why. - [Testing your Python integration](https://developer.watchtower15.com/sdks/python/testing.md): Test code that uses the WatchTower15 SDK with FakeClient, AsyncFakeClient, MockTransport and FakeAggregator — no network, no real credential, plain assert-style checks and a pytest fixture. - [AWS Lambda and CloudWatch Logs](https://developer.watchtower15.com/sdks/recipes/aws-lambda.md): Forward log lines to WatchTower15 from an AWS Lambda function, or mirror a CloudWatch Logs group through a subscription filter, with no SDK. ## Optional - [Product documentation](https://docs.watchtower15.com/): how WatchTower15 works, its servers, alarms, logs and the console.