API ReferenceapicommunityPOST /v1/posts/{post_id}/lock

POST /v1/posts/\{post_id\}/lock

Service: community · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • post_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 1
    }
  }
}

Responses

200 Post locked

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "locked_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "locked_by_user_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "locked_reason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "success",
    "locked_at",
    "locked_by_user_id",
    "locked_reason"
  ]
}

404 Post not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://community.platform.loop.health/v1/posts/{post_id}/lock \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'