LaneshotDocs

Search the docs

Find a page or a section

Open Laneshot

AI and developers

REST API

Read captures, cards, and automations, create cards, and upload captures over HTTP with an API token.

The REST API gives scripts, CI jobs, and internal tools the same data the trace viewer and the MCP server show. It lives under /api/v1 on your Laneshot server, accepts and returns JSON, and authenticates with personal API tokens.

The examples on this page use the Acme demo workspace: the server https://laneshot.acme.test, the project Acme Storefront with the key SHOP, and the card SHOP-3, "Card payment fails with 3-D Secure on Safari", filed by Maya Chen (admin) and assigned to Léo Martin (technical).

Base URL

Every endpoint is relative to your server's address, the APP_URL it was deployed with (see Configuration reference):

https://laneshot.acme.test/api/v1

Authentication

Requests authenticate with a bearer token in the Authorization header:

curl https://laneshot.acme.test/api/v1/me \
  -H "Authorization: Bearer lsh_4Qm…"

Create a token

  1. Open the account menu at the bottom of the sidebar and choose Account settings.
  2. Under Browsers and API tokens, enter a name that says where the token will be used, such as GitHub Actions: storefront e2e.
  3. If you belong to several organizations, choose the one the token is for.
  4. Select Create token.

Laneshot shows a ready-to-run claude mcp add command that contains the token. Copy the token from it now: it's shown only once, and only its hash is stored.

Account settings with the API tokens list
Browsers and API tokens in Account settings. Each extension, agent, and script has its own token, with the last time it was used.

Tokens start with lsh_. The extension, MCP clients, the CLI, and the SDK all use the same kind of token.

A token belongs to one organization. Everything it reaches is inside that organization: its projects, cards, traces, and automations. Card references such as WEB-42 resolve within it too, so two organizations can both have a WEB project. To work in another organization, create a token there. A token stops working when its owner leaves the organization, or when the organization is suspended.

What a token can do

A token acts as the person who created it, with the same access they have in the app. It can't do anything they couldn't do themselves:

Their role in the project Read the board and captures Create cards, attach captures Run automations
Guest of the organization Yes Attach captures only No
Viewer Yes No No
Editor (member) Yes Yes Yes
Technical (technical) Yes Yes Yes
Project admin (admin) Yes Yes Yes

Organization owners and admins act as project admins in every project of their organization. Captures that aren't attached to a project are visible to their author and to the organization's owners and admins only. See Members and roles.

Revoke a token from the same list in Account settings. Deactivating a person's account also invalidates all of their tokens.

Four read endpoints also work without a token, for captures that have a public link: Retrieve a trace, List events, Retrieve the Markdown report, and Retrieve the transcript. Pass the share token, such as share_kX2…, or the whole link, URL-encoded, in place of the trace ID. A token that is present must still be valid, even on these endpoints.

Backend telemetry is included in a public link's Markdown report only when whoever shared it chose Include backend data. See Sharing and privacy.

Requests and responses

  • Send request bodies as JSON with Content-Type: application/json, except media uploads.
  • Responses are JSON, except the Markdown report (text/markdown) and the empty 204 responses of upload steps.
  • Timestamps in responses are ISO 8601 strings in UTC, such as 2026-11-09T14:32:08.512Z. Event times (t) are Unix timestamps in milliseconds.
  • IDs are UUIDs. Cards are also addressed by their reference, such as SHOP-3.

Trace identifiers

Wherever a path takes :trace, you can pass any of these, URL-encoded:

Form Example
Trace ID 7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17
Private link https://laneshot.acme.test/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17
Share token share_kX2pQ9vLm3
Public link https://laneshot.acme.test/share/share_kX2pQ9vLm3

Limits

The API doesn't paginate. Lists return the most recent items up to a limit instead:

Endpoint Default Maximum
GET /traces 20 100, from the 100 most recent captures you can open
GET /projects/:id/cards 20 20
GET /traces/:trace/events 500 5,000

