Keys
List this account's API keys (never returns token material)
/v1/keysResponses
keysobject[](required)
Example
curl -X GET https://api.cofferline.com/v1/keys \ -H "authorization: Bearer $TOKEN"
Create an API key (raw token returned exactly once)
/v1/keysOptionally pinned to a subset of wallets (#154): a wallet-scoped key reaches only classified wallet-bearing surfaces, only for its own wallets, deny-by-default. Requesting the supervisor scope mints the fleet-discipline credential (read + revocations/cancels/panic, nothing that opens exposure).
Request body
namestringscopes"read" | "write" | "admin" | "supervisor"[]expires_in_daysintegerallowed_ipsstring[]walletsstring[]
Responses
idstring(required)tokenstring(required)namestring,null(required)scopes"read" | "write" | "admin" | "supervisor"[](required)created_atobject(required)expires_atobject(required)allowed_ipsarray,null(required)walletsarray,null(required)
Example
curl -X POST https://api.cofferline.com/v1/keys \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{}'
Enroll a fleet: mint one wallet-scoped API key per agent wallet, atomically
/v1/keys/enrollOne call, one key per agent wallet, each pinned to exactly its own wallet (deny-by-default enforcement). All keys are minted in a single transaction — a fleet is enrolled entirely or not at all. Tokens are returned exactly once.
Request body
agentsobject[](required)
Responses
keysobject[](required)
Example
curl -X POST https://api.cofferline.com/v1/keys/enroll \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{"agents":[{"wallet":"…"}]}'
Rotate API keys in batch: identical grants, fresh tokens, atomic
/v1/keys/rotateReplaces each named key with a new one whose scopes/wallets/IP pins are copied server-side (rotation never widens), then retires the old credential — immediately, or after overlap_seconds (never past its own prior expiry). All-or-nothing: any invalid id fails the whole batch with no changes. Tokens are returned exactly once.
Request body
key_idsstring[](required)overlap_secondsinteger
Responses
rotatedobject[](required)
Example
curl -X POST https://api.cofferline.com/v1/keys/rotate \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{"key_ids":["…"]}'
Revoke an API key
/v1/keys/{id}Parameters
idin path,string(required)
Responses
idstring(required)revokedtrue(required)
Example
curl -X DELETE https://api.cofferline.com/v1/keys/{id} \
-H "authorization: Bearer $TOKEN"