Skip to main content
All API requests require a Project Token. The token identifies your organization and authorizes requests to identify users and track events.

Getting your Project Token

  1. Go to Settings and copy your Project Token (it starts with rk-)
Although the Project Token is write-only, we recommend using it only on the backend.

Using the Project Token

In Node.js, pass the token when creating the Retain client and the SDK handles authentication automatically. In other languages, include the token in each request using Authorization: Basic <token> with Content-Type: application/json.
See Identify and Track for the same pattern with full request bodies in each language.

Next steps

Identify

Identify users in Retain.

Track

Record events for users.