The Loop Mobile API allows you to send real-time mobile app data to Loop for audience segmentation, analytics, and activation. This guide focuses on integrating your Android or iOS app with the API.
Step 1: Create a Mobile App Source in Loop
Before integrating, you must create a mobile app source in Loop:
Navigate to Sources in the Loop platform.
Click Create New.
Select Mobile App.
Choose the appropriate platform (Android or iOS).
Set a name and description to help identify the source.
Save your source; Loop will generate a source hash needed for API authentication. You can find this hash in the source details after saving.
Step 2: Build an API call
API Endpoint
Send requests to:
https://api.retargetly.com/mobile
Example Query String Request
https://api.retargetly.com/mobile?app=com.example.app&appn=Example%20App&ct=us&device=Pixel6&et=custom&ip=192.168.1.1&lan=en&mf=Google&source_hash=XYZ123&uid=abcdef-1234-5678&device_type=android
API Parameters
Parameter | Description | Type | Required parameter | Example |
| Package name of the app | String | ✅ |
|
| Country code (ISO) | String | ✅ |
|
| Device model identifier | String | ✅ |
|
| Event type (always | String | ✅ |
|
| Device IP address | String | ✅ |
|
| Unique hash for authentication | String | ✅ |
|
| User ID (Advertising ID for Android, IDFA for iOS) | String | ✅ |
|
| Mobile OS | String | ✅ |
|
| App name | String |
|
|
| List of installed apps (comma-separated) | String |
|
|
| Device language (ISO) | String |
|
|
| Device manufacturer | String |
|
|
| Custom key-value pairs (hashed PII supported) | String |
| value[ml_sh2]=31c5543c1734d25c7206f5fd591525d0295bec6fe84ff82f946a34fe970a1e66 |
Step 3: Sending Data to the API
Construct the query string with the required and optional parameters.
Ensure that sensitive PII data is hashed using SHA-256 or SHA-512.
Send the request to the Loop Mobile API endpoint.
Monitor the response for any errors.
Step 4: Best Practices & Troubleshooting
✅ Ensure all required fields are included in each request.
✅ Use secure encryption (SHA-256/SHA-512) for personal data like emails and phone numbers.
✅ Monitor API response codes to detect integration issues.
✅ Validate country and device parameters before sending requests.
If you encounter errors, check your source hash, query structure, and required parameters.