List a treasury's changes

GET/treasuries/{treasury_id}/changes

Return one treasury's append-only history as a list, {object, data, has_more, url}, newest first by changed_at.

  • It is a page, not a bare array, so the one collection on the surface most likely to grow without bound is paged like every other.

  • The filter is named.

    action narrows the history to one kind of change, and each page lists under the filter its own request sends, so a later page sends it again beside starting_after or ending_before. session_id is reported rather than filtered on: narrowing a treasury's history by who changed it is a question about sessions rather than about treasuries. Any other query parameter answers 400 parameter_unknown naming it, and a value outside its schema, a bad limit or a starting_after or ending_before naming no object of this list answers 422 parameter_invalid naming it.

Show 3 more details
  • A treasury belonging to another environment answers 404 resource_missing, told apart from a treasury that exists and has no history, which answers an empty page. The treasury is resolved inside the scope first, so a caller cannot learn that another environment's identifier exists.

  • A resetting sandbox.

    While a sandbox's reset runs it answers 409 environment_resetting.

  • A secret key reads a treasury's history holding treasury.read.

    It reads in its own environment and sends no X-Stridge-Environment; a key without treasury.read answers 403 permission_denied naming it. Creating or rotating a treasury is a person's act, and no key reaches it.

Parameters

Path

  • treasury_idstring <uuid>required

    The treasury whose history is being read. A value that is not a UUID answers 422 parameter_invalid naming treasury_id.

Query

  • limitinteger <int32>optionaldefault 20

    The page size. A value that is not an integer from 1 to the maximum answers 422 parameter_invalid naming limit; it is never clamped.

  • starting_afterstringoptional

    A cursor: the id of an object of this list, usually the last one of the page just read. The page answered holds the objects that come right after it in the list's order. The object need not match this request's filters; its place in the order is what counts.

    Show full description

    An id that names no object of this list in this environment answers 422 parameter_invalid naming starting_after. It cannot be sent with ending_before.

  • ending_beforestringoptional

    A cursor: the id of an object of this list, usually the first one of the page just read. The page answered holds the objects that come right before it, still in the list's order, and has_more says whether there are more before them.

    Show full description

    An id that names no object of this list in this environment answers 422 parameter_invalid naming ending_before, as does sending it together with starting_after.

  • actionstringoptionalenum created · updated · deleted

    Only the changes of this kind.

Headers

  • X-Stridge-Environmentstring <uuid>optional

    Which environment the request acts inside, on an operation a session and an API key both call. Learn more

    Show full description

    It is required under a person's session, exactly as EnvironmentHeader describes: a session request that omits it answers 400 with environment required, and one naming an environment the caller holds no membership of answers 404.

    An API key names its own environment, so a request made with one omits this header. A key request that sends it answers 400 with environment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.

Responses

The page of changes.

  • objectstringrequiredenum list

    The object's type, always list.

    • idstring <uuid>required

      The change's own identifier.

    • objectstringrequired

      The object's type, always treasury_change.

    • environment_idstring <uuid>required

      The environment the treasury this change belongs to lives in.

    • livemodebooleanrequired

      true when environment_id names a live environment and false in a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from.

    • treasury_idstring <uuid>required

      The treasury the change was made to.

    • actionstringrequiredenum created · updated · deleted

      What happened. A created change carries no before_state and a deleted one carries no after_state, so the pair reads as a transition either way.

    • before_stateobject | nullrequired

      The treasury as it stood before the change, or null for a creation.

      Show full description

      It is a snapshot keyed differently from Treasury: id, tenant_id (the environment's id), name, network_id (the chain's id as a string), destination_address, asset_symbol, provider (the empty string when none) and at, when the treasury was last changed.

    • after_stateobject | nullrequired

      The treasury as it stood after the change, or null for a deletion, in the same snapshot shape as before_state.

    • session_idstring | null <uuid>required

      The sign-in that made the change, or null when Stridge made it rather than a person.

      Show full description

      It is reported and not filterable. Narrowing a treasury's history by who changed it is a question about sessions rather than about treasuries, and this collection is small enough that a client holding the page can answer it without the server growing a filter for it.

    • changed_atstring <date-time>required

      When the change was made. RFC3339 UTC, Z suffixed. The history is ordered on it, newest first, because a history is read from its most recent end.

  • has_morebooleanrequired

    Whether the list holds more objects past this page in the direction it was read: after its last object, or before its first for a page read with ending_before.

  • urlstringrequired

    The path the list is read at.

Errors

The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.

Request
curl "https://api.stridge.com/v2/treasuries/string/changes" \
  -H "Authorization: Bearer $STRIDGE_SECRET_KEY"

Set your secret key as STRIDGE_SECRET_KEY (sent as Authorization: Bearer).

Response200
"object": "list",
"id": "9d3f6a1e-7c25-4b80-9e14-3a6f2d8c0b57",
"object": "treasury_change",
"environment_id": "3f2a6d7e-6b1c-4f2a-9a11-0b53f8d6b2c1",
"livemode": false,
"treasury_id": "5b0e9c4a-2f71-4d3e-8a6b-1c9d0e7f3a25",
"action": "updated",
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant_id": "3f2a6d7e-6b1c-4f2a-9a11-0b53f8d6b2c1",
"name": "treasury_main",
"network_id": "60",
"destination_address": "0x1111111111111111111111111111111111111111",
"asset_symbol": "USDC",
"provider": "",
"at": "2026-01-14T09:31:02.123456Z"
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant_id": "3f2a6d7e-6b1c-4f2a-9a11-0b53f8d6b2c1",
"name": "treasury_main",
"network_id": "60",
"destination_address": "0x2222222222222222222222222222222222222222",
"asset_symbol": "USDC",
"provider": "",
"at": "2026-01-15T10:02:47.654321Z"
},
"session_id": "8f0d7e21-3b5c-4a19-9d24-5e6f7a8b9c0d",
"changed_at": "2026-01-27T16:03:55Z"
}
],
"has_more": false,
"url": "/v2/treasuries/6f1c2b9e-1a7d-4c3e-8b52-9d0e4f7a2c11/changes"
}