Every live AgentKit endpoint in one place. Find a resource, inspect its exact path and request fields, then copy a complete response shape into your integration tests.
37 live handlersJSON over HTTPSidempotency-aware
base urlhttps://agentkit-2.polsia.app
Common contract. Authenticated endpoints accept X-API-Key or the Authorization: Bearer <key> fallback described in authentication.
API errors include code, message, and request_id; see Errors & rate limits. API responses also expose X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset; throttled responses add Retry-After.
Wallets 21 endpoints
Provision, inspect, constrain, fund, reserve, transact, transfer, and settle wallet balances. The legacy /api/wallets routes remain live alongside the /api/v1 surfaces.
POST/api/walletsNo auth201 Created
Create a wallet
Creates one wallet for an agent, applies the optional provider allowlist, and returns the new API key exactly once.
request parameters
Location
Field
Type
Required / default
Notes
body
agent_id
string
required
Unique agent identifier.
body
spending_limit_cents
number
optional; default 0
Wallet-wide spending limit in cents.
body
initial_balance_cents
number
optional; default 0
Must be non-negative.
body
currency
string
optional; default "USD"
Uppercase three-letter wallet currency, persisted on the wallet.
Updates one or both limits on the authenticated wallet and returns the updated wallet row. settlement_limit_cents must be a strictly positive safe integer, or null to disable the settlement ceiling.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
API key for the wallet that owns this resource.
body
spending_limit_cents
number
optional
New wallet-wide spending limit in cents.
body
settlement_limit_cents
integer | null
optional
Strictly positive safe integer in cents, or null to remove the settlement limit.
{
"api_key": "ak_live_fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"warning": "Store api_key — it is shown once and cannot be retrieved"
}
The new api_key is a one-time secret. Store it before replacing the old key in your caller.
POST/api/wallets/:id/creditAPI key200 OK
Credit a wallet
Adds a positive amount to the authenticated wallet. The numeric id must match the wallet owned by the key.
Soft-deleted wallets are always omitted. The next_cursor is opaque; pass it back exactly as returned. Results use stable newest-first keyset ordering by created_at and id, and limit echoes the requested page size.
GET/api/v1/wallets/:id/balanceAPI key · wallet-scoped200 OK
Read wallet balance
Returns the current wallet balance snapshot without loading transaction history. The numeric wallet ID must belong to the API key; missing and non-owned IDs return the same 404 wallet_not_found response.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Must own the wallet ID in the path.
path
id
integer
required
Positive numeric wallet ID owned by the API key.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/wallets/12/balance \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Absent, malformed, and non-owned wallet IDs all return 404 with { error: "wallet_not_found" }.
GET/api/v1/wallets/:id/transactions/exportAPI key · wallet-scoped200 OK
Export wallet transactions as CSV
Downloads the authenticated wallet's transactions as a CSV attachment. Optional transaction_status, transaction_period, transaction_reference, transaction_min_amount, and transaction_max_amount query parameters apply the wallet history filters. Optional transaction_sort accepts "newest" or "oldest" and defaults to "newest"; omitting the filters exports all wallet transactions in the selected order. The numeric wallet ID must belong to the API key; malformed, missing, and non-owned IDs return the same 404 wallet_not_found response.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Must own the wallet ID in the path.
path
id
integer
required
Positive numeric wallet ID owned by the API key.
query
transaction_sort
"newest" | "oldest"
optional
Sorts by transaction date; defaults to "newest".
query
transaction_status
string
optional
Exact transaction status filter.
query
transaction_period
"all" | "30d"
optional
Restricts results to the inclusive last 30 days when set to "30d".
query
transaction_reference
string
optional
Case-insensitive literal substring match on merchant_ref.
query
transaction_min_amount
decimal amount
optional
Inclusive minimum absolute transaction amount in dollars, with up to two decimal places.
query
transaction_max_amount
decimal amount
optional
Inclusive maximum absolute transaction amount in dollars, with up to two decimal places.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/wallets/12/transactions/export?transaction_sort=oldest&transaction_status=approved&transaction_period=30d&transaction_reference=order-&transaction_min_amount=1.00&transaction_max_amount=25.00 \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
The response body is raw CSV, not JSON. Columns always appear in the order id, wallet_id, provider, amount_cents, status, blocked_reason, idempotency_key, memo, merchant_ref, created_at. Null values are empty fields, timestamps are ISO-8601 UTC, and an empty result still returns the header row plus a trailing newline. Invalid filter values return 400; malformed, missing, and non-owned wallet IDs return 404 wallet_not_found.
GET/api/v1/wallets/:agentId/ledgerAPI key · path-scoped200 OK
Read the wallet ledger
Returns a cursor-paginated ledger view with provider/type and ISO-8601 date filters.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Must be scoped to the agentId in the path.
path
agentId
string
required
Agent identifier owned by the API key.
query
cursor
string
optional
Opaque ledger cursor.
query
limit
integer
optional; capped at 50
Page size; the response reports the capped limit.
query
type
string
optional
Provider/type filter.
query
from
string
optional
ISO-8601 lower date bound.
query
to
string
optional
ISO-8601 upper date bound.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/wallets/my-agent-001/ledger?limit=50&type=openai&from=2026-08-01T00:00:00.000Z \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
POST/api/v1/wallets/:agentId/transactionsAPI key · path-scoped201 Created
Post a wallet transaction
Atomically debits available balance and appends one approved transaction. Reusing an idempotency key replays the original transaction without a second debit.
A retry with txn-2026-001 returns replay: true and leaves the wallet balance unchanged.
POST/api/v1/wallets/:agentId/fundAPI key · path-scoped201 Created
Create a Stripe funding intent
Creates a 24-hour funding intent and returns the configured Stripe payment URL. The amount must also match the configured Stripe denomination when STRIPE_TOPUP_AMOUNT_CENTS is set.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Must be scoped to the agentId in the path.
path
agentId
string
required
Agent identifier owned by the API key.
body
amount_cents
integer
required; positive
USD amount to fund.
body
currency
"USD"
optional; default "USD"
Only USD is supported; configured Stripe denomination rules also apply.
A completed intent can be claimed again as status already_completed. If Stripe verification is not ready, the endpoint returns 402 payment_not_verified; retry shortly. The credit is idempotent and cannot double-post.
POST/api/v1/wallets/:agentId/reservationsAPI key · path-scoped201 Created
Create a fund reservation
Moves amount_cents from available into reserved for a bounded TTL. Reservations are limited to 100000000 cents and are safe to retry with an idempotency key.
POST/api/v1/wallets/:agentId/reservations/:reservationId/commitAPI key200 OK
Commit a reservation
Finalizes an active hold, debits both current and reserved balance, and writes a reservation_commit transaction. Repeating the call replays the same transaction.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Must own the agentId and reservation in the path.
path
agentId
string
required
Agent identifier owned by the API key.
path
reservationId
integer
required; positive
Reservation ID.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X POST https://agentkit-2.polsia.app/api/v1/wallets/my-agent-001/reservations/71/commit \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Atomically moves available funds between two active wallets in the same currency and writes linked settlement_debit and settlement_credit ledger rows. The API key must own from_wallet_id; the destination may belong to another agent.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
The key must own from_wallet_id; the destination wallet may belong to another agent.
body
from_wallet_id
integer
required
Source wallet ID.
body
to_wallet_id
integer
required
Destination wallet ID; must differ from the source.
body
amount_cents
integer
required; positive; max 100000000
Amount to settle from available source funds.
body
currency
string
optional; default "USD"
Uppercase three-letter currency matching both wallets.
header
Idempotency-Key
string
optional
Optional; max 255 characters. Reuse the same value for retries.
Malformed requests, self-settlement, and amounts above the source wallet’s settlement_limit_cents return 400. A limit violation uses settlement_limit_exceeded and includes amount_cents plus settlement_limit_cents. Source ownership and insufficient available funds return 403; missing wallets return 404; inactive wallets and idempotency conflicts return 409; currency mismatches return 422; unexpected atomic failures return settlement_failed with 500. Idempotency-Key is scoped to the authenticated source wallet: identical retries replay the persisted response, while changed parameters return idempotency_conflict without creating ledger rows.
The source wallet’s balances and settlement ledger remain unchanged.
Agent identities 4 endpoints
Create and retrieve one owner-scoped identity record for the authenticated wallet, including its current reputation summary, wallet activity counts, and payment-derived reputation history.
POST/api/v1/agent-identitiesAPI key201 Created
Create an agent identity
Creates the one identity allowed for the wallet represented by the API key. agent_id comes from the authenticated key and cannot be supplied by the request.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Required. The identity is owned by the wallet associated with this key.
body
name
string
required; max 255
Non-empty display name.
body
description
string | null
optional; max 2000
Optional description.
body
capabilities
string[]
optional; default []
At most 50 non-empty strings; each is limited to 255 characters.
The first identity for a wallet is created with reputation.score 0, reputation.review_count 0, reputation.completed_activity_count 0, and reputation.failure_count 0. The activity counters are wallet transaction aggregates: approved transactions count as completed activity and blocked transactions count as failures; both are zero when no activity exists.
response variant400 Bad Request
{
"error": "name is required"
}
Returned when name, description, capabilities, or metadata fails validation.
response variant409 Conflict
{
"error": "identity_already_exists"
}
Returned when the authenticated wallet already owns an identity.
GET/api/v1/agent-identitiesAPI key200 OK
List agent identities
Returns the identities owned by the wallet represented by the authenticated API key. The owner identity is never taken from the query string, and inaccessible identities or identities on deleted wallets are omitted.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Required. Ownership comes from the authenticated API key.
query
limit
integer
optional; default 20; max 100
Number of identities to return.
query
cursor
string
optional
Opaque keyset cursor returned as next_cursor.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/agent-identities?limit=2 \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Identities are ordered newest first by created_at, then by id DESC. Pass the opaque next_cursor value to continue without duplicates. Each item uses the same resource fields already exposed by the individual endpoint, including status, kyc_status, and the numeric reputation summary under reputation.
response variant400 Bad Request
{
"error": "invalid_limit"
}
Returned when limit is not an integer from 1 through 100.
response variant400 Bad Request
{
"error": "invalid_cursor"
}
Returned when cursor is malformed or belongs to another cursor namespace.
response variant400 Bad Request
{
"error": "invalid_query"
}
Returned when agent_id is supplied; the owner is always taken from the authenticated API key.
GET/api/v1/agent-identities/:idAPI key200 OK
Get an agent identity
Returns the identity only when :id belongs to the wallet represented by the API key, with the current reputation summary nested under reputation. completed_activity_count counts approved wallet transactions and failure_count counts blocked wallet transactions; both are zero when no activity exists.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Required. Ownership is checked in the identity lookup.
path
id
positive safe integer
required
Identity record ID.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/agent-identities/91 \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Malformed, missing, and non-owned IDs intentionally share the same error response and reveal no identity or reputation fields.
GET/api/v1/agent-identities/:id/reputation/historyAPI key200 OK
Get reputation history
Returns newest-first reputation events derived from completed wallet payment activity. Each approved transaction contributes one payment_completed event with a score impact of 1; split-payment rows use their parent payment reference when present.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Required. The API key must own the identity.
path
id
positive safe integer
required
Identity record ID.
query
limit
integer
optional; default 20; max 100
Number of events to return.
query
cursor
string
optional
Opaque keyset cursor returned as next_cursor.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/agent-identities/91/reputation/history?limit=2 \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Events are ordered by created_at DESC, then transaction ID DESC. Use next_cursor to continue without duplicates. payment_reference is the parent payment reference for split payments, or the source transaction/payment reference for direct wallet payment rows. The stored reputation summary is not changed by this read.
response variant400 Bad Request
{
"error": "invalid_limit"
}
Returned when limit is not an integer from 1 through 100.
response variant400 Bad Request
{
"error": "invalid_cursor"
}
Returned when cursor is not a valid reputation history keyset cursor.
response variant404 Not Found
{
"error": "identity_not_found"
}
Malformed, missing, and non-owned IDs intentionally share the same response, so inaccessible identities reveal no event data.
Webhooks 6 endpoints
Manage webhook registrations and delivery attempts here. The receive-side payload envelope, HMAC verification, and retry schedule are documented in the Webhooks guide.
POST/api/v1/webhooksAPI key201 Created
Register a webhook
Registers an HTTPS endpoint, or an http://localhost endpoint for development, for one or more supported events.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
API key for the wallet that owns this resource.
body
url
string
required
Valid HTTPS URL, or http://localhost / http://127.0.0.1 for development.
Enumerate the public provider catalog without a key or submit an authenticated listing request. Both endpoints use the same canonical catalog categories as /providers.
GET/api/v1/providersNo auth200 OK
List providers
Returns catalog entries with keyset pagination, category filtering, and case-insensitive name/description search.
request parameters
Location
Field
Type
Required / default
Notes
query
limit
integer
optional; default 20
Must be between 1 and 100.
query
cursor
string
optional
Opaque provider cursor from next_cursor.
query
category
string
optional
One of the CATEGORIES IDs: wallets, payments, split-routing, webhooks, sandbox.
query
q
string
optional
Case-insensitive substring search across provider name and description.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/v1/providers?limit=20&category=wallets&q=wallet
response200 OK
{
"providers": [
{
"id": "wallet-crud",
"name": "Wallet Lifecycle",
"category": "wallets",
"category_label": "Wallets",
"description": "Create, fetch, and update per-agent wallets with X-API-Key auth.",
"capabilities": [
"Create a wallet with an agent_id, spending cap, and initial balance",
"Fetch the current wallet state with an X-API-Key",
"PATCH the spending_limit_cents at any time",
"Rotate the API key scoped to the wallet"
],
"pricing": {
"model": "free",
"note": "No transaction fee — wallet administration only."
},
"auth": {
"type": "api_key",
"header": "X-API-Key",
"scopes": [
"wallet:read",
"wallet:write"
]
}
}
],
"next_cursor": null,
"limit": 20
}
The catalog is public and in memory, so this call is useful for discovery before an agent has a wallet key.
POST/api/v1/providers/submissionsAPI key201 Created
Submit a provider
Creates an authenticated provider listing request for later review. The provider is not published automatically.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
Required. The authenticated wallet is recorded as the submitter; use X-API-Key or Authorization: Bearer.
body
provider_name
string
required; max 255
Human-readable provider name.
body
category
string
required
One of: wallets, payments, split-routing, webhooks, sandbox.
body
description
string
required; max 5000
Provider overview shown to reviewers.
body
capabilities
string[]
required; non-empty; max 50
Non-empty capability descriptions; each is limited to 255 characters.
body
pricing_model
string
required
One of: free, per_transaction, passthrough.
body
authentication_requirements
string
required; max 2000
Keys, headers, scopes, or no-auth requirements.
request example
curl -X POST https://agentkit-2.polsia.app/api/v1/providers/submissions \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" \
-H "Content-Type: application/json" \
-d '{
"provider_name": "Example Inference API",
"category": "payments",
"description": "A provider for metered inference requests.",
"capabilities": [
"Metered inference calls",
"Usage reporting"
],
"pricing_model": "per_transaction",
"authentication_requirements": "Bearer API key in the Authorization header."
}'
response201 Created
{
"submission": {
"id": 901,
"wallet_id": 12,
"provider_name": "Example Inference API",
"category": "payments",
"description": "A provider for metered inference requests.",
"capabilities": [
"Metered inference calls",
"Usage reporting"
],
"pricing_model": "per_transaction",
"authentication_requirements": "Bearer API key in the Authorization header.",
"status": "pending_review",
"created_at": "2026-09-02T12:00:00.000Z",
"updated_at": "2026-09-02T12:00:00.000Z"
},
"status": "pending_review"
}
The API key is used for authentication only and is never persisted with the submission.
response variant400 Bad Request
{
"error": "category must be one of: wallets, payments, split-routing, webhooks, sandbox"
}
Returned when required fields, capabilities, category, or pricing_model fail validation.
response variant401 Unauthorized
{
"error": "Missing X-API-Key header"
}
Returned before submission validation or insertion when the API key is missing or invalid.
Payments 6 endpoints
Charge, split, and exercise the payment surfaces. Sandbox calls are deterministic mock operations; the Stripe callback is authenticated with Stripe-Signature rather than an API key.
POST/api/payAPI key201 Created
Authorize and charge
Runs the wallet policy engine, appends a transaction row, and deducts the balance when approved.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
API key for the wallet that owns this resource.
body
provider
string
required
Provider to charge.
body
amount_cents
number
required; positive
Charge amount in cents.
body
idempotency_key
string
optional
Stored on the transaction for caller-side retry correlation.
The blocked reason is one of per_day_max_exceeded, provider_not_allowed, per_merchant_max_exceeded, per_call_max_exceeded, daily_limit_exceeded, spending_limit_exceeded, or insufficient_balance.
GET/api/transactionsAPI key200 OK
List transactions
Lists the authenticated wallet’s transaction rows with optional provider/status filters and offset pagination.
request parameters
Location
Field
Type
Required / default
Notes
header
X-API-Key
string
required
API key for the wallet that owns this resource.
query
provider
string
optional
Exact provider filter.
query
status
string
optional
Transaction status filter, such as approved or blocked.
query
limit
integer
optional; default 50; capped at 100
Number of rows.
query
offset
integer
optional; default 0
Offset into the result set.
body
none
—
not accepted
This endpoint does not accept a request body.
request example
curl -X GET https://agentkit-2.polsia.app/api/transactions?provider=openai&status=approved&limit=50&offset=0 \
-H "X-API-Key: ak_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
401 invalid_signature or timestamp_too_old; 400 invalid_json; 503 webhook_not_configured when STRIPE_WEBHOOK_SECRET is absent. server.js mounts express.raw() before express.json(), so signature verification receives the original bytes.
response variant200 Acknowledged
{
"received": true
}
Ignored event, missing payment object or metadata, unknown intent, and non-pending intent are acknowledged without a wallet_id. A completed intent returns { received: true, status: "already_completed" }.