Toolset chats
Chats: messages, participants, files, read counters.
14 tools. Mutations require an explicit confirm=true argument; Auth marks tools that need an hh.ru token.
| Tool | Operation | Auth | Confirm | Description |
|---|---|---|---|---|
create_chat_file_upload_link |
POST /common/chats/files/upload_links |
yes | yes | Create a one-time upload link for a chat file attachment. Upload the file with a multipart POST (field 'file') to the returned URL, then send the message with the received file_upload_id (see send_chat_message). Check get_chat_file_conditions first. Mutation: requires confirm=True. |
create_chat_without_vacancy |
POST /common/chats/without_vacancy |
yes | yes | Get an existing chat or create a new one bound to a resume without a specific vacancy (resume_hash is required, an optional first_message opens the conversation). Mutation: requires confirm=True. |
delete_chat_message |
DELETE /common/chats/{chat_id}/messages/{message_id} |
yes | yes | Delete your own message from a chat. Mutation: requires confirm=True. |
get_chat_file_conditions |
GET /common/chats/files/conditions |
yes | – | Get conditions for files attached to chat messages: allowed formats, size limits and other constraints. |
get_chat_participants |
GET /common/chats/{chat_id}/participants |
yes | – | List participants of the chat: the applicant and employer managers involved in the conversation. |
get_unread_counters |
GET /common/chats/counters/unread |
yes | – | Get the number of unread chats for the current user (total and with new messages). |
leave_chat |
PUT /common/chats/{chat_id}/leave |
yes | yes | Leave the given chat. Mutation: requires confirm=True. |
list_chat_messages |
GET /common/chats/{chat_id}/messages |
yes | – | List messages of a chat, starting from start_message_id in the given order (next or prev) with a limit (default 10). |
list_chats |
GET /common/chats |
yes | – | List chats of the current user (applicant or employer) with pagination and filters: unread only, with text messages, by vacancy status or explicit vacancy ids. |
mark_chat_message_read |
PUT /common/chats/{chat_id}/message/{message_id}/read |
yes | yes | Mark the message as the last viewed one in the chat (updates unread counters). Mutation: requires confirm=True. |
send_chat_message |
POST /common/chats/{chat_id}/messages |
yes | yes | Send a message to a chat: either a text message ({"text": "..."}) or a file ({"file_upload_id": "..."} from create_chat_file_upload_link). Mutation: requires confirm=True. |
set_chat_write_possibility |
PUT /common/chats/{chat_id}/write_possibility |
yes | yes | Enable or disable the applicant's right to write messages in the chat (employer side; applicant_write_possibility is sent as a query parameter). Mutation: requires confirm=True. |
update_chat_message |
PUT /common/chats/{chat_id}/messages/{message_id} |
yes | yes | Edit the text of your own message in a chat. Mutation: requires confirm=True. |
update_chat_participants |
PUT /common/chats/{chat_id}/participants |
yes | yes | Add an employer manager to the chat (body: manager id). Mutation: requires confirm=True. |