> For the list of every page, fetch /llms.txt. The API contract is the OpenAPI file linked from the API reference.

# List changes made to the account

GET https%3A%2F%2Fapi.usemeadow.ai/v1/audit-logs

Returns the record of changes made through the API to keys, projects, provider
keys and budgets, newest first: who made the change (the API key), what
changed, when, and the id of the request. An entry is written when the change
succeeds. Reads and model or sandbox calls are not recorded here.

An entry never holds a key secret, a vendor credential, a webhook secret or a
webhook address. `details.fields` names what the request set, and
`details.values` holds the new values of the fields that are safe to show.

Entries are kept 400 days on the hosted service.

Scope: `admin`.


Reference: https://docs.usemeadow.ai/api-endpoints/audit-log/list-audit-logs

## Authentication

- `Authorization` header (bearer token, required) — A Meadow API key, sent as `Authorization: Bearer mdw_...`. The header `x-api-key: mdw_...` is accepted in its place.

## Request

### Query parameters

- `limit` (integer, optional, default: 50) — Page size, from 1 to 200. A value outside that range returns 400.
- `cursor` (string, optional) — The `next_cursor` of the previous page. Leave out for the first page. A value Meadow did not issue returns 400.
- `type` (string, optional) — Return only entries of this type, such as `api_key.updated`.
- `project_id` (string, optional) — Return only entries about this project and the keys and budgets in it.
- `actor_key_id` (string, optional) — Return only changes made with this key.

## Response

### 200

One page of entries, newest first.

- `object` (enum, required) — Always `list`, as on OpenAI and Stripe.
  - Allowed values: `list`
- `data` (list of AuditLog, required)
- `has_more` (boolean, required) — True when `next_cursor` is set.
- `next_cursor` (string, required, nullable) — Pass it as `cursor` to get the next page. Null on the last page.

## Errors

### 400 Bad Request Error

`limit` is out of range, or `cursor` is not one Meadow issued.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 401 Unauthorized Error

The key is missing, malformed, unknown, revoked, or expired, or a key it was minted from no longer exists. Check the key and the header.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 403 Forbidden Error

The key does not have the `admin` scope. Use an admin key.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 429 Too Many Requests Error

More than 20 failed authentications came from your address in one minute, and this request also failed to authenticate: fix the key, wait for `retry-after` seconds, then retry. Or the server instance was full and no slot came free for the account within 3 seconds (`error.code` `account_in_flight_limit_exceeded`): wait for `retry-after` seconds, then retry.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 500 Internal Server Error

Meadow failed. Retry with backoff, and tell us if it persists.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

## Types

### AuditLog

One change to the account. The shape follows OpenAI's audit log object, with Stripe's link from a change to its request.

- `id` (string, required) — The entry id (`aud_...`).
- `object` (enum, required) — Always `audit_log`.
  - Allowed values: `audit_log`
- `type` (string, required) — What happened. A new type can be added at any time. | `type` | Change | | --- | --- | | `api_key.created` | A key was minted. | | `api_key.updated` | A key's name, limits, `limit_action` or `disabled` changed. | | `api_key.deleted` | A key was revoked, with every key minted from it. When a person's removal, lower role or lost project access revoked it, `details` holds `reason` (`member.removed`, `member.updated`, `access.revoked`, `project_member.removed` or `project.updated`) and the `user_id` of the person who minted it. | | `api_key.rotated` | A key's secret was replaced. `details` holds `grace_period_seconds` when the request sent it. Never a secret. | | `project.created` | A project was created. | | `project.updated` | A project's name, routing, webhook address or `restricted` changed, or its webhook secret was rotated. | | `project_member.added` | A person was added to a project. `resource_id` is their user id. | | `project_member.removed` | A person was removed from a project. `resource_id` is their user id. | | `project.deleted` | A project was deleted. | | `provider_key.updated` | A vendor credential was stored or replaced. | | `provider_key.deleted` | A vendor credential was deleted. | | `provider_key.verified` | A stored vendor credential was checked again and the vendor accepted it. | | `budget.updated` | A budget was set or replaced. | | `budget.deleted` | A budget was removed. | | `invite.created` | An owner invited an address. `details` holds `role`. | | `invite.revoked` | An owner revoked an open invite. | | `member.updated` | A person's role changed. `details` holds the new `role` and the `previous_role`. | | `member.removed` | A person was removed, or left. | | `access.approved` | Meadow's operators approved beta access for the account's first owner: the account was created, or its expired owner invite was renewed. `actor.type` is `system`. `details` holds `email`, `invite_id`, `invite_expires_at` and `renewed`. | | `access.revoked` | Meadow's operators revoked a person's beta access: their open invite to this account was revoked, their membership removed, or both. `actor.type` is `system`. `details` holds `email`, `invite_revoked` and `membership_removed`. | | `member.joined` | A person accepted an invite. The resource is the invite id, the actor is the person's session, and `details` holds `role`. | | `sandbox.stopped_at_limit` | Meadow deleted a running sandbox because a key with `limit_action` `stop_sandboxes` spent its `limit`. |
- `effective_at` (datetime, required) — When the change was made.
- `actor` (AuditLogActor, required) — Who made the change.
- `project_id` (string, required, nullable) — The project the change is about. Null for a change to the account
- `resource_id` (string, required, nullable) — The id of what changed: a key id, a project id, a provider name, a budget id or a sandbox id.
- `request_id` (string, required, nullable) — The `x-request-id` of the request that made the change. Null when `actor.type` is `system`.
- `details` (AuditLogDetails, required) — What the request set. It never holds a secret or an address.

