For AI agents: markdown of this page — /docs-content-en/chats/messages/personal-pins-delete.md documentation index — /llms.txt

Remove a personal pin

DELETE /v1/chats/messages/:messageId/pin/personal

Removes a message from the current user’s personal pins in the chat where the message was sent.

Parameters

Parameter Type Required Description
ParametermessageId (path) Typeinteger Requiredyes DescriptionMessage id from message history

Requires the im scope. The credentials identify the current user. The API rejects parameters that specify the owner and any unknown parameters.

The body may be absent or {}. No body fields or query parameters are accepted. Use an API key with write access.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/messages/845/pin/personal" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/messages/845/pin/personal" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/845/pin/personal', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const { data } = await res.json()
console.log(data)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/845/pin/personal', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { data } = await res.json()
console.log(data)

Response

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue
Fielddata Typearray DescriptionEmpty array — the command succeeded

Response example

JSON
{
  "success": true,
  "data": []
}

Error response example

400 — unexpected parameter:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Query parameter `ownerId` is not accepted by DELETE /v1/chats/messages/:messageId/pin/personal. It takes no query parameters."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionMalformed ID, or an unexpected or repeated parameter or body field
HTTP422 CodeBITRIX_ERROR Descriptionerror.b24Code is MESSAGE_NOT_FOUND — there is no message with this id
HTTP401 CodeMISSING_API_KEY DescriptionNo API key was provided
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 credentials are configured
HTTP403 CodeSCOPE_DENIED DescriptionThe key does not have im scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe current user has no access
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key cannot change Bitrix24 data
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe record was not found
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refused the operation with another code, which is in error.b24Code

Common API errors.

Known specifics

If the message is not among personal pins, the response is the same: data: [].

See also