Actions And Identityactions.checkIn

actions.checkIn

Reports a finished activity to the Action or Room your app was opened from.

Posts a check-in to the Action's Room, with an optional score, summary and proof data. This is how a mini app completes the habit it belongs to.

PropertyValue
Scopeactions.checkin
Who can use itAny developer
StatusAvailable

Parameters

NameTypeRequiredDescription
actionIdstringNoUp to 128 characters. Usually taken from context.get.
roomIdstringNoUp to 128 characters. Defaults to the Room the app was opened from.
titlestringNoUp to 120 characters. Defaults to the Action's title, then the app's name.
scorenumberNoA whole number from 0 to 1,000,000. Other values are rounded and clamped.
summarystringNoUp to 280 characters.
proofDataobjectNoA plain object of your own fields. Arrays are ignored.

Result

FieldTypeDescription
okbooleantrue when the check-in was posted, or when there was no Room to post to.
messageIdstringThe Room message, when one was posted.
roomIdstringThe Room it went to.
scorenumber or nullThe score you sent.
summarystring or nullThe summary you sent.
errorstringPresent only with ok: false.

Errors

CodeWhen
4001The person said no, now or earlier.
4200The phone cannot offer it, the scope is gated, or the app has no live listing.
4290More than 30 requests in 10 seconds.

See Error Codes for every code and how they reach your page.

Example

js
const ctx = await window.aksa.request({ method: "context.get" });
const r = await window.aksa.request({
  method: "actions.checkIn",
  params: { actionId: ctx.actionId, score: 12, summary: "Finished the daily puzzle" },
});
if (!r.ok) toast("Could not check in");

With AksaMini

If your page embeds aksa-mini.js, use its wrapper:

js
await AksaMini.checkIn({ actionId: ctx.actionId, score: 12, summary: "Finished the daily puzzle" });

Notes

  • Declare the actions.checkin scope in your manifest. It is a basic scope, so any developer can use it.
  • The host posts a completion message to the Room. Keep summary short and meaningful to the people reading it.
  • Outside a Room, with no roomId, the call returns ok: true without posting anything.

Used By

Ready To Build Or Ship?

Check your files, preview on an iPhone frame, and submit in the Developer Studio.