# Organization API: Staff Support: Staff

> The 19 Organization API operations for staff.

Source: https://www.coritan.com/docs/api/reference/organizations/staff-support/staff/

Part of [Staff Support](/docs/api/reference/organizations/staff-support/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| PUT | [`/api/v1/orgs/{org_slug}/staff/community/chat/channels/{channel_id}`](#op-put-api-v1-orgs-org-slug-staff-community-chat-channels-channel-id) | Staff update chat channel |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/discord-authors/{discord_user_id}/block`](#op-post-api-v1-orgs-org-slug-staff-community-chat-discord-authors-discord-user-id-b) | 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}/unblock`](#op-post-api-v1-orgs-org-slug-staff-community-chat-discord-authors-discord-user-id-u) | Mirror a blocked Discord account again, from its next message |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/filtered`](#op-get-api-v1-orgs-org-slug-staff-community-chat-filtered) | Staff chat filtered |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/messages`](#op-get-api-v1-orgs-org-slug-staff-community-chat-messages) | Staff chat messages |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}`](#op-get-api-v1-orgs-org-slug-staff-community-chat-messages-message-id) | Staff chat message |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/hide`](#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-hide) | Take a message off the website, with an optional reason |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/reports/dismiss`](#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-reports-dismi) | Dismiss a message's open reports and leave it as it is |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/messages/{message_id}/restore`](#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-restore) | Put a hidden message back on the website |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/pause`](#op-post-api-v1-orgs-org-slug-staff-community-chat-pause) | Pause or resume posting from the website, for a raid or an incident |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/reports`](#op-get-api-v1-orgs-org-slug-staff-community-chat-reports) | Staff chat reports |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/restrictions`](#op-get-api-v1-orgs-org-slug-staff-community-chat-restrictions) | Staff chat restrictions |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/settings`](#op-get-api-v1-orgs-org-slug-staff-community-chat-settings) | Staff chat settings |
| PUT | [`/api/v1/orgs/{org_slug}/staff/community/chat/settings`](#op-put-api-v1-orgs-org-slug-staff-community-chat-settings) | Change any of the chat's settings |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/summary`](#op-get-api-v1-orgs-org-slug-staff-community-chat-summary) | Staff chat summary |
| GET | [`/api/v1/orgs/{org_slug}/staff/community/chat/terms`](#op-get-api-v1-orgs-org-slug-staff-community-chat-terms) | Staff chat terms |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/terms`](#op-post-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 |
| POST | [`/api/v1/orgs/{org_slug}/staff/community/chat/terms/test`](#op-post-api-v1-orgs-org-slug-staff-community-chat-terms-test) | Staff test chat filter |
| DELETE | [`/api/v1/orgs/{org_slug}/staff/community/chat/terms/{term_id}`](#op-delete-api-v1-orgs-org-slug-staff-community-chat-terms-term-id) | Take a word off this brand's filter |

### Staff update chat channel {#op-put-api-v1-orgs-org-slug-staff-community-chat-channels-channel-id}

`PUT /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `channel_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `shown` | boolean or null | no |
| `slowmode_seconds` | integer or null | no |

#### 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) {#op-post-api-v1-orgs-org-slug-staff-community-chat-discord-authors-discord-user-id-b}

`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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `discord_user_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `reason` | string | yes |
| `days` | integer or null | no |
| `name` | string or null | no |
| `hide_recent` | boolean | no |

#### 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 {#op-post-api-v1-orgs-org-slug-staff-community-chat-discord-authors-discord-user-id-u}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `discord_user_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat filtered {#op-get-api-v1-orgs-org-slug-staff-community-chat-filtered}

`GET /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

| 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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat messages {#op-get-api-v1-orgs-org-slug-staff-community-chat-messages}

`GET /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

| 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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat message {#op-get-api-v1-orgs-org-slug-staff-community-chat-messages-message-id}

`GET /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `message_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### 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 {#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-hide}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `message_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `reason` | string or null | no |
| `delete_in_discord` | boolean | no |

#### 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 {#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-reports-dismi}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `message_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `note` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Put a hidden message back on the website {#op-post-api-v1-orgs-org-slug-staff-community-chat-messages-message-id-restore}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `message_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### 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 {#op-post-api-v1-orgs-org-slug-staff-community-chat-pause}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `paused` | boolean | yes |
| `notice` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat reports {#op-get-api-v1-orgs-org-slug-staff-community-chat-reports}

`GET /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

| 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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat restrictions {#op-get-api-v1-orgs-org-slug-staff-community-chat-restrictions}

`GET /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

| 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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat settings {#op-get-api-v1-orgs-org-slug-staff-community-chat-settings}

`GET /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Change any of the chat's settings {#op-put-api-v1-orgs-org-slug-staff-community-chat-settings}

`PUT /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

Type: Changes.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat summary {#op-get-api-v1-orgs-org-slug-staff-community-chat-summary}

`GET /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff chat terms {#op-get-api-v1-orgs-org-slug-staff-community-chat-terms}

`GET /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### 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 {#op-post-api-v1-orgs-org-slug-staff-community-chat-terms}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `term` | string | yes |
| `action` | string | no |
| `note` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff test chat filter {#op-post-api-v1-orgs-org-slug-staff-community-chat-terms-test}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `text` | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Take a word off this brand's filter {#op-delete-api-v1-orgs-org-slug-staff-community-chat-terms-term-id}

`DELETE /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `term_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
