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
200 OK
{
"data": {
"results": {
"created_at": "2022-01-25T19:19:51.944Z",
"user_id": "test_user_id",
"total_spent": 0.0,
"payments_count": 0,
"uid": "9dec9117",
"idfv": "4150437B-8DAE-4444-87BF-3E569E310928",
"variations": [],
"country_iso_code": "RU",
"time_zone": "Europe/Moscow",
"language": "ru",
"paying": false,
"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"
}],
"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",
"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"
}]
},
"meta": null
},
"errors": null
}Response Description
For a full description of the User and Subscriptions models, see Server-to-Server Webhooks → User.
Updated 5 days ago
