POST /v1/drafts

Service: community · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "target_community_slug": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "attachments_jsonb": {}
  }
}

Responses

201 Draft created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "target_community_slug": {
      "type": [
        "string",
        "null"
      ]
    },
    "body": {
      "type": [
        "string",
        "null"
      ]
    },
    "attachments_jsonb": {},
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "user_id",
    "target_community_slug",
    "body",
    "updated_at"
  ]
}

400 Validation error

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

Example

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