Close a post's poll
curl --request POST \
--url https://api.fanvue.com/v1/posts/{uuid}/poll/close \
--header 'Authorization: Bearer <token>' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>'import requests
url = "https://api.fanvue.com/v1/posts/{uuid}/poll/close"
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.fanvue.com/v1/posts/{uuid}/poll/close', 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": "closed",
"endsAt": "2025-01-04T12:00:00.000Z",
"closedAt": "2025-01-02T09:30:00.000Z",
"totalVotes": 128,
"heroMediaUuid": null,
"answers": [
{
"position": 1,
"text": "Beach",
"emoji": "🏖️",
"mediaUuid": null,
"votes": 80,
"isWinner": true
},
{
"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
Close a post's poll
Close the poll on one of your posts before its end time.
Voting stops at once and the final result is stored: the post returned carries the poll as closed, with its closedAt, final votes and winners. The creator is notified, and the creator.post.poll_closed webhook fires once.
A closed poll cannot be reopened. Returns 404 if the post does not exist, is not the creator’s or has no poll, 409 if the poll is already closed (including one past its end time), and 400 if the post is scheduled and not published yet.
POST
/
v1
/
posts
/
{uuid}
/
poll
/
close
Close a post's poll
curl --request POST \
--url https://api.fanvue.com/v1/posts/{uuid}/poll/close \
--header 'Authorization: Bearer <token>' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>'import requests
url = "https://api.fanvue.com/v1/posts/{uuid}/poll/close"
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.fanvue.com/v1/posts/{uuid}/poll/close', 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": "closed",
"endsAt": "2025-01-04T12:00:00.000Z",
"closedAt": "2025-01-02T09:30:00.000Z",
"totalVotes": 128,
"heroMediaUuid": null,
"answers": [
{
"position": 1,
"text": "Beach",
"emoji": "🏖️",
"mediaUuid": null,
"votes": 80,
"isWinner": true
},
{
"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
Response
Poll closed. The post, with the poll's final result
Was this page helpful?