Uploads have size limits:

Upload Accepted types Maximum
Video video/webm, video/mp4 2 GB
Screenshot image/png, image/jpeg 25 MB
Instant replay application/json (rrweb events) 200 MB
Event log application/json 32 MB and 50,000 events

The API has no rate limiting of its own. Put your reverse proxy's rate limiting in front of /api/v1 if you expose it to the internet.

CORS

The API doesn't send CORS headers, so browsers block calls from web pages on other domains. Call it from servers, CI jobs, scripts, and the CLI. To add context from your own web app to captures, use app metadata, which needs no API call.

Errors

Failed requests return an HTTP error status and a JSON body with a message you can show to people:

{ "error": "Card not found." }
Status Meaning Examples
400 The request is malformed. The event log is not valid JSON., The upload is empty.
401 The token is missing, unknown, revoked, or belongs to a deactivated account. Missing API token., Invalid API token.
403 The token's owner can open the project but their role doesn't allow the action. You don't have permission to do that.
404 The resource doesn't exist, or the token's owner can't see it. Project not found., Trace not found., Card not found., Automation not found.
409 The upload is in the wrong state. This trace is already complete., Upload the media and event log before completing the trace.
413 The upload is over its limit. The upload is too large., The event log is too large.
415 The media type isn't accepted for this kind of capture. Unsupported media type: image/gif.
422 The body is valid JSON but doesn't match the expected fields. The trace metadata is invalid.
500 Something failed on the server. The details are in the server's logs. Internal server error.

Endpoint reference

Method Path Description Token
GET /me The token's owner and the projects they can attach captures to Required
GET /projects Projects you can open Required
GET /projects/:projectId/cards Find cards by title or number Required
POST /projects/:projectId/cards Create a card Required
GET /cards/:reference A card with its fields, issues, comments, and captures Required
PATCH /cards/:reference Set a card's custom field values Required
GET /traces Recent captures Required
GET /traces/:trace A capture's metadata Optional
GET /traces/:trace/events Console, network, and user events Optional
GET /traces/:trace/markdown The whole capture as Markdown Optional
GET /traces/:trace/transcript What the person said while recording Optional
POST /traces Upload step 1: register a capture Required
PUT /traces/:traceId/events Upload step 2: send the event log Required
PUT /traces/:traceId/media Upload step 3: send the recording or image Required
POST /traces/:traceId/complete Upload step 4: publish the capture Required
GET /projects/:projectId/automations A project's automations Required
POST /automations/:automationId/run Run an automation now Required

Retrieve the current user

GET /api/v1/me

Returns who the token belongs to, the organization the token is bound to, every organization the person belongs to, and the projects where they can attach captures, with each project's columns. The browser extension uses it to fill its destination picker, and the CLI uses it to check a token.

curl https://laneshot.acme.test/api/v1/me \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "user": {
    "id": "0a4d2c71-5e8b-4f3a-b9d6-1c7e8f2a3b45",
    "name": "Léo Martin",
    "email": "leo.martin@acme.test"
  },
  "organization": { "id": "9b1f0c2e-4a6d-4e8b-b1c3-5d7e9f0a2b4c", "slug": "acme", "name": "Acme", "role": "member" },
  "organizations": [
    { "id": "9b1f0c2e-4a6d-4e8b-b1c3-5d7e9f0a2b4c", "slug": "acme", "name": "Acme", "role": "member" },
    { "id": "e3a5c7d9-1b2f-4c6e-8a0b-2d4f6a8c0e1b", "slug": "globex", "name": "Globex", "role": "guest" }
  ],
  "projects": [
    {
      "id": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01",
      "key": "SHOP",
      "name": "Acme Storefront",
      "canCreateCards": true,
      "canAttach": true,
      "columns": [
        { "id": "c1a2b3c4-0001-4d5e-8f90-a1b2c3d4e5f6", "name": "Backlog" },
        { "id": "c1a2b3c4-0002-4d5e-8f90-a1b2c3d4e5f6", "name": "To do" },
        { "id": "c1a2b3c4-0003-4d5e-8f90-a1b2c3d4e5f6", "name": "In progress" },
        { "id": "c1a2b3c4-0004-4d5e-8f90-a1b2c3d4e5f6", "name": "Done" }
      ]
    }
  ]
}

