/api/v2/server-side-api/profile/ Create profile
Creates a new end user of your app in Adapty.
Header parameters
The unique ID of the customer in your system. Either adapty-customer-user-id or adapty-profile-id is required.
The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either adapty-customer-user-id or adapty-profile-id is required.
The platform of the device where the user has your app installed
Request body
Your end user's first name
Your end user's last name
Your end user's gender
One of: "f", "m", "o"
Your end user's email
Your end user's phone number
Your end user's birthday
Country of the end user in ISO 3166-2 format
IPv4 address of the end user
Country of the end user's app store
The platform the user uses to make purchases in your app
One of: "app_store", "play_store", "stripe", "adapty", "paddle"
Store account token
Apple App Tracking Transparency status (0=not determined, 1=restricted, 2=denied, 3=authorized)
One of: 0, 1, 2, 3
Option to opt out of external analytics
Allows setting up to 30 custom attributes for the profile
The key must be a string with no more than 30 characters. Only letters, numbers, dashes, points, and underscores allowed
The attribute value must be no more than 50 characters. Only strings and floats are allowed as values
Unique device identifier
Device information
Device locale
Operating system information
Platform (iOS, Android, etc.)
One of: "iOS", "macOS", "iPadOS", "Android", "visionOS", "web"
Device timezone
User agent string
App build version
App version
Adapty SDK version
iOS Identifier for Advertisers
iOS Identifier for Vendor
Android advertising ID
Android device ID
Android app set ID
Responses
Profile created successfully
Schema
The internal ID of your app
Adapty profile ID
The ID of your user in your system
A float value representing the total revenue in USD earned in the profile
Internal parameter
Response time in milliseconds, needs for resolve a race condition
A maximum of 30 custom attributes to the profile are allowed to be set
The key must be a string with no more than 30 characters. Only letters, numbers, dashes, points, and underscores allowed
The attribute value must be no more than 50 characters. Only strings and floats are allowed as values
Array of Access level objects. Empty array if the customer has no access levels
Access level identifier
Store where the access level was purchased
Product ID in the store
Base plan ID in the store
Transaction ID in the store
Original transaction ID in the store
Offer details, if a promotional or introductory offer was applied
Offer category
One of: "introductory", "promotional", "offer_code", "win_back"
Offer type
One of: "free_trial", "pay_as_you_go", "pay_up_front"
Offer ID
When the access level starts
When the access level was purchased
When the access level was originally purchased
When the access level expires
When renewal was cancelled
When billing issue was detected
Whether the access level is in grace period
Reason for cancellation
Array of Subscription objects. Empty array if the customer has no subscriptions
Store where the subscription was purchased
Product ID in the store
Base plan ID in the store
Transaction ID in the store
Original transaction ID in the store
Offer details, if a promotional or introductory offer was applied
Offer category
One of: "introductory", "promotional", "offer_code", "win_back"
Offer type
One of: "free_trial", "pay_as_you_go", "pay_up_front"
Offer ID
Environment (Sandbox, Production)
When the subscription was purchased
When the subscription was originally purchased
When the subscription expires
When renewal was cancelled
When billing issue was detected
Whether the subscription is in grace period
Reason for cancellation
Array of Non-Subscription objects. Empty array if the customer has no purchases
Unique purchase identifier
Store where the purchase was made
Product ID in the store
Base plan ID in the store
Transaction ID in the store
Original transaction ID in the store
When the purchase was made
Environment (Sandbox, Production)
Whether this is a refund
Whether this is a consumable purchase
Example
{
"data": {
"app_id": "14c3d623-2f3a-455a-aa86-ef83dff6913b",
"profile_id": "3286abd3-48b0-4e9c-a5f6-ac0a006804a6",
"customer_user_id": "[email protected]",
"total_revenue_usd": 0,
"segment_hash": "8f45947bad31ab0c",
"timestamp": 1736425645861,
"custom_attributes": [
{
"key": "favourite_sport",
"value": "yoga"
}
],
"access_levels": [],
"subscriptions": [],
"non_subscriptions": []
}
} Unauthorized
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Example
{
"errors": [
{
"source": "non_field_errors",
"errors": [
"Authentication credentials were not provided."
]
}
],
"error_code": "not_authenticated",
"status_code": 401
} Internal server error