For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sessions

Browser sessions an agent recorded: a title, how it ended, the git commit and pull request, and attachments such as a trace, screenshots and a video.

A session is not a run. It does not appear in run lists or in analytics, and it has no spec files or tests. Share one with POST /share and sessionId.

Create a session

post
/sessions

Records a browser session and signs an upload URL for each attachment declared in the request. Upload each file with a PUT to its uploadUrl, sending the headers in uploadHeaders; when sizeBytes was sent, the body must be exactly that long. The session is complete when created: there is nothing to finish. Besides a bearer token, this route accepts a record key in the x-currents-key header.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Body
projectIdstringRequired
titlestring · min: 1 · max: 1024Required

What the session set out to show

statusstring · enumRequiredPossible values:
errorstring · max: 10000Optional

For a failed session

durationMsinteger · max: 86400000Optional
tagsstring[] · max: 20Optional
Responses
200

The session ID and upload URLs, in the order of the request

application/json
statusstring · enumRequiredPossible values:
post/sessions
POST /v1/sessions HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 456

{
  "projectId": "text",
  "title": "text",
  "status": "passed",
  "error": "text",
  "durationMs": 1,
  "tags": [
    "text"
  ],
  "commit": {
    "sha": "text",
    "branch": "text",
    "message": "text",
    "authorName": "text",
    "authorEmail": "text",
    "remoteOrigin": "text"
  },
  "pr": {
    "link": "text",
    "id": "text"
  },
  "ci": {
    "provider": "text",
    "buildNumber": "text",
    "params": {}
  },
  "attachments": [
    {
      "name": "text",
      "type": "trace",
      "contentType": "image/png",
      "sizeBytes": 1,
      "caption": "text",
      "meta": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}
{
  "status": "OK",
  "data": {
    "sessionId": "text",
    "uploadExpiresInSeconds": 600,
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "text",
        "uploadUrl": "text",
        "uploadHeaders": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ]
  }
}

Get a session

get
/sessions/{sessionId}

The session and its attachments, oldest first, each with a read URL signed for an hour.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
sessionIdstringRequired

The session ID

Responses
200

The session

application/json
statusstring · enumOptionalPossible values:
get/sessions/{sessionId}
GET /v1/sessions/{sessionId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "sessionId": "text",
    "projectId": "text",
    "title": "text",
    "status": "passed",
    "error": "text",
    "tags": [
      "text"
    ],
    "durationMs": 1,
    "git": {
      "sha": "text",
      "branch": "text",
      "message": "text",
      "authorName": "text",
      "authorEmail": "text",
      "remoteOrigin": "text"
    },
    "pr": {
      "id": "text",
      "link": "text",
      "title": "text",
      "source": "text",
      "destination": "text"
    },
    "attachmentCount": 1,
    "createdAt": "2026-01-01T00:00:00.000Z",
    "cursor": "text",
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "trace",
        "contentType": "text",
        "sizeBytes": 1,
        "caption": "text",
        "meta": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "createdAt": "2026-01-01T00:00:00.000Z",
        "readUrl": "text"
      }
    ]
  }
}

Delete a session

delete
/sessions/{sessionId}

The session stops being readable at once. Its attachments, share links and share assets are removed in the background.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
sessionIdstringRequired

The session ID

Responses
200

Deleted

application/json
statusstring · enumRequiredPossible values:
delete/sessions/{sessionId}
DELETE /v1/sessions/{sessionId} HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK"
}

List the attachments of a session

get
/sessions/{sessionId}/attachments
Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
sessionIdstringRequired

The session ID

Responses
200

The attachments, oldest first

application/json
statusstring · enumOptionalPossible values:
get/sessions/{sessionId}/attachments
GET /v1/sessions/{sessionId}/attachments HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "data": {
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "trace",
        "contentType": "text",
        "sizeBytes": 1,
        "caption": "text",
        "meta": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "createdAt": "2026-01-01T00:00:00.000Z",
        "readUrl": "text"
      }
    ]
  }
}

