Targeting Settings
REST API
Targeting Settings
Learn how to configure user properties and context targeting using the REST API.
POST
Targeting Settings
Targeting allows you to display ads to specific user groups or contexts. The REST API supports both audience targeting and context targeting.Documentation Index
Fetch the complete documentation index at: https://docs.adrop.io/llms.txt
Use this file to discover all available pages before exploring further.
Audience Targeting
Target ads based on user properties.Request Parameters
App Key (found in adrop_service.json)
application/jsonUser unique identifier
Property data (JSON string). Includes preset and custom properties.
Platform. e.g.,
web, android, iosAdvertising identifier (ADID/IDFA)
Response
Response code.
0 indicates success.Response message
Preset Properties
Standard properties predefined by Adrop. The same format is used across all SDKs and REST API.Birth Date (BIRTH)
| Key | Example Value | Format |
|---|---|---|
BIRTH | 2024 | yyyy (year only) |
BIRTH | 202401 | yyyyMM (year and month) |
BIRTH | 20240101 | yyyyMMdd (full date) |
Gender (GDR)
| Key | Value | Meaning |
|---|---|---|
GDR | M | Male |
GDR | F | Female |
GDR | U | Unknown |
Unknown Values
| Key | Value | Description |
|---|---|---|
* | U | Use to represent “unknown” for any property |
Preset property keys use uppercase:
BIRTH, GDRCustom Properties
You can use custom properties defined in the console.Setting Custom Properties
- Navigate to the Targeting menu in the Adrop Console
- Create custom properties in the Audience Targeting tab
- Send the property key-value pairs via API
Context Targeting
Target ads based on page or content context. Add thecontextId parameter to ad requests.
Setting Up Context Targeting
- Navigate to the Targeting menu in the Adrop Console
- Create a context in the Context Targeting tab
- Use the
contextIdparameter when requesting ads
Applying Context to Ad Requests
Best Practices
Consistent User ID
Always use the same
uid for the same user. Consistent IDs are key to accurate targeting.Update Properties
Call the
/property endpoint immediately when user information changes.Follow Preset Formats
Use the exact specified formats for
BIRTH and GDR properties.Leverage Context
Use context targeting for page types like news, sports, shopping, etc.
Related Documentation
Audience Targeting
Configure audience targeting in the console
Context Targeting
Configure context targeting in the console