Logs

Look up any v2 request by its trace ID to see what was requested, what the API responded and why, and what happened while the request was processed.


GET/v2/logs

List request logs

Returns the app's v2 requests, newest first. Each log includes the status, error code and hint, and what happened while the request was processed: operations, provider requests, token refreshes, and the webhooks and invitations it triggered. A test key lists the sandbox's requests. Logs are kept for 7 days, or 14 days on Growth and 30 days on Scale. Request and response bodies are never stored.

Sends the request to your sandbox, never to live data.

Query parameters

  • Name
    accountId
    Type
    string
    Description
  • Name
    subjectId
    Type
    string
    Description
  • Name
    outcome
    Type
    string
    Description

    failed returns requests that received a 4xx or 5xx response. succeeded returns requests that received a 2xx or 3xx response. One of failed, succeeded.

  • Name
    status
    Type
    integer
    Description

    An HTTP status code. From 100 to 599.

  • Name
    errorCode
    Type
    string
    Description

    An error code, such as CONNECTION_REVOKED.

  • Name
    route
    Type
    string
    Description

    An endpoint, as it appears in route, such as "POST /v2/events".

  • Name
    since
    Type
    string (date-time)
    Description

    Returns only requests made at or after this time.

  • Name
    until
    Type
    string (date-time)
    Description

    Returns only requests made before this time.

  • Name
    limit
    Type
    integer
    Description

    The maximum number of results in one page. From 1 to 100.

  • Name
    cursor
    Type
    string
    Description

    The nextCursor from the previous page.

Errors

Request

GET
/v2/logs
curl 'https://api.pyas.io/v2/logs?outcome=failed' \  -H "x-api-key: $PYAS_API_KEY"

Response

200 OK
{  "success": true,  "data": [],  "provider": null,  "traceId": "trc_5f2a9c1e7b3d4a6f8e0c2b1d",  "meta": {    "nextCursor": null  }}

GET/v2/logs/{traceId}

Get a request log

Returns one request by its trace ID, which is the X-Trace-Id header of any v2 response or the traceId of an error. Logs are written within a few seconds of the response.

In the sandbox: Use the X-Trace-Id header from any earlier response, or the traceId from an error. Logs are written a few seconds after the response is sent.

Sends the request to your sandbox, never to live data.

Path parameters

  • Name
    traceId
    Type
    string
    Required
    required
    Description

Errors

Request

GET
/v2/logs/{traceId}
curl 'https://api.pyas.io/v2/logs/trc_000000000000000000000000' \  -H "x-api-key: $PYAS_API_KEY"

Response

200 OK
{  "success": true,  "data": {    "traceId": "trc_5f2a9c1e7b3d4a6f8e0c2b1d",    "createdAt": "2026-11-14T20:00:32.997Z",    "mode": "test",    "keyId": null,    "client": null,    "method": "GET",    "route": "GET /v2/calendars",    "operationId": "calendars.list",    "path": "/v2/calendars",    "status": 200,    "durationMs": 4,    "accountId": "sbx_fda58c5980_1",    "subjectId": null,    "error": null,    "idempotencyKey": null,    "replayed": false,    "cache": "MISS",    "queuedMs": null,    "operations": [      {        "provider": "pyas",        "operation": "listCalendars",        "accountId": "sbx_fda58c5980_1",        "durationMs": 1      }    ],    "providerCalls": [],    "tokenRefreshes": [],    "webhookEvents": [],    "invitations": [],    "omitted": 0  },  "provider": null,  "traceId": "trc_5f2a9c1e7b3d4a6f8e0c2b1d",  "meta": {}}