Client Activity
Report what your own client did (errors, timings, transactions) and read it back. Unlike the API logs, which only ever see requests that reached this service, these are the events that happen entirely on a device: a crash, a cancelled signature, a screen that failed before any request left it.
level is a floor, not an exact match: level=warn returns warnings and errors.
Requires the activity:read scope.
apiKeyAuthorizationBearer <API key>Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.
take?numberPage size: how many items to return (1 to 100).
1 <= value <= 100100skip?numberHow many items to skip before this page (offset).
0 <= value0source?stringOnly events reported by this client.
"wallet""dashboard""server""sdk"level?stringMinimum severity, not an exact match: warn returns warnings and errors.
"debug""info""warn""error"category?stringOnly events of this category (exact match).
type?stringPrefix match on the event name.
network?stringOnly events reported on this network (exact match).
since?stringOnly events that occurred at or after this instant.
until?stringOnly events that occurred at or before this instant.
OK
The body, query or path failed validation. message is an array of the individual failures.
Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.
no_authenticated_consumer: The gateway forwarded no API key identity
insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.
gateway_required: the request did not arrive through APISIX.
Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/activity/events'{ "data": [ { "id": "clz9xact00001", "source": "wallet", "level": "error", "category": "transaction", "type": "payment.sent", "message": "op_no_trust", "sessionId": "s_9f2a1c", "distinctId": "d_41b0c8", "appVersion": "1.5.0", "platform": "ext", "network": "testnet", "durationMs": 812, "props": { "asset": "XLM", "amount": "12.5" }, "ip": "203.0.113.7", "userAgent": "CosmosWallet/1.5.0", "at": "2026-09-06T12:34:56.000Z", "receivedAt": "2026-09-06T12:35:10.000Z" } ], "total": 4120, "take": 100, "skip": 0}Accepted, not created: the batch is written under the consumer the gateway authenticated, and nothing in the body can change that attribution. Over-long messages are truncated and an over-sized props is replaced with a marker rather than failing the call: losing a whole batch to one malformed field is worst exactly when the client is in a state it did not anticipate.
Requires the activity:write scope. The shared public key may call it.
apiKeyAuthorizationBearer <API key>Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.
application/json- body
A batch of client events to record under the calling consumer.
events*array<>Up to 100 events. Clients batch: a wallet queues while offline and flushes on the next launch.
Accepted
The body, query or path failed validation. message is an array of the individual failures.
Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.
no_authenticated_consumer: The gateway forwarded no API key identity
insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.
gateway_required: the request did not arrive through APISIX.
The budget in x-cosmos-rate-limit is spent for this caller. Honour Retry-After.
The ratelimit-* triple rides along on successful responses too, so a client can pace itself instead of being refused. If the counter store itself is unreachable the guard fails closed and answers 503 provider_unavailable.
Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.
curl -X POST 'https://api.cosmospay.lat/cosmos-api/v1/activity/events' \ -H 'Content-Type: application/json' \ -d '{ "events": [ { "type": "payment.sent" } ]}'{ "accepted": 24, "duplicates": 0}Rolls up the client events this consumer reported over the last days days (default 7, at most 90), optionally for one source: the total, distinct sessions and devices, counts per level, source and category, and the 10 most frequent event types and error messages. series has one entry per UTC day, zero on a quiet one.
Requires the activity:read scope.
apiKeyAuthorizationBearer <API key>Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.
days?numberDays the rollup covers, today included.
1 <= value <= 907source?stringOnly events reported by this client.
"wallet""dashboard""server""sdk"OK
The body, query or path failed validation. message is an array of the individual failures.
Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.
no_authenticated_consumer: The gateway forwarded no API key identity
insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.
gateway_required: the request did not arrive through APISIX.
Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/activity/summary'{ "total": 4120, "sessions": 318, "devices": 96, "levels": [ { "key": "error", "count": 12 } ], "sources": [ { "key": "error", "count": 12 } ], "categories": [ { "key": "error", "count": 12 } ], "topTypes": [ { "key": "error", "count": 12 } ], "topErrors": [ { "key": "error", "count": 12 } ], "series": [ { "date": "2026-09-06", "count": 128, "errors": 4 } ]}