Maton

List Logs

GET/logs

Authorization

bearerAuth
AuthorizationBearer <token>

Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.

In: header

Query Parameters

from?string

Start of the time range, inclusive. Epoch milliseconds or an ISO 8601 timestamp such as 2026-11-18T00:00:00Z; a timestamp without an offset is UTC. Defaults to 24 hours before to. Must be within the last 30 days.

to?string

End of the time range, exclusive. Same formats as from. Defaults to now. At most 30 days after from and 24 hours in the future.

query?string

Search filter, such as level:error, request_id:01a1efc0-6243-73a1-81b2-c3d4e5f60718, or "rate limit" -source:function.

sort?string

-timestamp for newest first, timestamp for oldest first.

Default"-timestamp"
Value in"-timestamp" | "timestamp"
limit?integer

Maximum number of items to return, from 1 to 1000.

Default100
Range1 <= value <= 1000
next_token?string

Opaque pagination cursor from the previous response. Send the same query and sort as the request that returned it; from and to can be omitted, since the token keeps the original range.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -G "https://api.maton.ai/logs" \  -H "Authorization: Bearer $MATON_API_KEY" \  --data-urlencode "query=level:(warning OR error) timeout" \  --data-urlencode "from=2026-11-18T00:00:00Z"
{
  "logs": [
    {
      "log_id": "01a1efc0-63c8-7001-9a4f-5e6d7c8b9a01",
      "account_id": "3f6c2a1e-8b4d-4e7f-9a2c-5d1e0f3b7a64",
      "request_id": "01a1efc0-6243-73a1-81b2-c3d4e5f60718",
      "timestamp": "2026-11-18T17:42:05.512Z",
      "source": "gateway",
      "level": "info",
      "message": "REPORT Duration: 389 ms  Upstream Duration: 352 ms  Overhead Duration: 37 ms"
    },
    {
      "log_id": "01a1efc0-4b2e-7001-8c3d-2e1f0a9b8c7d",
      "account_id": "3f6c2a1e-8b4d-4e7f-9a2c-5d1e0f3b7a64",
      "request_id": "01a1efc0-4674-73a1-81b2-c3d4e5f60718",
      "timestamp": "2026-11-18T17:41:59.214Z",
      "source": "gateway",
      "level": "warning",
      "message": "channel_not_found"
    }
  ],
  "next_token": null
}
{
  "message": "Invalid app name.",
  "type": "Bad Request",
  "code": 400
}
{
  "message": "Invalid API key.",
  "type": "Unauthorized",
  "code": 401
}
{
  "message": "Too many requests.",
  "type": "Too Many Requests",
  "code": 429
}
{
  "message": "Internal server error.",
  "type": "Internal Server Error",
  "code": 500
}