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/events

Send 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

FIELDTYPEWHAT IT IS
ktextYour own unique key for this row. Sent again, the row is not stored twice
e.typetextWhat happened: signup.created, payment.paid, payment.refunded, usage.daily, doc.read and a few the sender sends itself
e.event_idtext or nullYour id for the event. Up to 80 letters, digits and _ . : -
e.tsnumberWhen it happened, in milliseconds since 1970 (UTC)
e.modetest or liveTest rows never count as real money
e.account_reftext or nullYour id for the customer account, so later rows join up
e.code_idtext or nullLeave it null unless your sender was told otherwise
e.dataobjectThe 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

ANSWERERRORWHAT TO DO
200noneEvery row was taken. stored are new, already were sent before, held are kept but not shown yet
422rows_refusedThe good rows ARE stored. rows names refused ones: i (place in the batch), event_id, why. Fix those and send only them
400bad_json · bad_envelopeNothing stored. The body is not the JSON shape above
401bad_keyNothing stored. The key is wrong, revoked or not a connection key
413too_many_rows · body_too_largeNothing stored. Split into batches of 100 rows or 64 KB
429too_many_refusedMore than 120 refused or empty batches this hour. Wait for Retry-After
503store_unavailableTry again after Retry-After. Rows sent twice are stored once

Other addresses

ADDRESSBODYWHAT IT DOES
/ingest/v1/pingstatusSays the sender is alive. Writes no row
/ingest/v1/daysdaysSends your row count per day. The answer lists the days that differ
/ingest/v1/forgetaccount_refsDeletes every row of up to 100 accounts, for good
/ingest/v1/verifyattemptChecks the key works. Writes nothing. node aim.mjs verify uses it
/ingest/v1/revokenoneThe key revokes itself, and nothing else. Used by uninstall

All of them are POST with the same connection key.

Last changed 1 December 2026