---
updatedAt: 2026-06-02T09:24:57.000Z
agentTools:
  projectIndex: https://developers.smartrecruiters.com/llms.txt
---

# Delete a message

Delete a message with a given id. Deleted message is no longer visible on Hireloop.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "1",
    "title": "Messages API",
    "contact": {
      "name": "SmartRecruiters",
      "url": "https://developers.smartrecruiters.com"
    }
  },
  "tags": [
    {
      "name": "messages"
    }
  ],
  "paths": {
    "/messages/shares/{id}": {
      "delete": {
        "responses": {
          "204": {
            "description": "Message successfully deleted"
          },
          "403": {
            "description": "No permission to delete a message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Message not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Delete a message with a given id. Deleted message is no longer visible on Hireloop.",
        "tags": [
          "messages"
        ],
        "summary": "Delete a message",
        "operationId": "messages.shares.delete",
        "security": [
          {
            "key": []
          },
          {
            "oauth": [
              "messages_manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MessageId"
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "MessageId": {
        "in": "path",
        "description": "identifier of a message",
        "name": "id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-smarttoken"
      },
      "oauth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://www.smartrecruiters.com/identity/oauth/allow",
            "tokenUrl": "https://api.smartrecruiters.com/identity/oauth/token",
            "scopes": {
              "messages_write": "Message Users",
              "messages_manage": "Manage Messages",
              "messages_read": "Access Messages"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.smartrecruiters.com"
    }
  ]
}
```