Show table of contents Hide table of contents

Using the HTTP API

Seq provides a complete HTTP API for manipulating events, queries, apps, and so on.

Seq also provides a rich Command-line Client that wraps the HTTP API and can be used on any OS.

Calling the API from C#/.NET

The complete functionality of the Seq application is exposed to C# apps via the Seq.Api NuGet package. This package makes it trivial to interact with Seq from C#:

var connection = new SeqConnection("http://localhost:5341", apiKey: "...");
var apps = await connection.Apps.ListAsync();

Instructions for installing the Seq.Api package, authenticating, and making calls to Seq can be found on the API GitHub project. The repository also includes some samples to get you started.

Calling the API directly

Navigating to /api with a logged-in Seq session will show the root resource, with links to the various parts of the API.

{
  "Product": "Seq - Machine data, for humans.",
  "Version": "2025.2.15797",
  "Links": {
    "ApiKeysResources": "/api/apikeys/resources",
    ...

Check out the Server HTTP Endpoints documentation for a list of supported API endpoints.

Authentication

Client applications will need to provide an API key, or log in and maintain the provided cookie.

API keys are the recommended way of authenticating with the Seq HTTP API. The API key may either be provided in the query string:

GET /api/events?count=10&apiKey=a789b43750b297853

Or, included in an HTTP header:

X-Seq-ApiKey: a789b43750b297853

If cookie authentication is used (e.g. during setup, before any API keys have been created), applications must capture the CsrfToken property returned in the login response body, and supply this in the X-Seq-CsrfToken header on any subsequent non-GET API requests.

Checking Health

Seq exposes the /health endpoint for monitoring purposes.

When served by Seq, GET /health will return either 200 or 503, and will respond with a JSON body including a status property:

{"status": "The Seq node is in service."}

In a multi-node configuration, /health will always be served by the node handling the request (other API endpoints may be internally routed to another node).