Docs / Reference
Sending rows (API)
The sender installed by the CLI already does this for you, once an hour. Read on if you want to send rows from your own code instead.
The address
POST https://app.csuite.is/ingest/v1/eventsSend your connection key as a bearer token: Authorization: Bearer aik_<company>_<32 characters>.
What to send
One JSON object with up to 100 rows and at most 64 KB. Each row has its own key k, so sending the same batch twice stores it once.
Example request
curl https://app.csuite.is/ingest/v1/events \
-H "Authorization: Bearer $AIM_PLATFORM_KEY" \
-H "Content-Type: application/json" \
-d '{
"v": 1,
"kit": { "name": "my-sender", "version": "1.0.0" },
"rows": [{
"k": "8c1f0e2a9b7d4c36a1e5f0b2d9c8e7a6",
"e": {
"v": 1, "event_id": "ev_1042", "ts": 1796025600000,
"type": "signup.created", "mode": "test",
"account_ref": "acct_77", "code_id": null,
"data": {}
}
}]
}'The fields of a row
| FIELD | TYPE | WHAT IT IS |
|---|---|---|
k | text | Your own unique key for this row. Sent again, the row is not stored twice |
e.type | text | What happened: signup.created, payment.paid, payment.refunded, usage.daily, doc.read and a few the sender sends itself |
e.event_id | text or null | Your id for the event. Up to 80 letters, digits and _ . : - |
e.ts | number | When it happened, in milliseconds since 1970 (UTC) |
e.mode | test or live | Test rows never count as real money |
e.account_ref | text or null | Your id for the customer account, so later rows join up |
e.code_id | text or null | Leave it null unless your sender was told otherwise |
e.data | object | The details. A payment.paid row needs data.amount in cents and data.payment_key or data.object_id |
Every row must stay under 2 KB. data.page must not hold an e-mail address, a ? or a #: rows that do are refused.
What comes back
| ANSWER | ERROR | WHAT TO DO |
|---|---|---|
| 200 | none | Every row was taken. stored are new, already were sent before, held are kept but not shown yet |
| 422 | rows_refused | The good rows ARE stored. rows names refused ones: i (place in the batch), event_id, why. Fix those and send only them |
| 400 | bad_json · bad_envelope | Nothing stored. The body is not the JSON shape above |
| 401 | bad_key | Nothing stored. The key is wrong, revoked or not a connection key |
| 413 | too_many_rows · body_too_large | Nothing stored. Split into batches of 100 rows or 64 KB |
| 429 | too_many_refused | More than 120 refused or empty batches this hour. Wait for Retry-After |
| 503 | store_unavailable | Try again after Retry-After. Rows sent twice are stored once |
Other addresses
| ADDRESS | BODY | WHAT IT DOES |
|---|---|---|
/ingest/v1/ping | status | Says the sender is alive. Writes no row |
/ingest/v1/days | days | Sends your row count per day. The answer lists the days that differ |
/ingest/v1/forget | account_refs | Deletes every row of up to 100 accounts, for good |
/ingest/v1/verify | attempt | Checks the key works. Writes nothing. node aim.mjs verify uses it |
/ingest/v1/revoke | none | The key revokes itself, and nothing else. Used by uninstall |
All of them are POST with the same connection key.
Last changed 1 December 2026