Zrzur Developers

Users and members

A user is a Zrzur account, a member is a user inside one server, with a nickname, roles and a timeout.

What a bot can see about people

A bot sees what members of the same server see: username, display name, avatar, badges, status and the public profile. It never sees e-mail addresses, sessions, settings, privacy choices or who someone is friends with.

Privacy limits

People decide who may message them. A bot is never a friend, so:

Their "direct messages" settingCan the bot start a DM?
EveryoneYes
Mutual (default: shares a server or group)Yes, while the bot shares a server with them
FriendsNo

Blocked users never receive a bot's messages, and a person who wrote to the bot first can always get an answer. Opening the DM channel (GET /users/{target}/dm) can succeed while sending is refused with 403 DirectMessagesRestricted or Blocked. Do not retry these errors: post in a server channel instead, without private details.

Group invites have their own setting; bots cannot create groups or add people to them at all.

Age checks for mature channels apply to people only: bots have no age and are not checked. Do not use a bot to show mature content to members who cannot open those channels themselves.

Members

Member endpoints work on servers the bot is in.

Reference: users

GET /users/{target}

Fetch User. Retrieve a user's information.

Permissions: User:Access · Rate limit: users, 20 / 10 s

PATCH /users/{target}

Edit User. Edit currently authenticated user.

Rate limit: user_edit, 2 / 10 s

DELETE /users/{target}/block

Unblock User. Unblock another user by their id.

Not available to bots.

Rate limit: users, 20 / 10 s

PUT /users/{target}/block

Block User. Block another user by their id.

Not available to bots.

Rate limit: users, 20 / 10 s

GET /users/{target}/default_avatar

Fetch Default Avatar. This returns a default avatar based on the given id.

Rate limit: default_avatar, 255 / 10 s

GET /users/{target}/dm

Open Direct Message. Open a DM with another user. If the target is oneself, a saved messages channel is returned. Fails with DirectMessagesRestricted when the other user's privacy settings don't let you start a conversation with them.

Permissions: User:SendMessage, Channel:SendMessage · Rate limit: users, 20 / 10 s

GET /users/{target}/flags

Fetch User Flags. Retrieve a user's flags.

Rate limit: users, 20 / 10 s

DELETE /users/{target}/friend

Deny Friend Request / Remove Friend. Denies another user's friend request or removes an existing friend.

Not available to bots.

Rate limit: users, 20 / 10 s

PUT /users/{target}/friend

Accept Friend Request. Accept another user's friend request.

Not available to bots.

Rate limit: users, 20 / 10 s

GET /users/{target}/mutual

Fetch Mutual Friends, Servers, Groups and DMs. Retrieve a list of mutual friends, servers, groups and DMs with another user.

Permissions: User:ViewProfile · Rate limit: users, 20 / 10 s

GET /users/{target}/profile

Fetch User Profile. Retrieve a user's profile data. Will fail if you do not have permission to access the other user's profile.

Permissions: User:ViewProfile · Rate limit: users, 20 / 10 s

GET /users/@me

Fetch Self. Retrieve your user information.

Rate limit: users, 20 / 10 s

GET /users/@me/change-requests

Change requests. Changes to your account that Zrzur asked you to agree to and that are still waiting for your answer.

Rate limit: users, 20 / 10 s

POST /users/@me/change-requests/{id}

Answer a change request. Accept (the change is applied now) or decline (nothing changes).

Rate limit: users, 20 / 10 s

GET /users/@me/mentions

Fetch Mentions. Messages from the last 30 days that mention you: by name, by one of your roles, or with @everyone / @here, in channels you can see. Newest first. For people only: the whole messages and their authors would pass a bot's intents.

Not available to bots.

Permissions: Channel:ViewChannel · Rate limit: users, 20 / 10 s

GET /users/@me/privacy

Fetch Privacy Settings. Who can message you and who can add you to group chats.

Not available to bots.

Rate limit: users, 20 / 10 s

PATCH /users/@me/privacy

Edit Privacy Settings. Change who can message you and who can add you to group chats. Fields left out stay the same.

Not available to bots.

Rate limit: user_edit, 2 / 10 s

GET /users/dms

Fetch Direct Message Channels. This fetches your direct messages, including any DM and group DM conversations.

Rate limit: users, 20 / 10 s

POST /users/friend

Send Friend Request. Send a friend request to another user.

Not available to bots.

Rate limit: users, 20 / 10 s

Reference: members

POST /servers/{server_id}/lobby/answers

Answer Lobby Question. Add the role attached to a public interest choice to the authenticated member. Existing roles are preserved; answering again is idempotent.

Rate limit: servers, 5 / 10 s

DELETE /servers/{server_id}/lobby/answers/{question}/{option}

Remove Lobby Answer. Take back an interest choice: removes the role of that configured answer from the authenticated member. Other roles stay; removing again is idempotent.

Rate limit: servers, 5 / 10 s

GET /servers/{server_id}/members/{member_id}

Fetch Member. Retrieve a member.

Rate limit: servers, 5 / 10 s

PATCH /servers/{server_id}/members/{member_id}

Edit Member. Edit a member by their id.

Permissions: Channel:ChangeNickname, Channel:ManageNicknames, Channel:ChangeAvatar, Channel:RemoveAvatars, Channel:AssignRoles, Channel:TimeoutMembers, Channel:MuteMembers, Channel:DeafenMembers, Channel:MoveMembers, Channel:Connect, Channel:ManageChannel · Rate limit: servers, 5 / 10 s

GET /servers/{target}/invites

Fetch Invites. Fetch all server invites.

Permissions: Channel:ManageServer · Rate limit: servers, 5 / 10 s

GET /servers/{target}/join_requests

Fetch Join Requests. Pending requests to join this server, oldest first.

Rate limit: servers, 5 / 10 s

POST /servers/{target}/join_requests/{applicant}/approve

Approve Join Request. Make the applicant a member. Fails if the request is no longer pending (already decided by someone else) or the person can't join (banned, server limit, age).

Rate limit: servers, 5 / 10 s

POST /servers/{target}/join_requests/{applicant}/reject

Reject Join Request.

Rate limit: servers, 5 / 10 s

DELETE /servers/{target}/join_requests/@me

Cancel Own Join Request.

Rate limit: servers, 5 / 10 s

GET /servers/{target}/join_requests/@me

Fetch Own Join Request. Where your request to join this server stands.

Rate limit: servers, 5 / 10 s

GET /servers/{target}/members

Fetch Members. Fetch server members, a page at a time (limit, after).

Rate limit: servers, 5 / 10 s

GET /servers/{target}/members_experimental_query

Query members by name. Query members by a given name, this API is not stable and will be removed in the future.

Rate limit: servers, 5 / 10 s

POST /servers/{target}/rules/accept

Accept the rules. Accept the server's rules (rules screening). Members who joined after screening was switched on can talk once they have accepted.

Rate limit: servers, 5 / 10 s