Change when a post's poll ends
curl --request PATCH \
--url https://api.fanvue.com/v1/posts/{uuid}/poll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '
{
"endsAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.fanvue.com/v1/posts/{uuid}/poll"
payload = { "endsAt": "2023-11-07T05:31:56Z" }
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({endsAt: '2023-11-07T05:31:56Z'})
};
fetch('https://api.fanvue.com/v1/posts/{uuid}/poll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-01T12:00:00.000Z",
"text": "Help me pick my next shoot!",
"price": null,
"audience": "followers-and-subscribers",
"publishAt": null,
"publishedAt": "2025-01-01T12:00:00.000Z",
"expiresAt": null,
"mediaUuids": [],
"mediaPreviewUuid": null,
"isPinned": false,
"likesCount": 42,
"commentsCount": 15,
"tips": {
"count": 0,
"totalGross": 0,
"totalNet": 0
},
"collections": [],
"poll": {
"question": "Which set should I shoot next?",
"type": "text",
"status": "open",
"endsAt": "2025-01-06T12:00:00.000Z",
"closedAt": null,
"totalVotes": 128,
"heroMediaUuid": null,
"answers": [
{
"position": 1,
"text": "Beach",
"emoji": "🏖️",
"mediaUuid": null,
"votes": 80,
"isWinner": false
},
{
"position": 2,
"text": "Studio",
"emoji": null,
"mediaUuid": null,
"votes": 48,
"isWinner": false
}
]
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"message": "<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>"
}
}{
"error": "<string>"
}Posts
Change when a post's poll ends
Move the end time of the poll on one of your posts, or remove it.
endsAt must be in the future and at most 7 days after the post is published, or after publishAt for a scheduled post. Null removes the end time, so the poll stays open until it is closed by hand; a poll without an end time can be given one later.
Only the end time changes: the question and answers of a poll cannot be edited. Returns 404 if the post does not exist, is not the creator’s or has no poll, 409 if the poll is already closed, and 400 if endsAt is outside those limits.
PATCH
/
v1
/
posts
/
{uuid}
/
poll
Change when a post's poll ends
curl --request PATCH \
--url https://api.fanvue.com/v1/posts/{uuid}/poll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '
{
"endsAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.fanvue.com/v1/posts/{uuid}/poll"
payload = { "endsAt": "2023-11-07T05:31:56Z" }
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({endsAt: '2023-11-07T05:31:56Z'})
};
fetch('https://api.fanvue.com/v1/posts/{uuid}/poll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-01T12:00:00.000Z",
"text": "Help me pick my next shoot!",
"price": null,
"audience": "followers-and-subscribers",
"publishAt": null,
"publishedAt": "2025-01-01T12:00:00.000Z",
"expiresAt": null,
"mediaUuids": [],
"mediaPreviewUuid": null,
"isPinned": false,
"likesCount": 42,
"commentsCount": 15,
"tips": {
"count": 0,
"totalGross": 0,
"totalNet": 0
},
"collections": [],
"poll": {
"question": "Which set should I shoot next?",
"type": "text",
"status": "open",
"endsAt": "2025-01-06T12:00:00.000Z",
"closedAt": null,
"totalVotes": 128,
"heroMediaUuid": null,
"answers": [
{
"position": 1,
"text": "Beach",
"emoji": "🏖️",
"mediaUuid": null,
"votes": 80,
"isWinner": false
},
{
"position": 2,
"text": "Studio",
"emoji": null,
"mediaUuid": null,
"votes": 48,
"isWinner": false
}
]
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"message": "<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>"
}
}{
"error": "<string>"
}Required scope
write:post— Create, edit, and manage posts and content on behalf of users.
Authorizations
Headers
Body
application/json
Response
End time changed. The post, with the poll's new endsAt
Was this page helpful?