### ErrorError

- `type` (enum, required) — The class of the failure. - `invalid_request`: the request is malformed or breaks a rule (400), or is too large (413). - `conflict`: the request is valid and the current state refuses it (409). Before 2026-11-24 a 409 used `invalid_request`. - `unauthorized`: the key is missing, unknown, revoked, or expired (401). - `forbidden`: the key's scope or limit does not allow this, or the project's routing is locked (403). - `not_found`: no such resource or route (404). - `no_provider_key`: no stored credential can serve this request (422). - `all_providers_failed`: every vendor in the route was tried (502). - `provider_error`: a vendor failed and no fallback was possible (502). - `rate_limited`: too many requests (429). - `insufficient_quota`: a dollar `limit` on the key, or on a key above it, is spent (402). The name is OpenAI's. - `unavailable`: a dependency Meadow needs is not set up (503). - `internal`: Meadow failed (500), or the feature is not set up (501).
  - Allowed values: `invalid_request`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `no_provider_key`, `all_providers_failed`, `provider_error`, `rate_limited`, `insufficient_quota`, `unavailable`, `internal`
- `message` (string, required) — A sentence for people. It can change, so do not match on it.
- `code` (string, optional) — A stable name for the specific failure. Every Meadow error carries one. `type` stays the general class, and several codes share a type. Branch on `code` when you need to tell two failures of one type apart, for example `api_key_expired` from `api_key_revoked`. The full list is in the Errors guide. A new code can be added at any time, so treat a code you do not know as its `type`. A spent limit (`key_request_limit_exceeded`, `key_token_limit_exceeded`) stays a 403 and not a 429, so a client that retries a 429 does not resend a call a spent key can never make. A spent dollar `limit` (`key_spend_limit_exceeded`) is a 402 for the same reason.
- `param` (string, optional) — The request field, query parameter or header the error is about, when there is one. A nested field is written with dots, such as `credentials.api_key`. Set on most validation errors (400).
- `attempts` (list of Attempt, optional) — The vendors Meadow tried for this request, in order. Present only when it tried at least one.
- `retry` (enum, optional) — Whether to send the same request again. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `safe`: send the same request again, after `retry-after` seconds when the response has that header. A 429, a 409 `exec_start_in_progress` or `idempotency_request_in_progress`, a 502 `sandbox_unreachable`, and a 5xx on a `GET`, `PUT` or `DELETE`, on `POST /v1/sandboxes/route`, or on a sandbox create or background command start sent with `Idempotency-Key`. - `after_fix`: change the request, the key or the account first. Any other 4xx. - `check_outcome`: read the sandbox or the command before you send it again, because the work may have happened. A 5xx on any other `POST`, which includes a blocking command. - `never`: do not send it again. A 501. When the response has `x-should-retry`, `retry` is `safe` exactly when the header is `true`.
  - Allowed values: `safe`, `after_fix`, `check_outcome`, `never`
- `outcome` (enum, optional) — What happened to the work. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `not_started`: nothing was changed. Every 4xx, a 501, and a 502 `sandbox_unreachable`. - `unknown`: the work may have happened. Any other 5xx. - `completed` and `partial`: the work happened, in whole or in part. Meadow does not send them today. Handle them as `unknown`. A sandbox create that fails after Meadow accepted it is not an error response: the create returns 202, and the sandbox later has `status` `failed` and a `failure_reason`.
  - Allowed values: `not_started`, `completed`, `partial`, `unknown`

### AuditLogActor

Who made the change.

- `type` (enum, required) — `api_key` for a change made with an API key. `session` for one a signed-in person made in the dashboard. `system` for one Meadow made by itself, such as stopping a sandbox at a spent limit.
  - Allowed values: `api_key`, `session`, `system`
