Change a Session Poll's AOP

Changes the area of play of the active poll as performedBy. The session uses it when it starts.

PATCH

/api/v1/server/session-polls/{pollId}

Request

curl -X PATCH "https://api.melonly.com/api/v1/server/session-polls/{pollId}" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "aop": "highrock",
  "performedBy": "7264722635089514496"
}'

Response

200

Success

{
  "data": {
    "aop": 2,
    "channelId": "1100000000000000002",
    "createdAt": 1794776000000,
    "createdBy": "7264722635089514496",
    "id": "7527990000000000000",
    "messageId": "1300000000000000000",
    "serverId": "7294057520392310784",
    "status": 0,
    "statusUpdatedAt": 1794776000000,
    "voterDiscordIds": [
      "1100000000000000011",
      "1100000000000000012"
    ],
    "votes": 2,
    "votesRequired": 5
  }
}

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Path parameters

pollIdstringrequired

Body

aopstringrequired
Area of play. custom needs customAopId from the session settings.
Allowed values:nonecitycountyhighrockcustom
performedBystringrequired
Member ID of the staff member. Needs the Manage Sessions permission.
customAopIdstring | null
The custom AOP to use when aop is custom.

Response

200 Success

createdAtintegerrequired
When it was created.
createdBystringrequired
Member ID of who started it, or SYSTEM.
idstringrequired
Unique ID.
serverIdstringrequired
Server ID.
statusintegerrequired
0 Voting, 1 Enough votes, 2 Cancelled, 3 Expired, 4 Session started.
statusUpdatedAtintegerrequired
When status last changed.
voterDiscordIdsstring[]required
Discord IDs of everyone who voted.
votesintegerrequired
Votes so far.
votesRequiredintegerrequired
Votes needed before the session can start.
aopinteger | null
Area of play the session will use: 1 City, 2 County, 3 Highrock, 4 Custom (see aopCustomId).
aopCustomIdstring | null
The custom AOP, when aop is 4.
cancelledBystring | null
Member ID of who cancelled it.
channelIdstring | null
Discord channel of the poll message.
messageIdstring | null
Discord ID of the poll message.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
403Success
404Not found
409The poll has ended
429Rate limited. See Retry-After and details.
500Internal server error
502next did not confirm the write. Check whether it applied before retrying.
503Write endpoints are not configured on this deployment