> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Report

> Submit a content report for an entity, comment, or chat message

Submits a report on an entity, comment, or chat message. If an **open** report already exists for the target, the authenticated user's report is added to it (increments `reporterCount`). If the same user already reported that open report, a `200` is returned without creating a duplicate.

Resolved reports (`dismissed` / `actioned`) are closed: a later report of the same target creates a **new** report rather than reopening the old one. A target therefore has at most one open report at a time, alongside any number of resolved ones.

**Authentication required.** **Rate limit**: 25 requests per 5 minutes.

## Body Parameters

<ParamField body="targetId" type="string" required>
  The UUID of the entity, comment, or chat message being reported. For a
  message this is the message id — the conversation is resolved server-side,
  so no `conversationId` is needed.
</ParamField>

<ParamField body="targetType" type="string" required>
  The type of content being reported. One of: `entity`, `comment`, `message`.
</ParamField>

<ParamField body="reason" type="string" required>
  The reason for the report. Must be one of: `spam`, `inappropriateContent`,
  `harassment`, `misinformation`, `hateSpeech`, `violence`, `illegalActivity`,
  `selfHarm`, `other`. Any other value is rejected with `report/invalid-body` —
  use `other` plus `details` for anything the taxonomy doesn't cover.
</ParamField>

<ParamField body="details" type="string">
  Optional additional context or description provided by the reporter.
</ParamField>

## Response

Returns `201 Created` when a new report is created:

```json theme={null}
{ "message": "Report submitted successfully", "code": "report/created" }
```

Returns `200 OK` when an existing report is updated with a new reporter:

```json theme={null}
{ "message": "Report updated successfully", "code": "report/updated" }
```

Returns `200 OK` when the user has already reported this target:

```json theme={null}
{ "message": "Report already registered by this user", "code": "report/already-reported" }
```

## Error Responses

<AccordionGroup>
  <Accordion title="Target Not Found — 404">
    ```json theme={null}
    { "error": "<targetType> not found", "code": "report/target-not-found" }
    ```

    The error message reflects the reported type, e.g. `"entity not found"` or `"comment not found"`.
  </Accordion>

  <Accordion title="Self Report — 400">
    ```json theme={null}
    { "error": "You cannot report your own <targetType>.", "code": "report/self-report" }
    ```

    A user cannot report content they authored.
  </Accordion>

  <Accordion title="Not a Conversation Member — 403">
    ```json theme={null}
    { "error": "You are not a member of this conversation.", "code": "chat/not-a-member" }
    ```

    Only members of a conversation may report a message in it. Applies to
    `targetType: "message"` only.
  </Accordion>

  <Accordion title="Invalid Body — 400">
    ```json theme={null}
    { "error": "...", "code": "report/invalid-body" }
    ```

    Returned for a malformed `targetId`, an unknown `targetType`, or a `reason`
    outside the accepted set.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.