API documentation PUT /offers/{id}
Edit an existing offer. Only the fields present in the request body are updated; all other offer settings are left unchanged.
PUT https://demo.trafficmanager.com/api/v1/offers/{id}
The field names match the offer schema returned by GET /api/v1/offers/{id}, so you can read an offer, change the needed fields, and send them back.
Authentication:
The request must be authenticated with the following HTTP headers:x-api-key: Your API key, found on the Security pagex-user-id: Your User ID, found on the Security page
Permissions:
- The authenticated user must be an admin or advertiser.
- The authenticated user must be allowed to edit the requested offer.
Path Parameters:
id: offer ID
Body Parameters (all optional, JSON):
name: offer name (up to 255 characters)description: offer description (up to 65535 characters)status:0(paused) or1(active). The status of a pending or rejected offer can only be changed by users with offer approval permissions. A synchronized offer cannot be activated while it is paused on the remote platform.visibility:1(public),2(apply needed) or3(private)isFeatured:trueorfalsepayout: number between 0 and 9999.99 (0-100 for percentage payout modes such as RevShare). Not available for payout modes whose payout does not come from this single value (custom events, dynamic RevShare, RevShare tiers, payout by traffic source, custom payout text), and cannot be changed while the offer is synchronized from another platform (pause the auto-sync first).payout2: same rules aspayout; only accepted for mixed payout modes with a second payout (for example CPA + RevShare). Sendnullto remove it.countries: array of ISO country codes, for example["IT", "ES"]. Sending an empty array makes the offer worldwide; any existingexcludeCountrieskeep applying (sendexcludeCountries: []to remove them too). The exported format[{"cc": "IT"}]is also accepted. Cannot be changed while the offer is synchronized from another platform.excludeCountries: array of ISO country codes to exclude, same format and synchronization rules ascountries. Cannot be combined with a non-emptycountrieslist: sending one non-empty list clears the other, like in the offer edit page.allowedUsers: array of affiliate user ids allowed to run the offer, for example[715, 802]; the exported format[{"id": 715}]is also accepted. The list replaces the current one: to remove an affiliate send the list without him, an empty array removes everyone. Only valid for private or apply-to-run offers (or public offers with blocked groups, where the list acts as an exception to the blocks). Every id must be an active affiliate — active admins and affiliate managers are accepted too, like in the offer edit page — or the request is rejected.settings.acceptFallback:trueorfalse, includes or excludes the offer from the fallback traffic. The other keys of thesettingsobject are read-only: they are accepted when unchanged, so the exported object can be sent back, and rejected when modified.
All the fields returned by GET /api/v1/offers/{id} are accepted, so the whole offer object can be sent back after changing the needed fields: the read-only ones are ignored, and the editable ones listed above are applied when their value changed. Any other unknown body parameter is rejected. Changing countries also clears the offer's counties/cities filters, since they refer to the previous country selection. When the new value is a country list, the landing page country restrictions that are no longer part of the offer targeting are removed as well (they are kept when the offer is made worldwide); if that would remove every country restriction of a landing page, the request is rejected: update or delete that landing page first.
Example:
curl --location --request PUT 'https://demo.trafficmanager.com/api/v1/offers/100' \
--header 'X-User-ID: __USER_UUID__' \
--header 'X-Api-Key: __API_KEY__' \
--header 'Content-Type: application/json' \
--data '{
"name": "New offer name",
"status": 0,
"payout": 7.5,
"countries": ["IT", "ES"]
}'
Success Response:
{
"status": 200,
"message": "Operation successful",
"offer": {
"id": 100,
"status": 0,
"name": "New offer name",
"payout": "7.50",
"...": "the complete updated offer, same schema as GET /api/v1/offers/{id}"
}
}
Error Response:
{
"status": [error code],
"message": [error message]
}
English
العربية
Dansk
Deutsch
Español
Italiano
한국어
Português
Română
Українська
Русский
Svenska
中文