---
title: "Lock conversation"
method: POST
path: "/conversations/{id}/lock"
tags: ["conversations"]
---

# Lock conversation

`POST /conversations/{id}/lock`

Lock a conversation to prevent any new messages.

Use this endpoint when a conversation should be closed after resolution.

Behavior:
- Only conversation participants may lock a conversation.
- Returns the conversation state after the lock operation.

## Path parameters

- `id` string, required — Conversation ID

## Response `200`

Conversation locked

- object
  - `id` string, required — Unique identifier for the conversation
  - `source` object, required — Conversation source
    - `type` 'ORDER' | 'CASE', required — Source type
    - `id` string, required — Source identifier
  - `userA` object, required — First participant
    - `id` string, required — Unique identifier for the user
    - `username` string, required — Public username of the user
    - `joined` string, date-time — ISO timestamp when the user account was created
    - `avatar` string, uri — URL to the user's avatar image
    - `cover` string, uri — URL to the user's cover image
    - `profile` string — Information about the user
    - `reviews` integer, required — Total number of reviews the user has received
    - `rating` number, required — Confidence-based rating between 0 and 5
    - `score` number, required — Average rating between 0 and 5
    - `sales` integer, required — Total number of sales the user has made
    - `purchases` integer, required — Total number of purchases the user has made
  - `userB` object, required — Second participant
    - `id` string, required — Unique identifier for the user
    - `username` string, required — Public username of the user
    - `joined` string, date-time — ISO timestamp when the user account was created
    - `avatar` string, uri — URL to the user's avatar image
    - `cover` string, uri — URL to the user's cover image
    - `profile` string — Information about the user
    - `reviews` integer, required — Total number of reviews the user has received
    - `rating` number, required — Confidence-based rating between 0 and 5
    - `score` number, required — Average rating between 0 and 5
    - `sales` integer, required — Total number of sales the user has made
    - `purchases` integer, required — Total number of purchases the user has made
  - `locked` boolean, required — Whether the conversation is locked
  - `createdAt` string, nullable — Timestamp when the conversation was created
  - `updatedAt` string, nullable — Timestamp when the conversation was last updated
  - `lastMessage` object — Latest message in the conversation
    - `id` string, required — Unique identifier for the message
    - `conversationId` string, required — Conversation this message belongs to
    - `sender` object, required — User that sent the message
      - `id` string, required — Unique identifier for the user
      - `username` string, required — Public username of the user
      - `joined` string, date-time — ISO timestamp when the user account was created
      - `avatar` string, uri — URL to the user's avatar image
      - `cover` string, uri — URL to the user's cover image
      - `profile` string — Information about the user
      - `reviews` integer, required — Total number of reviews the user has received
      - `rating` number, required — Confidence-based rating between 0 and 5
      - `score` number, required — Average rating between 0 and 5
      - `sales` integer, required — Total number of sales the user has made
      - `purchases` integer, required — Total number of purchases the user has made
    - `body` string, required — Content of the message
    - `createdAt` string, nullable — Timestamp when the message was created
    - `viewedAt` string, nullable — Timestamp when the message was viewed
    - `attachments` MessageAttachment[] — Images attached to the message
      - `id` string, required — Attachment identifier
      - `imageId` string, required — Cloudflare image identifier
      - `url` string, uri, required — Public URL for the attachment

## Other responses

- `404` — Conversation not found

---

[API](https://skmtc.net/managem/apis/managem-api.md) · [All operations](https://skmtc.net/managem/apis/managem-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/managem/managem-api/versions/e8d78a3a2e8b/schema)
