---
title: "Execute a recoverable post command"
method: POST
path: "/v1/posts/commands"
tags: ["posts"]
---

# Execute a recoverable post command

`POST /v1/posts/commands`

## Request

- Base URL: `https://app.legend.trade/api/rest`
- URL: `https://app.legend.trade/api/rest/v1/posts/commands`
- Auth: HTTP bearer

## Request body

- object
  - `operationId` string, uuid, required: Keep this UUID and the exact input for retries after an unknown outcome. Use a new UUID for a new intent.
  - `command` union, required
    - object
      - `id` string, uuid, required
      - `content` string, nullable
      - `attachmentIds` string[]
      - `clanId` unknown
      - `kind` 'createPost', required
    - object
      - `require_position` boolean
      - `content` string, nullable
      - `chart_symbol` string, required
      - `chart_timestamp` string, required
      - `trade_action` 'close' | 'flip' | 'add' | 'reduce'
      - `attachmentIds` string[]
      - `kind` 'createChartNote', required
    - object
      - `postId` string, uuid, required
      - `content` string, required
      - `attachmentIds` string[]
      - `messageType` 'text' | 'audio'
      - `clientMessageId` string, uuid, required
      - `replyToId` string, uuid
      - `kind` 'createComment', required
    - object
      - `kind` 'forwardComment', required
      - `postId` string, uuid, required
      - `sourceMessageId` string, uuid, required
      - `clientMessageId` string, uuid, required
      - `comment` string
    - object
      - `kind` 'setPostLiked', required
      - `postId` string, uuid, required
      - `liked` boolean, required
    - object
      - `kind` 'setCommentLiked', required
      - `postId` string, uuid, required
      - `messageId` string, uuid, required
      - `liked` boolean, required
    - object
      - `kind` 'deletePost', required
      - `postId` string, uuid, required
    - object
      - `kind` 'deleteComment', required
      - `postId` string, uuid, required
      - `messageId` string, uuid, required
    - object
      - `kind` 'editComment', required
      - `postId` string, uuid, required
      - `messageId` string, uuid, required
      - `content` string, required

## Response `200`

Successful response

- PostCommandReceipt
  - `operationId` string, uuid, required
  - `status` 'succeeded' | 'rejected', required
  - `result` PostCommandResult, required
    - `postId` string, uuid, required
    - `messageId` string, uuid
    - `commentMessageId` string, uuid
    - `chatRoomId` string, uuid, nullable
    - `liked` boolean
    - `likeCount` integer
    - `revision` string
    - `commentsRevision` string
  - `error` object, nullable, required
    - `code` string, required
    - `message` string, required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `500`: Internal server error

## Changes

- **2026-10-19** `a1df32202e48`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/legend/apis/legend-api/changes/v1/posts/commands/post.md)

---

[API](https://skmtc.dev/legend/apis/legend-api.md) - [All operations](https://skmtc.dev/legend/apis/legend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/legend/apis/legend-api/revisions/c3e45061cf81?raw)
