Skip to main content
POST
Record Playtime Session

Authorizations

Authorization
string
header
required

Server API Key (format: {keyId}:{secret})

Body

application/json
sessionId
string
required

Client-generated unique session ID

userId
string
required

User ID

durationSeconds
integer
required

Session duration in seconds

Required range: x >= 1
startedAt
string<date-time>
required

Session start time (ISO 8601 UTC format)

  • Format: YYYY-MM-DDTHH:mm:ss.sssZ
  • Example: 2024-01-15T10:30:00.000Z
endedAt
string<date-time>
required

Session end time (ISO 8601 UTC format, must be greater than or equal to startedAt)

  • Format: YYYY-MM-DDTHH:mm:ss.sssZ
  • Example: 2024-01-15T11:00:00.000Z
campaignId
string

Campaign ID (optional). If omitted, automatically attributed to the project's active campaign sponsor

creatorKey
string

Creator key (optional, exactly 5 uppercase alphanumeric characters)

Pattern: ^[A-Z0-9]{5}$
platform
enum<string>

Playtime platform (optional, server defaults to Other)

Available options:
iOS,
Android,
Web,
Roblox,
Other
metadata
object

Arbitrary key/value metadata

callbackId
string

Webhook tracking ID (included in webhook events triggered by this request)

isTest
boolean
default:false

Test mode (does not create actual data)

Response

Success

data
object
required

Recorded playtime session