- `session` (AuditLogSessionActor, optional) — The signed-in person who made the change. Present only when `type` is `session`.
- `api_key` (AuditLogActorApiKey, optional) — The key that made the request. Absent when `type` is `system`.

### AuditLogDetails

What the request set. It never holds a secret or an address.

- `fields` (list of string, optional) — The names of the fields the request sent.
- `values` (map from string to any, optional) — The new values of the fields that are safe to show. A field that is named in `fields` and absent here is withheld.

### Attempt

One try at one vendor, for a model call or a sandbox create.

- `provider` (enum, required) — The name of a vendor. Model providers and sandbox providers share one list. Model providers: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`. Sandbox providers: `daytona`, `modal`.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `outcome` (enum, required) — How the try ended. - `served`: this vendor served the request. - `unsupported`: the vendor cannot do what was asked, such as a resource size, a network rule, or a model it does not offer. - `refused`: the vendor rejected the request or the stored credential. - `no_capacity`: the vendor had no capacity. - `timeout`: the vendor did not answer in time. - `rate_limited`: the vendor answered 429. - `error`: any other failure.
  - Allowed values: `served`, `unsupported`, `refused`, `no_capacity`, `timeout`, `rate_limited`, `error`
- `reason` (enum, optional) — A stable code for why the try ended as it did. It is narrower than `outcome`, and it is the code to branch on or to count. More values can be added: treat one you do not know like `vendor_error`. - `served`: this vendor served the request. - `no_capacity`: the vendor had no capacity. - `quota_exceeded`: the vendor account is out of quota or credit. - `rate_limited`: the vendor answered 429. - `timeout`: the vendor did not answer in time. - `auth_failed`: the vendor rejected the stored vendor key. - `invalid_request`: the vendor rejected the request itself. - `refused`: the vendor refused for another reason. - `unsupported`: the vendor cannot do what was asked, such as a model, a GPU type, a size or a network rule. - `no_provider_key`: skipped, because no usable vendor key was stored. - `image_pull_failed`, `build_failed`: the vendor could not pull or build the image (sandboxes). - `provider_lost`: the vendor lost the sandbox while it was starting. - `vendor_error`: any other failure.
  - Allowed values: `served`, `no_capacity`, `quota_exceeded`, `rate_limited`, `timeout`, `auth_failed`, `invalid_request`, `refused`, `unsupported`, `no_provider_key`, `image_pull_failed`, `build_failed`, `provider_lost`, `vendor_error`
- `started_at` (datetime, optional) — When Meadow started this try. Absent on attempts recorded before 2026-11-24.
- `finished_at` (datetime, optional) — When this try ended.
- `detail` (string, optional) — A short description of what happened, written by Meadow, such as `provider returned HTTP 404`. On a `served` sandbox attempt it reports resources the vendor granted that differ from the request, such as `provider granted cpu 2 instead of 1.5` or `gpu type H200 instead of H100`. It says `provider built a copy of the image for this size` when this create made a new Daytona snapshot for an `image_id`. On an `unsupported` attempt it carries the vendor's size limit, such as `daytona cannot serve this size: CPU request 8 exceeds maximum allowed per sandbox (4)`. Absent when there is nothing to say.
- `duration_ms` (integer, optional) — How long the try took, in milliseconds.

### AuditLogSessionActor

The signed-in person who made the change. Present only when `type` is `session`.

- `user` (AuditLogSessionActorUser, required)

### AuditLogActorApiKey

The key that made the request. Absent when `type` is `system`.

- `id` (string, required) — The key id. Never the secret.

### AuditLogSessionActorUser

- `id` (string, required) — The person's user id.
- `email` (string, required) — The email the person was signed in with when they made the change.

## Examples

**Response**

```json
{
  "object": "list",
  "data": [
    {
      "id": "aud_0000d3bf",
      "object": "audit_log",
      "type": "api_key.updated",
      "effective_at": "2026-11-28T09:15:00Z",
      "actor": {
        "type": "api_key",
        "api_key": {
          "id": "key_0000b694"
        }
      },
      "project_id": "prj_000013",
      "resource_id": "key_0000d5ee",
      "request_id": "req_000000000000000000005fda",
      "details": {
        "fields": [
          "limit"
        ],
        "values": {
          "limit": 50
        }
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

**SDK Code**

```python A limit raised on a key
import requests

url = "https://api.example.com/v1/audit-logs"

querystring = {"limit":"50","type":"api_key.updated"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript A limit raised on a key
const url = 'https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A limit raised on a key
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A limit raised on a key
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java A limit raised on a key
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php A limit raised on a key
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp A limit raised on a key
using RestSharp;

var client = new RestClient("https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift A limit raised on a key
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/audit-logs?limit=50&type=api_key.updated")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```