Capture a behavior event
Stores one behavior event for an account. Scoring is not triggered here; the scheduled recompute job remains the sole writer of health and inbox outcomes.
curl -X POST https://staging.useatune.com/api/v1/events \ -H "Authorization: Bearer <YOUR_API_KEY>" \ -H "Content-Type: application/json" \ -d '{ "accountId": "acme", "userId": "user_123", "event": "feature.report.generated", "properties": { "reportType": "activation" } }'Sign in to find your API key in Settings.
Stores one behavior event for an account. Scoring is not triggered here; the scheduled recompute job remains the sole writer of health and inbox outcomes.
bearerAuthAuthorizationBearer <token>Workspace API key from Atune settings or onboarding.
application/json- body
accountId*stringExternal account ID in the customer app.
1 <= lengthuserId?stringOptional external user ID inside the account.
event*stringEvent name, for example feature.report.generated.
1 <= lengthproperties?Behavior metadata. Request bodies should never be sent.
timestamp?stringISO timestamp. Defaults to the ingest time.
date-timemessageId?stringOptional idempotency key, 1-128 printable characters without spaces. The same messageId sent again by the same workspace stores one event, so a retry never makes a duplicate. A malformed messageId is rejected with 400.
^[\x21-\x7e]+$1 <= length <= 128accountStage?stringOptional lifecycle enrichment. Unknown values are ignored. Atune never infers paying; an account that has never been sent a stage is shown as a trial, marked as assumed. past_due means a paying account whose payment is failing. canceled means the customer cancelled; Atune keeps the date. Sending paying or trial again clears either.
"trial""paying""past_due""canceled"trialEndsAt?stringOptional real trial end date.
date-timeaccountPlan?stringOptional plan name in your product, for example Pro. Trimmed; last write wins. Invalid values are ignored.
length <= 100accountSeats?integerOptional number of seats the account pays for. Last write wins. Invalid values are ignored.
1 <= valueaccountMrr?numberOptional monthly amount the account pays, in major units (49.5 = 49.50). 0 is kept. A change is recorded in the account's subscription history; a lower value on a paying account opens a Downgraded action. Invalid values are ignored.
0 <= valueaccountCurrency?stringOptional ISO 4217 code for accountMrr, for example NOK. Invalid values are ignored.
^[A-Za-z]{3}$accountCancelReason?stringOptional, with accountStage canceled. Why the customer cancelled, from this fixed list; any other value is ignored. Never free text.
"price""missing_feature""switched""no_longer_needed""support""other"[key: string]?anyEvent stored.
application/json- response
ok*booleandeduped?booleanTrue when an event with this messageId was already stored; nothing new was written.
account*user*|nullcurl -X POST 'https://useatune.com/api/v1/events' \ -H 'Content-Type: application/json' \ -d '{ "accountId": "acme", "userId": "user_123", "event": "feature.report.generated", "properties": { "reportType": "activation", "source": "dashboard" }, "accountStage": "trial", "trialEndsAt": "2026-08-15T00:00:00.000Z", "accountPlan": "Pro", "accountSeats": 10, "accountMrr": 490, "accountCurrency": "NOK"}'{ "ok": true, "account": { "id": "cm123", "externalId": "acme" }, "user": { "id": "cm456", "externalId": "user_123" }}