moymo,Docs
Skip to content
HTTP API Resources

Server ​

A bot is a member of each server it was added to, and everything below is done as that member: the permissions of the bot's role decide what works, and a refusal is the same sentence a person would read. Roles form a ladder, as for people: a bot can only act on members and roles that stand below its own highest role, and can only give permissions it holds itself. All calls need a bot token.

Server object ​

FieldTypeDescription
idUUID
namestring
descriptionstring
icon?stringThe server's picture, a path on moymo.net
colorstringThe colour of the server's tile
owner_idUUID
member_countinteger
permissionsstringThe bot's permissions in the server as a decimal string (before channel overwrites)
Example serverJSON
json
{
  "id": "5f1d2b8e-7a64-4d07-8d3a-0b9f6c4e2a11",
  "name": "Friday night",
  "description": "Games, mostly.",
  "icon": "🎲",
  "color": "#2bff6e",
  "owner_id": "1f0c8d64-2a37-4f5b-9a0e-7c4d3b2e1a90",
  "member_count": 42,
  "permissions": "3072"
}

Get server ​

GET/servers/{server.id}

Returns the server the bot is in.

RequestGET/servers/Shell
bash
curl "https://moymo.net/api/app/v1/servers/$SERVER_ID" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN"

Role object ​

FieldTypeDescription
idUUID
namestring
colorstring
positionintegerHigher stands above lower
permissionsstringDecimal string, see Permissions
hoistbooleanShown separately in the member list
mentionablebooleanAnyone may mention it
everyonebooleanThe @everyone role
managedbooleanMade by an application's install. Its permissions are the ones it was installed with
Example roleJSON
json
{
  "id": "7e3a9c52-1d48-4b6f-8a20-5c9e0f2b3d71",
  "name": "Dice Roller",
  "color": "#2bff6e",
  "position": 3,
  "permissions": "3072",
  "hoist": false,
  "mentionable": false,
  "everyone": false,
  "managed": true
}

Get roles ​

GET/servers/{server.id}/roles

Returns an array of roles.

Create role ​

POST/servers/{server.id}/roles

Needs Manage Roles. Body: name, color (#rrggbb), permissions (a decimal string, only bits the bot holds), hoist, mentionable. Returns the new role.

RequestPOST/servers/{server.id}/rolesShell
bash
curl -X POST "https://moymo.net/api/app/v1/servers/$SERVER_ID/roles" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Champion", "color": "#ffcf5d", "permissions": "1024", "hoist": true }'

Modify role ​

PATCH/servers/{server.id}/roles/{role.id}

Takes the same fields as a new role; the ones you leave out stay. Returns the role.

Delete role ​

DELETE/servers/{server.id}/roles/{role.id}

204.

Member object ​

FieldTypeDescription
useruserid, username, display_name, avatar, bot
nick?stringThe nickname in this server
rolesarray of UUIDs
communication_disabled_until?timeWhen a timeout ends, if the member is in one
status?stringonline or offline. Only with the PRESENCE intent
playing?stringThe game they are playing, if any. Only with the PRESENCE intent
Example memberJSON
json
{
  "user": {
    "id": "1f0c8d64-2a37-4f5b-9a0e-7c4d3b2e1a90",
    "username": "ada",
    "display_name": "Ada",
    "bot": false
  },
  "nick": "Ada L.",
  "roles": ["7e3a9c52-1d48-4b6f-8a20-5c9e0f2b3d71"]
}

List members ​

GET/servers/{server.id}/members

Needs the SERVER_MEMBERS intent. Query: limit (1 to 1000, default 100) and after (a member's user id: members are ordered by id, so a page ends where the next begins).

RequestGET/servers/{server.id}/members
bash
curl "https://moymo.net/api/app/v1/servers/$SERVER_ID/members?limit=100" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN"
js
// Walk through all the members, a page at a time.
const url = new URL(`https://moymo.net/api/app/v1/servers/${serverId}/members`)
url.searchParams.set('limit', '1000')
const headers = { Authorization: `Bot ${process.env.MOYMO_BOT_TOKEN}` }

const members = []
for (;;) {
  const page = await (await fetch(url, { headers })).json()
  members.push(...page)
  if (page.length < 1000) break
  url.searchParams.set('after', page[page.length - 1].user.id)
}

Get member ​

GET/servers/{server.id}/members/{user.id}

Any member whose id you know, without an intent.

Modify member ​

PATCH/servers/{server.id}/members/{user.id}

Body: nick (needs Manage Nicknames, or Change Nickname for the bot itself), and/or timeout_minutes (needs Moderate Members; 0 lifts a timeout). Returns the member.

RequestPATCH/servers/{server.id}/members/Shell
bash
# Time a member out for ten minutes
curl -X PATCH "https://moymo.net/api/app/v1/servers/$SERVER_ID/members/$USER_ID" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "timeout_minutes": 10 }'
Response200OKJSON
json
{
  "user": {
    "id": "1f0c8d64-2a37-4f5b-9a0e-7c4d3b2e1a90",
    "username": "ada",
    "display_name": "Ada",
    "bot": false
  },
  "roles": [],
  "communication_disabled_until": "2026-11-03T18:41:07.412Z"
}

Add and remove a role ​

PUT/servers/{server.id}/members/{user.id}/roles/{role.id}
DELETE/servers/{server.id}/members/{user.id}/roles/{role.id}

Needs Manage Roles, a role below the bot's, and a member below the bot. 204.

Remove member ​

DELETE/servers/{server.id}/members/{user.id}

Kicks a member. Needs Kick Members. 204.

Bans ​

GET/servers/{server.id}/bans
PUT/servers/{server.id}/bans/{user.id}
DELETE/servers/{server.id}/bans/{user.id}

Need Ban Members. PUT takes an optional reason (shown in the server's ban list) and answers 204. Each ban in the list has username, display_name, reason and at.

RequestPUT/servers/{server.id}/bans/Shell
bash
curl -X PUT "https://moymo.net/api/app/v1/servers/$SERVER_ID/bans/$USER_ID" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Spam" }'
Response204No Content

The list:

RequestGET/servers/{server.id}/bansShell
bash
curl "https://moymo.net/api/app/v1/servers/$SERVER_ID/bans" \
  -H "Authorization: Bot $MOYMO_BOT_TOKEN"
Response200OKJSON
json
[
  {
    "username": "spammer",
    "display_name": "Spammer",
    "reason": "Spam",
    "at": "2026-11-03T18:30:00Z"
  }
]

The wiki is for Moymo's members and developers. Something wrong or missing? Use "Suggest a change" on any page.