Server-side API Authorization and request format
Authorization
API requests must be authenticated with either your secret or your public API key as an Authorization header. You can find them in the App Settings. The format of the value is Api-Key {your-secret-api-key}
, for example, Api-Key secret_live_...
.
Request format
Headers
The server-side API requests require specific headers and a JSON body. Use the details below to structure your requests.
Header | Description |
---|---|
adapty-profile-id | The user’s Adapty profile ID. Visible in the Adapty ID field in the Adapty Dashboard -> Profiles -> specific profile page. Interchangeable with adapty-customer-user-id, use any of them. |
adapty-customer-user-id | The user’s ID in your system. Visible in the Customer user ID field in the Adapty Dashboard -> Profiles -> specific profile page. Interchangeable with adapty-profile-id, use any of them. ⚠️ Works only if you identify users in your app code using the Adapty SDK. |
adapty-platform | (optional) Specify the platform of the device on which the app is installed. We recommend setting this parameter in the Create profile and Update profile requests when modifying the Installation Meta object, as it depends on the device the user is using, and a single user may have multiple devices. Possible values: iOS , macOS , iPadOS , visionOS , Android , or web . |
Content-Type | Set to application/json for the API to process the request. |
Body
The API expects a JSON-formatted body with the necessary data for the request.
What's next: requests: