Create a Profile

POSThttps://app.botsi.com/api/v1/web-api/profiles

Call this endpoint on the first app launch. It initializes the user profile in Botsi, which is required for all AI Pricing operations, subscriptions, and paywall tracking.

Key Identifiers
  • profileId: A unique ID returned by Botsi. Use this to fetch paywalls and track events.

  • customerUserId (Optional): Provide your own internal ID to link profiles across devices.

    If you're adding a customerUserId to a new user profile, include only the customerUserId in the request body. This will create a new profile with a random profileId and the specified customerUserId.

    While customerUserId is an optional field, its use is strongly recommended to ensure reliable user identification across your system and Botsi.

    You must store either the profileId or customerUserId locally to authenticate all subsequent API calls.


Request Body

application/json

ParameterTypeRequiredDescription
countrystringRequiredISO 3166-1 alpha-2 country code. Example: US
devicestringRequiredDevice model identifier. Example: iPhone 15 Pro Max
osstringRequiredOperating system and version. Example: iOS 17.0
platformstringRequiredPlatform type. Example: ios
customerUserIdstringRecommendedYour internal user ID. Strongly recommended to ensure reliable user identification across devices. Example: user-123
localestringOptionalLocale code. Example: en_US
currencystringOptionalISO 4217 currency code. Example: USD
storeCountrystringOptionalApp Store country code. Example: US
timezonestringOptionalIANA timezone identifier. Example: America/New_York
ipstringOptionalIP address. Example: 192.168.1.1
appVersionstringOptionalApp version. Example: 1.0.0
appBuildstringOptionalApp build number. Example: 100
osVersionstringOptionalOS version. Example: 17.0
advertisingIdstringOptionalAdvertising identifier. Example: 6D92078A-8246-4BA4-AE5B-76104861E7DC
sessionIdstringOptionalSession ID. Example: session-abc-123
pushTokenstringOptionalPush notification token

Example Request

{
  "country": "US",
  "device": "iPhone 15 Pro Max",
  "os": "iOS 17.0",
  "platform": "ios",
  "customerUserId": "user-123",
  "locale": "en_US",
  "currency": "USD"
}

cURL Example

curl -X POST "https://app.botsi.com/api/v1/web-api/profiles"      -H "Authorization: {{secret_key}}"      -H "Content-Type: application/json"      -d '{
       "country": "US",
       "device": "iPhone 15 Pro Max",
       "os": "iOS 17.0",
       "platform": "ios",
       "customerUserId": "user-123",
       "locale": "en_US",
       "currency": "USD"
     }'

Response

200Profile created successfully

A successful request returns a JSON object containing the details of the newly created profile. Make sure to save data.profileId and/or data.customerUserId, as they are required for the next steps in the flow.

{
  "ok": true,
  "data": {
    "profileId": "0072102a-c00c-4ea5-9271-1b6e975f2d63",
    "customerUserId": "user-123",
    "paid": false,
    "country": "US",
    "locale": "en_US",
    "currency": "USD",
    "storeCountry": "US",
    "timezone": "America/New_York",
    "ip": "192.168.1.1",
    "device": "iPhone 15 Pro Max",
    "os": "iOS 17.0",
    "platform": "ios",
    "appVersion": "1.0.0",
    "appBuild": "100",
    "osVersion": "17.0",
    "advertisingId": "6D92078A-8246-4BA4-AE5B-76104861E7DC",
    "sessionId": "session-abc-123",
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Try It Out

https://app.botsi.com/api/v1/web-api
Response
Click "Send API Request" to see the response here.