List Sessions

Lists your server's sessions, newest first, including scheduled ones. Use status=active to get the session that's running right now.

GET

/api/v1/server/sessions

Request

curl -X GET "https://api.melonly.com/api/v1/server/sessions" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": [
    {
      "aop": 1,
      "createdAt": 1794776859830,
      "createdBy": "7264722635089514496",
      "fullPosted": false,
      "id": "7528000000000000000",
      "messages": [
        {
          "channelId": "1100000000000000002",
          "containsChangingVariables": true,
          "createdAt": 1794776860100,
          "messageId": "1300000000000000001",
          "type": 0
        }
      ],
      "pollId": "7527990000000000000",
      "serverId": "7294057520392310784",
      "startedAt": 1794776859830,
      "status": 0,
      "statusUpdatedAt": 1794776859830
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 1,
  "totalPages": 1
}

You can order by createdAt (default), startedAt, scheduledStartTime or id.

Authorization

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

Query parameters

pageintegerdefault: 1
1-based page number. Defaults to 1.
pageSizeintegerdefault: 10
Items per page, clamped to 1-100. Defaults to 10.
orderBystring
Field to sort by. See the endpoint description for the accepted values.
sortstring
Sort direction. Defaults to desc.
Allowed values:ascdesc
statusstring
Only sessions with this status.
Allowed values:activeendedscheduled

Response

200 Success. Results are paged and also include page, pageSize, total and totalPages.

createdAtintegerrequired
When it was created. For scheduled sessions, when it was scheduled.
createdBystringrequired
Member ID of who started or scheduled it, or SYSTEM.
idstringrequired
Unique ID.
messagesobject[]required
Discord messages posted for the session. type is 0 Startup, 1 Shutdown, 2 Boost, 3 Server full, 4 Scheduled.
serverIdstringrequired
Server ID.
statusintegerrequired
0 Active, 1 Ended, 2 Scheduled.
statusUpdatedAtintegerrequired
When status last changed.
aopinteger | null
Area of play: 1 City, 2 County, 3 Highrock, 4 Custom (see aopCustomId).
aopCustomIdstring | null
The custom AOP, when aop is 4.
autoStartedboolean | null
Whether a scheduled session started by itself.
endedBystring | null
Member ID of who shut it down.
fullPostedboolean | null
Whether a server full message was posted.
pollIdstring | null
The poll that led to this session.
scheduledStartTimeinteger | null
When a scheduled session is due to start.
startedAtinteger | null
When the session started. Missing while it's scheduled.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
429Rate limited. See Retry-After and details.
500Internal server error