Add attachments to a session

post
/sessions/{sessionId}/attachments

Signs an upload URL for each attachment. A session takes at most 200 attachments. The body takes no target fields such as instanceId or testId: a session has none. Besides a bearer token, this route accepts a record key in the x-currents-key header.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
sessionIdstringRequired

The session ID

Body
Responses
200

Upload URLs, in the order of the request

application/json
statusstring · enumRequiredPossible values:
post/sessions/{sessionId}/attachments
POST /v1/sessions/{sessionId}/attachments HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 147

{
  "attachments": [
    {
      "name": "text",
      "type": "trace",
      "contentType": "image/png",
      "sizeBytes": 1,
      "caption": "text",
      "meta": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}
{
  "status": "OK",
  "data": {
    "sessionId": "text",
    "uploadExpiresInSeconds": 600,
    "attachments": [
      {
        "attachmentId": "text",
        "name": "text",
        "type": "text",
        "uploadUrl": "text",
        "uploadHeaders": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ]
  }
}

List the sessions of a project

get
/projects/{projectId}/sessions

Newest first. Filters match as they do on the run list; search looks at the title, branch, commit message and pull request.

Authorizations
AuthorizationstringRequired

An organization API key, sent as Authorization: Bearer <key>. A key carries one scope for the whole API: a read key reaches the GET endpoints, a write key reaches all of them. A crnts_pat_ personal access token is accepted as a Bearer while its owner remains an eligible administrator in its active organization. Each operation requires the corresponding scope stored on that token.

Path parameters
projectIdstringRequired

The project ID

Example: proj_abc123
Query parameters
limitinteger · min: 1 · max: 50Optional

Maximum number of items to return (default: 10, max: 50)

Default: 10
starting_afterstringOptional

Cursor for pagination. Returns items after this cursor value.

ending_beforestringOptional

Cursor for pagination. Returns items before this cursor value.

tags[]string[]Optional

Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)

Example: ["tag1","tag2"]
tag_operatorstring · enumOptional

Logical operator for tag filtering. AND requires all tags to be present (default), OR requires any tag to be present.

Default: ANDExample: ANDPossible values:
pr_idstring · min: 1 · max: 128Optional

Filter runs by normalized pull request id (stored as meta.pr.id). Printable ASCII only, max 128 characters.

Example: 42Pattern: ^[!-~]+$
searchstringOptional

Case-insensitive substring search over a session's title, branch, commit message, and pull request id and title. Printable ASCII only; leading and trailing whitespace is trimmed, and the trimmed value must be 1–200 characters.

Pattern: ^[ -~]+$
date_startstringOptional

Filter runs created on or after this ISO 8601 date-time. A date without a time (2024-01-01) means midnight UTC of that day.

Example: 2024-01-01T00:00:00Z
date_endstringOptional

Filter runs created before this ISO 8601 date-time. A date without a time (2024-12-31) means midnight UTC of that day, so the range ends before that day.

Example: 2024-12-31T23:59:59Z
Responses
200

A page of sessions, without their attachments

application/json
statusstring · enumOptionalPossible values:
has_morebooleanOptional
get/projects/{projectId}/sessions
GET /v1/projects/{projectId}/sessions HTTP/1.1
Host: api.currents.dev
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "OK",
  "has_more": true,
  "data": [
    {
      "sessionId": "text",
      "projectId": "text",
      "title": "text",
      "status": "passed",
      "error": "text",
      "tags": [
        "text"
      ],
      "durationMs": 1,
      "git": {
        "sha": "text",
        "branch": "text",
        "message": "text",
        "authorName": "text",
        "authorEmail": "text",
        "remoteOrigin": "text"
      },
      "pr": {
        "id": "text",
        "link": "text",
        "title": "text",
        "source": "text",
        "destination": "text"
      },
      "attachmentCount": 1,
      "createdAt": "2026-01-01T00:00:00.000Z",
      "cursor": "text"
    }
  ]
}

Last updated

Was this helpful?