Skip to main content
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.

Audience Targeting

Target ads based on user properties.

Request Parameters

string
required
App Key (found in adrop_service.json)
string
required
application/json
string
required
User unique identifier
string
required
Property data (JSON string). Includes preset and custom properties.
string
Platform. e.g., web, android, ios
string
Advertising identifier (ADID/IDFA)

Response

integer
Response code. 0 indicates success.
string
Response message

Preset Properties

Standard properties predefined by Adrop. The same format is used across all SDKs and REST API.

Birth Date (BIRTH)

Gender (GDR)

Unknown Values

Preset property keys use uppercase: BIRTH, GDR

Custom Properties

You can use custom properties defined in the console.

Setting Custom Properties

  1. Navigate to the Targeting menu in the Adrop Console
  2. Create custom properties in the Audience Targeting tab
  3. Send the property key-value pairs via API
All custom property values must be STRING type.

Context Targeting

Target ads based on page or content context. Add the contextId parameter to ad requests.

Setting Up Context Targeting

  1. Navigate to the Targeting menu in the Adrop Console
  2. Create a context in the Context Targeting tab
  3. Use the contextId parameter 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.

Audience Targeting

Configure audience targeting in the console

Context Targeting

Configure context targeting in the console