Projects where the person is a viewer are left out, since viewers can't attach captures. Use List projects for every project they can open.

organization.role is owner, admin, member, or guest. organizations lists every organization the person belongs to, so a tool can tell them to create a token in another one; the token itself still reaches only organization.

Links in responses, such as a card's url, use the stable form /projects/<id>?card=<number> and /traces/<id>. They redirect to the page inside the organization, such as /acme/projects/<id>?card=3, and keep working if the organization changes its address.

List projects

GET /api/v1/projects

Returns every project the token's owner can open, including those where they're a viewer.

curl https://laneshot.acme.test/api/v1/projects \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "projects": [
    { "id": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01", "key": "SHOP", "name": "Acme Storefront" },
    { "id": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d", "key": "OPS", "name": "Acme Operations" }
  ]
}

Search cards

GET /api/v1/projects/:projectId/cards

Finds cards whose title contains the query, ignoring case, or whose number matches it. Results are sorted by the most recently updated card first. Requires access to the project.

Query parameter Type Description
q string Text to find in titles, or a card number such as 3. Omit it to get the most recently updated cards. query is accepted as an alias.
limit integer Up to 20. Defaults to 20.
curl "https://laneshot.acme.test/api/v1/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01/cards?q=3-D%20Secure" \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "cards": [
    {
      "id": "5d9e2b10-6c4a-4f7e-8b3d-2a1c0f9e8d76",
      "number": 3,
      "title": "Card payment fails with 3-D Secure on Safari"
    }
  ]
}

Results contain the card number, not the full reference. Prefix it with the project's key to get SHOP-3.

Create a card

POST /api/v1/projects/:projectId/cards

Creates a card at the bottom of a column. The token's owner becomes its reporter, and A card is created automations run as if they had created it in the app. Requires the Editor, Technical, or Project admin role in the project.

Body field Type Required Description
title string Yes 1 to 500 characters.
description string No Markdown, up to 50,000 characters.
type string No task (default), story, or bug.
priority string No low, medium, high, or urgent. Defaults to medium.
columnId string No A column ID from /me. Defaults to the project's first column.
curl https://laneshot.acme.test/api/v1/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01/cards \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Apple Pay sheet closes immediately on iOS 18",
    "description": "Reported by three customers through support this morning.",
    "type": "bug",
    "priority": "high"
  }'

Returns 201 Created:

{
  "id": "e4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8",
  "number": 14,
  "reference": "SHOP-14",
  "url": "https://laneshot.acme.test/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01?card=14"
}

Retrieve a card

GET /api/v1/cards/:reference

Returns a card from its reference, with its linked issues, comments, and the captures attached to it. The reference isn't case-sensitive: shop-3 works too.

