Customers API
If you have a live app with subscriptions or non-renewing purchases, you may want to get existing users data from Apphud.
The Customers API is a REST endpoint that returns the full Apphud profile of a single user — subscriptions, devices, properties, attribution, total spend, paying status — by user ID. Use it to back-fill existing users into your data warehouse, CRM, or support tools without subscribing to webhooks.
NoteCustomers API is available only on paid plans.
If you have a live app with subscriptions or non-renewing purchases, you may want to fetch existing user data from Apphud. Use the Customers API to get information about a specific user by their user_id and api_key.
Endpoint
GET https://api.apphud.com/v1/customers?api_key=YOUR_API_KEY&user_id=XXX
Parameters
| Parameter | Description |
|---|---|
api_key | Any app-level API key. All key formats work: appstr_XXX (App Store), play_XXX (Google Play), xiaomi_XXX (Xiaomi), w2w_XXX (Flows), or sk_XXX (secret key). The key identifies which app to query; user lookup searches across all users in that app regardless of store. Find or create your keys in App Settings → Authentication Center. |
user_id | Your customer's User ID. |
Response
The results object contains the same User object, including its Subscriptions and Devices, as the Server-to-Server webhooks, with the same fields.
Subscriptions are returned as in webhooks: one record per store subscription (an App Store subscription group chain, or a Google Play purchase token), not one per purchase. See Server-to-Server Webhooks → User. For the full purchase history, use webhooks or the Events page.
For a full list of fiends and description of each field, see Server-to-Server Webhooks → User.
Response Example
200 OK
{
"data": {
"results": {
"created_at": "2022-01-25T19:19:51.944Z",
"user_id": "test_user_id",
"total_spent": 0.0,
"payments_count": 0,
"ip": "203.0.113.10",
"uid": "9dec9117",
"country_iso_code": "RU",
"time_zone": "Europe/Moscow",
"language": "ru",
"partner_attribution": {
"provider": "AppsFlyer",
"status": "Non-Organic",
"ad_network": "Facebook Ads",
"channel": "Instagram",
"campaign": "summer_sale",
"ad_set": "lookalike_us",
"creative": "video_01"
},
"internal_attribution": {
"provider": "Deeplinks",
"status": "Non-Organic",
"channel": "ig",
"campaign": "summer_sale",
"ad_set": "lookalike_us"
},
"idfv": "4150437B-8DAE-4444-87BF-3E569E310928",
"variations": [],
"paying": false,
"currency_country_code": "RU",
"email": null,
"phone": null,
"name": null,
"age": "31",
"gender": null,
"properties": [{
"name": "$age",
"value": "31"
}, {
"name": "test_true",
"value": "t"
}, {
"name": "fire_id",
"value": "value"
}],
"attribution": {
"search_ads_data": null,
"search_ads_raw_data": null,
"facebook_data": null,
"tiktok_data": null,
"adjust_data": null,
"branch_data": null,
"apphud_data": null
},
"subscriptions": [{
"id": "1dd085dc-e6ba-471f-abfb-ff18f9162c2a",
"status": "regular",
"environment": "sandbox",
"original_transaction_id": "1000000957181773",
"expires_at": null,
"cancelled_at": null,
"started_at": "2022-01-26T20:19:37.000Z",
"autorenew_enabled": false,
"in_retry_billing": false,
"introductory_activated": false,
"store": "app_store",
"kind": "autorenewable",
"autorenew_product_id": "com.apphud.gold",
"group": "Premium_0001",
"product_id": "com.apphud.gold",
"intro_period": false,
"trial_period": false
}],
"devices": [{
"id": "e2675b4d-10c2-441c-93e9-3088880e2fda",
"device_id": "test_device_id",
"device_type": "iPhone 11",
"device_family": "iPhone",
"platform": "ios",
"app_version": "1.0",
"sdk_version": "2.5.5",
"os_version": "15.2",
"idfa": null,
"start_app_version": "1.0",
"carrier": null,
"push_token": "af762ed401bafbbf53a9f65222a502874b3ad626b543cc8c4be38186e96d74e6",
"idfv": "4150437B-8DAE-4444-87BF-3E569E310928",
"adjust_data": null,
"appsflyer_data": {}
}]
},
"meta": null
},
"errors": null
}Updated 2 days ago
