Edit a creator's promotion
curl --request PUT \
--url https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '{}'import requests
url = "https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid}"
payload = {}
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "d4e5f6a7-8b9c-4d1e-a2b3-c4d5e6f7a8b9",
"type": "discount",
"discountPercent": 20,
"freeTrialDays": null,
"availableToGroup": "new_subscribers",
"endsAt": "2024-02-15T00:00:00.000Z",
"maxUsages": 100,
"usedCount": 12,
"message": "20% off your first month!",
"createdAt": "2024-01-15T00:00:00.000Z"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "Too many requests",
"rateLimit": {
"scope": "app",
"layer": "<string>",
"limit": 123,
"windowSeconds": 123,
"retryAfterSeconds": 123,
"docs": "<string>"
}
}Creator promotions
Edit a creator's promotion
Edit the specified creator’s promotion by replacing it, exactly like editing from the dashboard: the referenced promotion is stopped, a new promotion is created with the provided values, and eligible fans are notified of the updated offer unless notifyFans is false.
The response contains the replacement promotion, whose uuid differs from the one in the path and whose usedCount starts at zero. Fans who redeemed the original promotion keep their discounted price or trial. If the new values target a different audience group, any existing promotion for that audience is also replaced.
PUT
/
creators
/
{creatorUserUuid}
/
promotions
/
{promotionUuid}
Edit a creator's promotion
curl --request PUT \
--url https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '{}'import requests
url = "https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid}"
payload = {}
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.fanvue.com/creators/{creatorUserUuid}/promotions/{promotionUuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "d4e5f6a7-8b9c-4d1e-a2b3-c4d5e6f7a8b9",
"type": "discount",
"discountPercent": 20,
"freeTrialDays": null,
"availableToGroup": "new_subscribers",
"endsAt": "2024-02-15T00:00:00.000Z",
"maxUsages": 100,
"usedCount": 12,
"message": "20% off your first month!",
"createdAt": "2024-01-15T00:00:00.000Z"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "Too many requests",
"rateLimit": {
"scope": "app",
"layer": "<string>",
"limit": 123,
"windowSeconds": 123,
"retryAfterSeconds": 123,
"docs": "<string>"
}
}Required scope
write:creator— Modify creator profiles, settings, and creator-specific data.
Authorizations
Headers
Body
application/json
Response
Promotion updated successfully
Was this page helpful?