curl https://laneshot.acme.test/api/v1/cards/SHOP-3 \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "id": "5d9e2b10-6c4a-4f7e-8b3d-2a1c0f9e8d76",
  "reference": "SHOP-3",
  "projectId": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01",
  "url": "https://laneshot.acme.test/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01?card=3",
  "title": "Card payment fails with 3-D Secure on Safari",
  "description": "After the 3-D Secure challenge, Safari returns to checkout with \"Payment failed\".",
  "type": "bug",
  "priority": "urgent",
  "column": "To do",
  "completed": false,
  "completedAt": null,
  "assignee": "Léo Martin",
  "labels": ["checkout", "safari"],
  "startDate": null,
  "dueDate": "2026-11-13",
  "fields": [
    { "name": "Severity", "type": "single_select", "value": "Critical" },
    { "name": "Platform", "type": "multi_select", "value": ["iOS Safari"] },
    { "name": "Story points", "type": "number", "value": 5 },
    { "name": "QA owner", "type": "person", "value": "Priya Patel" },
    { "name": "Regression", "type": "checkbox", "value": true }
  ],
  "checklist": [
    { "id": "8b2f6e14-0d3a-4c7b-9e51-6a4d2c8f1b90", "text": "Reproduce on Safari 18", "done": true },
    { "id": "1c9a7d35-4e2b-4f80-a6d3-7b5e9c0a2f14", "text": "Handle the requires_action redirect", "done": false }
  ],
  "blocked": false,
  "blockedBy": [],
  "blocking": [
    { "reference": "SHOP-5", "title": "Add Apple Pay to the express checkout", "done": false }
  ],
  "issues": [
    {
      "provider": "github",
      "reference": "acme/storefront#482",
      "title": "Card payment fails with 3-D Secure on Safari",
      "state": "open",
      "url": "https://github.com/acme/storefront/issues/482"
    }
  ],
  "comments": [
    {
      "author": "Maya Chen",
      "body": "@[Léo Martin](user:0a4d2c71-5e8b-4f3a-b9d6-1c7e8f2a3b45) the 502 starts right after the redirect back from the bank.",
      "createdAt": "2026-11-09T14:41:20.004Z",
      "reactions": [{ "emoji": "👀", "count": 2 }]
    }
  ],
  "traces": [
    {
      "id": "7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
      "title": "Card payment fails with 3-D Secure on Safari",
      "url": "https://laneshot.acme.test/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
      "summary": {
        "consoleErrors": 2,
        "consoleWarnings": 1,
        "failedRequests": 1,
        "totalRequests": 38,
        "userActions": 9,
        "navigations": 3
      }
    }
  ]
}

checklist lists the card's checklist items in order. blockedBy and blocking are the cards it waits on and the cards waiting on it, with whether each is done. They only include cards in projects you can open; blocked is true while any card it waits on is open, including one you can't see.

Field Description
issues[].provider github, linear, jira, gitlab, asana, azure-devops, notion, or trello.
issues[].reference owner/repo#number for GitHub, the tracker's own key otherwise, such as ENG-42 or OPS-7.
comments[].body Markdown. Mentions are stored as @[Name](user:<id>).
comments[].author null when the author's account was removed.
traces Ready captures only, newest first.
fields Every custom field of the project, in order. value is null when unset. Select options and people are given by name, dates as YYYY-MM-DD.

Set custom field values

PATCH /api/v1/cards/:reference

Sets one or more custom field values. Name fields by their name or id. Give select options by name, people by name or email, and dates as YYYY-MM-DD. null clears a value. Requires a role that can edit cards.

curl -X PATCH https://laneshot.acme.test/api/v1/cards/SHOP-3 \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "fields": { "Severity": "Major", "Platform": ["iOS Safari", "Chrome"], "QA owner": "priya@acme.test", "Release": null } }'

Returns the updated card, as Retrieve a card does. An unknown field or an invalid value returns 422 and nothing after it is applied.

List traces

GET /api/v1/traces

Returns recent captures the token's owner can open, newest first: their own, and those attached to projects they can open.

Query parameter Type Description
projectId string Only captures attached to this project.
limit integer 1 to 100. Defaults to 20.

The list is taken from the 100 most recent captures you can open, then filtered by project, so a projectId filter can return fewer results than limit when other projects are busier.

