Organization API: Staff Support: Staff
The 19 Organization API operations for staff.
Part of Staff Support.
Operations
Section titled OperationsStaff update chat channel
Section titled Staff update chat channelPUT /api/v1/orgs/{org_slug}/staff/community/chat/channels/{channel_id}
Show or hide one channel on the website (shown), or give it its own slow
mode (slowmode_seconds, null for the default). Hiding takes effect at once
and drops the channel's mirrored messages from the website.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
channel_id |
path | string | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
shown |
boolean or null | no |
slowmode_seconds |
integer or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Stop mirroring a Discord account onto the website, for days (null is no end)
Section titled Stop mirroring a Discord account onto the website, for days (null is no end)POST /api/v1/orgs/{org_slug}/staff/community/chat/discord-authors/{discord_user_id}/block
Stop mirroring a Discord account onto the website, for days (null is no
end). It can still talk in Discord; that is the Discord server's own
moderation. hide_recent hides what it said in the last 24 hours.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
discord_user_id |
path | string | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
reason |
string | yes |
days |
integer or null | no |
name |
string or null | no |
hide_recent |
boolean | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Mirror a blocked Discord account again, from its next message
Section titled Mirror a blocked Discord account again, from its next messagePOST /api/v1/orgs/{org_slug}/staff/community/chat/discord-authors/{discord_user_id}/unblock
Mirror a blocked Discord account again, from its next message.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
discord_user_id |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat filtered
Section titled Staff chat filteredGET /api/v1/orgs/{org_slug}/staff/community/chat/filtered
What the filter caught in the chat, newest first: messages it refused (never sent anywhere) and messages it sent with asterisks, with the words that matched, who wrote them and in which channel. Kept for as long as the moderation log keeps them.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
source |
query | string | no | web, discord or all. Default: all. |
action |
query | string | no | mask (sent with asterisks), block (refused) or all. Default: all. |
before_id |
query | integer or null | no | Older than this entry, for the next page. |
limit |
query | integer | no | Default: 50. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat messages
Section titled Staff chat messagesGET /api/v1/orgs/{org_slug}/staff/community/chat/messages
The mirror for moderators, newest first, in every state: what the website shows, what staff or reports hid, and what was deleted. Each message adds the customer behind a web message, the Discord account behind a mirrored one, its open reports and its author's restrictions.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
channel_id |
query | string or null | no | Only this channel. |
source |
query | string | no | discord, web (sent from the storefront) or all. Default: all. |
state |
query | string | no | visible, hidden (off the website), deleted or all. Default: all. |
q |
query | string or null | no | Matches the text or the author's name. |
customer_id |
query | integer or null | no | Only this customer's web messages. |
discord_user_id |
query | string or null | no | Only this Discord account's messages. |
reported |
query | boolean | no | Only messages with an open report. Default: False. |
before_id |
query | integer or null | no | Older than this message, for the next page. |
limit |
query | integer | no | Default: 50. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat message
Section titled Staff chat messageGET /api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}
One message with its reports, its author's ten most recent other messages, and for a web message how many other accounts posted from the same network in the last 30 days.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
message_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Take a message off the website, with an optional reason
Section titled Take a message off the website, with an optional reasonPOST /api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/hide
Take a message off the website, with an optional reason. It stays in
Discord unless delete_in_discord is set (Tier 2 support and up), which also
deletes it there: through the webhook for a web message, and with the bot's
Manage Messages for anyone else's. discord in the answer is deleted,
failed (the message stays hidden) or skipped. Its open reports are
marked actioned.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
message_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
reason |
string or null | no |
delete_in_discord |
boolean | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Dismiss a message's open reports and leave it as it is
Section titled Dismiss a message's open reports and leave it as it isPOST /api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/reports/dismiss
Dismiss a message's open reports and leave it as it is. On a message that reports hid, dismissing puts it back, which takes Tier 2 support.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
message_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
note |
string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Put a hidden message back on the website
Section titled Put a hidden message back on the websitePOST /api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/restore
Put a hidden message back on the website. Reports never hide it again, and its open reports are dismissed. A message deleted in Discord cannot come back.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
message_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Pause or resume posting from the website, for a raid or an incident
Section titled Pause or resume posting from the website, for a raid or an incidentPOST /api/v1/orgs/{org_slug}/staff/community/chat/pause
Pause or resume posting from the website, for a raid or an incident. While
paused nobody can post from the website; everyone can still read, and the
composer shows notice.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
paused |
boolean | yes |
notice |
string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat reports
Section titled Staff chat reportsGET /api/v1/orgs/{org_slug}/staff/community/chat/reports
Reported messages, one row per message with every report on it, the reasons counted, and when it was first and last reported; the most recently reported first.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
status |
query | string | no | open (any report still open), resolved or all. Default: open. |
page |
query | integer | no | Default: 1. |
page_size |
query | integer | no | Default: 25. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat restrictions
Section titled Staff chat restrictionsGET /api/v1/orgs/{org_slug}/staff/community/chat/restrictions
Everyone the chat is closed to right now: muted customers, banned customers and blocked Discord accounts, each with why, since when, until when and who did it.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
kind |
query | string | no | muted, banned (web accounts), blocked (Discord accounts) or all. Default: all. |
q |
query | string or null | no | Matches a name, an email address or a Discord user ID. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat settings
Section titled Staff chat settingsGET /api/v1/orgs/{org_slug}/staff/community/chat/settings
The chat's settings (policy), whether the bot deletes in Discord what the
filter refuses (delete_filtered), and every channel the bot can see: whether
Discord lets everyone read and post in it (is_public), whether the
organization shows it on the website (shown) and its slow mode.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Change any of the chat's settings
Section titled Change any of the chat's settingsPUT /api/v1/orgs/{org_slug}/staff/community/chat/settings
Change any of the chat's settings. Only the keys sent change. A value out of range answers 422 naming the key, and nothing is saved.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
Type: Changes.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat summary
Section titled Staff chat summaryGET /api/v1/orgs/{org_slug}/staff/community/chat/summary
Counts for the chat page's tiles and tabs: open reports, hidden and sent in the last 24 hours, muted, banned and blocked people, and whether web posting is paused.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff chat terms
Section titled Staff chat termsGET /api/v1/orgs/{org_slug}/staff/community/chat/terms
The words and phrases this brand added to the community filter, on top of
Coritan's own lists. Each one either masks a message with asterisks (mask)
or refuses it (block). They apply to chat messages from the website and
from Discord, forum posts and guide comments; handles are held to Coritan's
lists only.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Add a word or phrase to this brand's filter, or change what an existing one does
Section titled Add a word or phrase to this brand's filter, or change what an existing one doesPOST /api/v1/orgs/{org_slug}/staff/community/chat/terms
Add a word or phrase to this brand's filter, or change what an existing one does. Matching ignores case, spacing tricks and look-alike letters, as the shipped lists do. A brand holds up to 500.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
term |
string | yes |
action |
string | no |
note |
string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff test chat filter
Section titled Staff test chat filterPOST /api/v1/orgs/{org_slug}/staff/community/chat/terms/test
Run a phrase through this brand's filter, its own words included, without
posting it anywhere. action is allow, mask or block; result is the
text as the chat would show it, or null when it would be refused; terms
are the words that matched.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
text |
string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Take a word off this brand's filter
Section titled Take a word off this brand's filterDELETE /api/v1/orgs/{org_slug}/staff/community/chat/terms/{term_id}
Take a word off this brand's filter. Coritan's own lists are unchanged.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
term_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |