Skip to content
On this site

Logs

Every request made with this team's credentials, with the status it answered and how long it took. This is where a send that went wrong is diagnosed.

Who can read them

Both endpoints need a full_access key. A sending_access key is refused with 401 restricted_api_key — the key is valid, it simply does not reach this endpoint. A revoked key of either kind is 403 restricted_api_key instead, which is a different problem with the same name; the status is what tells them apart, and the errors page lists both.

What is in a log

  • The request line — method, endpoint, response status, latency and the User-Agent you sent.
  • request_id, which is also in the message of any 500 you received, so an error you are holding leads straight to the log of the call that produced it.
  • api_key_id, so a request can be traced to the credential that made it, and email_id when the request created one.

Stored bodies are measurements, not your message. A body naming a password, token or key was dropped whole rather than partly hidden, and a send's content was replaced by its size and digest. Nothing here can give you back what you sent.

Where a request came from

Where a logged request came from
sourceMeans
apiYour own code, calling this API with a key.
dashboardA write made from the dashboard. The dashboard calls this same API, so its writes are logged too.
sdk:<name>One of our client libraries, which names itself here.

Reading this endpoint is itself a request, and is logged. The newest entry on a fresh call is usually that call.

How long they are kept

Logs are kept for your plan's retention window — 30 days on the free plan — and are then deleted. A request older than that is gone rather than empty, and a log belonging to another team answers 404 not_found, the same answer as one that never existed.

Endpoints

GET /logs

Every request made with this team's credentials, newest first.

Query parameters

Query parameters
FieldTypeDescription
statusintegerThe response status recorded on the request, such as 422.
sourcestringWhere the request came from: api, dashboard, or sdk:<name> for one of our clients.
limitintegerHow many logs to return, 1–100. Defaults to 20.
5 more fields (user_agent, start_date, end_date, after, before)
Query parameters, less common
FieldTypeDescription
user_agentstringAn exact User-Agent, as it was sent. Not a substring match.
start_datestringISO 8601 instant, inclusive. A calendar date alone is 422 invalid_parameter — send 2026-09-09T00:00:00.000Z.
end_datestringISO 8601 instant, inclusive. Must be at or after start_date, or the request is 422 invalid_parameter.
afterstringReturn the page that follows this log ID. Mutually exclusive with before.
beforestringReturn the page that precedes this log ID. Mutually exclusive with after.
curl -X GET "https://api.rasket.com/logs?status=422&limit=20" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "0198f4c1-0000-7000-8000-000000000000",
      "created_at": "2026-09-09T10:16:44.902Z",
      "endpoint": "/emails",
      "method": "POST",
      "response_status": 422,
      "user_agent": "acme-billing/1.0",
      "source": "api",
      "request_id": "req_0198f4c1000070008000000000000000",
      "latency_ms": 41,
      "api_key_id": "a4d2f0c8-5b31-4e7a-9c62-8f0b1d4e6a75"
    }
  ]
}
  • Needs a full-access key. A sending-only key is refused with 401 restricted_api_key.
  • Writes made from the dashboard go through this same API and are logged with source: dashboard, so the list is every write to your data rather than only the ones your code made.
  • Reading this endpoint records a request of its own, so the newest entry on a fresh call is usually that call.
  • Logs are kept for your plan's retention window — 30 days on the free plan — and then deleted. A request older than that is gone, not empty.

GET /logs/{log_id}

One request in full, with the bodies that were stored for it.

Path parameters

Path parameters
FieldTypeDescription
log_id*stringThe ID of the log.
curl -X GET "https://api.rasket.com/logs/0198f4c1-0000-7000-8000-000000000000" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "log",
  "id": "0198f4c1-0000-7000-8000-000000000000",
  "created_at": "2026-09-09T10:16:44.902Z",
  "endpoint": "/emails",
  "method": "POST",
  "response_status": 422,
  "user_agent": "acme-billing/1.0",
  "source": "api",
  "request_id": "req_0198f4c1000070008000000000000000",
  "latency_ms": 41,
  "api_key_id": "a4d2f0c8-5b31-4e7a-9c62-8f0b1d4e6a75",
  "request_body": {
    "from": "billing@example.com",
    "subject": "Invoice",
    "html_bytes": 812
  },
  "response_body": {
    "statusCode": 422,
    "name": "missing_required_field",
    "message": "to is required."
  },
  "email_id": null
}
  • request_body is the body as it was stored, not as it was sent. A body naming a password, token or key was dropped whole rather than partially hidden; a send's message content was replaced by its measurements, so html and text appear as byte counts and each attachment as its filename, size and SHA-256. There is no way to recover the original.
  • response_body is present for a failed request only. A successful call returns null — you already have that body.
  • email_id links the log to the email the request created, when it created one. A batch send creates many and links none.
  • A log belonging to another team is 404 not_found, the same answer as a log that never existed.