curl "https://laneshot.acme.test/api/v1/traces?projectId=3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01&limit=2" \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "traces": [
    {
      "id": "7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
      "url": "https://laneshot.acme.test/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
      "title": "Card payment fails with 3-D Secure on Safari",
      "kind": "video",
      "createdAt": "2026-11-09T14:32:08.512Z",
      "summary": {
        "consoleErrors": 2,
        "consoleWarnings": 1,
        "failedRequests": 1,
        "totalRequests": 38,
        "userActions": 9,
        "navigations": 3
      },
      "projectId": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01",
      "project": { "key": "SHOP", "name": "Acme Storefront" },
      "card": { "reference": "SHOP-3" },
      "author": "Maya Chen"
    },
    {
      "id": "b2d4f6a8-1c3e-4a5b-8d7f-9e0a1b2c3d4e",
      "url": "https://laneshot.acme.test/traces/b2d4f6a8-1c3e-4a5b-8d7f-9e0a1b2c3d4e",
      "title": "Promo code field rejects lowercase codes",
      "kind": "replay",
      "createdAt": "2026-11-08T09:12:45.120Z",
      "summary": {
        "consoleErrors": 0,
        "consoleWarnings": 0,
        "failedRequests": 1,
        "totalRequests": 12,
        "userActions": 6,
        "navigations": 1
      },
      "projectId": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01",
      "project": { "key": "SHOP", "name": "Acme Storefront" },
      "card": { "reference": "SHOP-9" },
      "author": "Léo Martin"
    }
  ]
}

kind is video, screenshot, or replay (an instant replay). Captures still uploading aren't listed.

Retrieve a trace

GET /api/v1/traces/:trace

Returns a capture's metadata: description, page and browser, problem counts, and the card it's attached to. Accepts any trace identifier. Works without a token for public links.

Through a public link, projectId and cardId are null and card has only its reference, with url set to null: a public link doesn't reveal internal IDs.

curl https://laneshot.acme.test/api/v1/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17 \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "id": "7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
  "url": "https://laneshot.acme.test/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17",
  "shareUrl": null,
  "title": "Card payment fails with 3-D Secure on Safari",
  "description": "I approve the payment in my bank app, then checkout says \"Payment failed\".",
  "kind": "video",
  "projectId": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01",
  "cardId": "5d9e2b10-6c4a-4f7e-8b3d-2a1c0f9e8d76",
  "card": {
    "reference": "SHOP-3",
    "url": "https://laneshot.acme.test/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01?card=3"
  },
  "startedAt": "2026-11-09T14:31:21.000Z",
  "durationMs": 47210,
  "createdAt": "2026-11-09T14:32:08.512Z",
  "summary": {
    "consoleErrors": 2,
    "consoleWarnings": 1,
    "failedRequests": 1,
    "totalRequests": 38,
    "userActions": 9,
    "navigations": 3
  },
  "environment": {
    "url": "https://shop.acme.test/checkout/payment",
    "title": "Payment · Acme Storefront",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15",
    "browser": { "name": "Safari", "version": "18.1" },
    "os": { "name": "macOS", "version": "15.1" },
    "viewport": { "width": 1440, "height": 900 },
    "screen": { "width": 1512, "height": 982, "devicePixelRatio": 2 },
    "language": "en-US",
    "timezone": "Europe/Paris",
    "colorScheme": "light",
    "appMetadata": {
      "user": { "id": "cus_8842", "email": "jordan.lee@example.com", "plan": "plus" },
      "release": "storefront@2026.11.2"
    }
  },
  "transcriptStatus": "ready"
}
Field Description
shareUrl The public link, or null when the capture isn't shared.
card The card the capture is attached to, or null.
startedAt, durationMs When recording started and how long it lasted. durationMs is 0 for screenshots.
environment Page, browser, device, and connection details. See What is captured.
environment.appMetadata Present when the site set app metadata.
transcriptStatus pending, ready, empty, failed, or null when there's no transcript.

List events

GET /api/v1/traces/:trace/events

Returns the capture's timeline: console output, network requests, user actions, navigations, WebSocket and EventSource traffic, and page events. It applies the same filters as the MCP tools. Works without a token for public links.

Query parameter Type Description
kind string Comma-separated event kinds: console, network, action, navigation, socket, page. Omit it for every kind.
errorsOnly boolean Keep only console errors. Other kinds aren't affected.
failedOnly boolean Keep only failed requests: transport errors, and 4xx and 5xx responses.
includeAssets boolean Include images, scripts, stylesheets, and fonts. Left out by default.
urlContains string Keep only requests whose URL contains this text.
limit integer 1 to 5,000. Defaults to 500. Events are returned oldest first.

