Players API
Set Player Consent
Record the tracking consent of one player: none, anonymous or full, with its source. Manalens stores the record and leaves enforcement to you.
PUT
Set player consent
Records the tracking consent of one player. When a player answers your consent banner or changes the choice in your settings, call it from your backend. A new call replaces the record.
Manalens does not enforce consent. It stores the record so that you can read it back and show it in an audit. You decide what your SDKs and servers send for each level:
Authentication
Use an API key (mana_api_...) with the consent:write scope. See Authentication.
- The key works on its own project only. Another project’s key gets
404. - The key’s creator must be an owner, admin or editor.
- It works on every plan. The workspace needs an active subscription or trial.
- Call it from a server. A request with a browser
Originheader gets403. - The demo project is read-only:
403.
consent:write. Use a separate key for player deletes.
Path parameters
You can record consent before the player has any data in Manalens.
Body
Response
200 with the stored record:
Example
Deleting the record
Deleting the player deletes the record of the user key and of every anonymous ID that the delete covers. Deleting the project also deletes the record. The audit log has aplayer.consent_set row for each write. The row holds a hash of the player key, the status and the source, never the player’s IDs.
Errors
See Errors for the error format.
Authorizations
Path Parameters
Body
application/json
Response
The record was written