Booleans are true when present with any value but 0 or false, so ?failedOnly and ?failedOnly=true are the same.

curl "https://laneshot.acme.test/api/v1/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17/events?kind=console,network&errorsOnly&failedOnly" \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "events": [
    {
      "id": "k3j9x2-41",
      "t": 1762698712874,
      "kind": "network",
      "initiator": "fetch",
      "method": "POST",
      "url": "https://shop.acme.test/api/payments/confirm",
      "status": 502,
      "durationMs": 1843.2,
      "requestHeaders": [
        ["content-type", "application/json"],
        ["authorization", "[redacted]"],
        ["traceparent", "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"]
      ],
      "responseHeaders": [["content-type", "application/json"]],
      "requestBody": "{\"paymentIntent\":\"pi_3Q8…\",\"returnUrl\":\"https://shop.acme.test/checkout/return\"}",
      "responseBody": "{\"error\":\"upstream_timeout\",\"provider\":\"acquirer\"}",
      "backendTraceId": "4bf92f3577b34da6a3ce929d0e0e4736"
    },
    {
      "id": "k3j9x2-42",
      "t": 1762698712901,
      "kind": "console",
      "level": "error",
      "source": "console",
      "message": "Payment failed: upstream_timeout",
      "stack": "Error: Payment failed: upstream_timeout\n    at confirmPayment (https://shop.acme.test/assets/checkout-4f1a.js:1:18422)"
    }
  ]
}

Fields shared by every event:

Field Description
id Unique within the capture.
t When it happened, in Unix milliseconds. Subtract the trace's startedAt for the position in the recording. Negative offsets are the moments before recording started.
kind The event kind.
frame The iframe's origin, when the event came from an embedded frame such as a payment form.

Key fields by kind:

Kind Fields
console level (debug, log, info, warn, error), source (console, exception, rejection, resource, csp), message, stack
network initiator (fetch, xhr, beacon, resource), method, url, status (0 without a response), durationMs, requestHeaders, responseHeaders, requestBody, responseBody, responseBytes, error, backendTraceId
action action (click, input, submit, keypress), target (selector, tag, text), key. Typed values are never recorded.
navigation trigger (load, pushState, replaceState, popstate, hashchange), url, title
socket transport (websocket, eventsource), phase (open, send, receive, close, error), url, data, code
page category (performance, lifecycle), name (such as LCP or long-task), value, detail

Credentials in headers, query strings, and bodies arrive as [redacted]. They're removed in the browser and again on the server, as described in What is captured. backendTraceId links a request to your backend's traces. See Backend telemetry.

Retrieve the Markdown report

GET /api/v1/traces/:trace/markdown

Returns the whole capture as one Markdown document: the reporter's description, environment, app metadata, console errors and warnings, failed requests with their bodies, all requests, user actions, the transcript, and backend telemetry. It's the format AI assistants read best, and the same report the MCP tool read_trace and Ask Claude use. Works without a token for public links.

Backend telemetry is included for project members, and for public links only when they were shared with backend data.

curl https://laneshot.acme.test/api/v1/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17/markdown \
  -H "Authorization: Bearer $LANESHOT_TOKEN"

The response has the type text/markdown; charset=utf-8:

# Card payment fails with 3-D Secure on Safari

Bug capture from Laneshot. Watch the recording: https://laneshot.acme.test/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17

## Reporter's description

I approve the payment in my bank app, then checkout says "Payment failed".

## Environment

- Page: https://shop.acme.test/checkout/payment (Payment · Acme Storefront)
- Browser: Safari 18.1 on macOS 15.1
…

Retrieve the transcript

GET /api/v1/traces/:trace/transcript

Returns what the person said while recording, as timed segments, when the server has transcription turned on. See Transcripts. Works without a token for public links.

curl https://laneshot.acme.test/api/v1/traces/7c1e4f2a-93b8-4d55-a0e1-2f6b9d3c8a17/transcript \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "transcript": {
    "status": "ready",
    "segments": [
      { "startMs": 1200, "endMs": 4800, "text": "I'm paying with the Visa that always asks for 3-D Secure." },
      { "startMs": 21400, "endMs": 26100, "text": "The bank app says approved, but back here it says payment failed." }
    ],
    "language": "english",
    "model": "whisper-1",
    "updatedAt": "2026-11-09T14:32:31.877Z"
  }
}

transcript is null for screenshots, replays, and recordings made before transcription was turned on. status is pending while transcribing, empty when nobody spoke, and failed with an error message otherwise.

Upload a capture

Uploading takes four requests, the same ones the browser extension makes. Only the person who registered a capture can upload to it, and the capture stays invisible until it's completed.

Step 1: Register the capture

POST /api/v1/traces
Body field Type Required Description
kind string Yes video, screenshot, or replay.
title string Yes 1 to 200 characters.
description string No Up to 10,000 characters.
startedAt number Yes When the capture started, in Unix milliseconds.
durationMs integer Yes 0 for screenshots.
environment object Yes Page and browser details. Required fields: url, title, userAgent, browser (name, version), os (name, version), viewport (width, height), screen (width, height, devicePixelRatio), language, timezone, colorScheme (light or dark). Optional: appMetadata, up to 10 KB.
attachment object No Where the capture lands. Omit it to keep the capture in your own library.

attachment takes one of two shapes:

Shape Effect Required role
{ "type": "card", "cardId": "…" } Attaches the capture to an existing card. Member or above
{ "type": "new-card", "projectId": "…", "columnId": "…" } Creates a bug card titled after the capture, with its description and a link to it. columnId is optional. Member or above
curl https://laneshot.acme.test/api/v1/traces \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "screenshot",
    "title": "e2e: checkout › pays with a saved card",
    "description": "Failed on main, run 4812.",
    "startedAt": 1762700412000,
    "durationMs": 0,
    "environment": {
      "url": "https://staging.shop.acme.test/checkout/payment",
      "title": "Payment · Acme Storefront",
      "userAgent": "Playwright/1.56 Chromium/141",
      "browser": { "name": "Chromium", "version": "141" },
      "os": { "name": "Linux", "version": "" },
      "viewport": { "width": 1280, "height": 720 },
      "screen": { "width": 1280, "height": 720, "devicePixelRatio": 1 },
      "language": "en-US",
      "timezone": "UTC",
      "colorScheme": "light"
    },
    "attachment": { "type": "new-card", "projectId": "3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01" }
  }'

Returns 201 Created with the new capture's ID:

{ "id": "f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b" }

Step 2: Send the event log

PUT /api/v1/traces/:traceId/events

The body is a JSON array of events, possibly empty, up to 32 MB and 50,000 events. Laneshot validates every event, redacts credentials again, and computes the capture's summary. Returns 204 No Content.

curl -X PUT https://laneshot.acme.test/api/v1/traces/f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b/events \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[]'

Step 3: Send the media

PUT /api/v1/traces/:traceId/media

The body is the raw file, with its type in Content-Type. The type must match the capture's kind, as listed in Limits. Codec parameters such as video/webm;codecs=vp9 are accepted. Returns 204 No Content.

curl -X PUT https://laneshot.acme.test/api/v1/traces/f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b/media \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: image/png" \
  --data-binary @test-results/checkout-failed.png

Step 4: Complete the capture

POST /api/v1/traces/:traceId/complete

Publishes the capture. It appears on its card, A trace is captured automations run, and videos are queued for transcription when it's turned on. Fails with 409 until both the events and the media are uploaded.

curl -X POST https://laneshot.acme.test/api/v1/traces/f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b/complete \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "id": "f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b",
  "url": "https://laneshot.acme.test/traces/f1e2d3c4-b5a6-4978-8a6b-5c4d3e2f1a0b"
}

A capture that is never completed stays private to its author and isn't listed anywhere.

List automations

GET /api/v1/projects/:projectId/automations

Returns a project's automations. See Automations.

curl https://laneshot.acme.test/api/v1/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01/automations \
  -H "Authorization: Bearer $LANESHOT_TOKEN"
{
  "automations": [
    {
      "id": "a7b8c9d0-e1f2-4a3b-9c4d-5e6f7a8b9c0d",
      "name": "Escalate checkout bugs to #payments",
      "trigger": "manual",
      "enabled": true
    },
    {
      "id": "d0c9b8a7-f6e5-4d4c-8b3a-2f1e0d9c8b7a",
      "name": "File Safari bugs in Linear",
      "trigger": "trace.created",
      "enabled": true
    }
  ]
}

trigger is one of trace.created, card.created, card.moved, card.assigned, card.commented, trace.commented, issue.created, issue.closed, webhook.received, or manual.

Run an automation

POST /api/v1/automations/:automationId/run

Runs an automation now, whatever its trigger, and waits for it to finish. Its conditions are still checked, and the run appears in the automation's history. The actions run with the access of the person who created the automation. Requires the Editor, Technical, or Project admin role in the automation's project.

Body field Type Required Description
card string No A card reference, such as SHOP-3, for actions and variables that need a card.
curl https://laneshot.acme.test/api/v1/automations/a7b8c9d0-e1f2-4a3b-9c4d-5e6f7a8b9c0d/run \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "card": "SHOP-3" }'
{
  "status": "succeeded",
  "steps": [
    { "label": "Send a webhook", "status": "succeeded", "detail": "Delivered to hooks.slack.com (HTTP 200, attempt 1)", "durationMs": 212 },
    { "label": "Set the priority", "status": "succeeded", "detail": "Priority set to urgent", "durationMs": 9 }
  ]
}

status is succeeded, failed when a step failed (later steps are then skipped), or skipped when a condition didn't match. A failed run still returns 200: check status.

Recipes

File a card from your support tool

When a support agent escalates a ticket, create a bug card on the storefront board:

curl https://laneshot.acme.test/api/v1/projects/3f2c9a1e-7b4d-4c1a-9e2f-5a6b7c8d9e01/cards \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg title "$TICKET_SUBJECT" --arg body "$TICKET_URL" \
        '{title: $title, description: $body, type: "bug", priority: "high"}')"

Then send the customer a recording link, so their recording lands next to it.

Read only what failed

To check a capture in a script without downloading the whole timeline:

curl -s "https://laneshot.acme.test/api/v1/traces/$TRACE/events?kind=network&failedOnly" \
  -H "Authorization: Bearer $LANESHOT_TOKEN" \
  | jq -r '.events[] | "\(.status) \(.method) \(.url) trace=\(.backendTraceId // "-")"'
502 POST https://shop.acme.test/api/payments/confirm trace=4bf92f3577b34da6a3ce929d0e0e4736

Upload a CI failure

The CLI recipe uploads Playwright failure screenshots in one command. With plain HTTP, run the four upload steps in order and stop at the first error.

Troubleshooting

401 Missing API token. The Authorization header didn't reach Laneshot. Check the Bearer prefix, and that your reverse proxy forwards the header.

401 Invalid API token. The token was revoked, mistyped, or its owner was deactivated. Create a new one in Account settings.

404 Project not found. for a project you can see in the app. The token belongs to someone else, such as a shared CI account that isn't a member of the project. Add that account to the project, or use a token of your own.

403 You don't have permission to do that. The token's owner is a viewer in the project. Ask a project admin to make them a member.

409 This trace is already complete. A retry ran the upload steps again on a published capture. Register a new capture with step 1 instead.

415 Unsupported media type The Content-Type of step 3 doesn't match kind, for example a PNG sent for a video capture.

A request from a web page fails with a CORS error. The API doesn't allow cross-origin browser calls. Call it from your backend, or use app metadata to add context from the page.