POST /v1/posts
Service: community · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"author_id": {
"type": "string",
"minLength": 1
},
"brand_id": {
"type": "string",
"minLength": 1
},
"community_slug": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"is_broadcast": {
"type": "boolean"
},
"pinned_for_hours": {
"type": "integer",
"minimum": 1,
"maximum": 168
},
"media_urls": {
"type": "array",
"items": {}
}
},
"required": [
"author_id",
"brand_id",
"content"
]
}Responses
201 Post created
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author_id": {
"type": "string"
},
"brand_id": {
"type": "string"
},
"content": {
"type": "string"
},
"score": {
"type": "integer"
},
"reaction_counts": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"media_urls": {
"type": "array",
"items": {}
},
"moderation_status": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"edited_at": {
"type": [
"string",
"null"
]
},
"edit_window_ends_at": {
"type": "string"
},
"is_broadcast": {
"type": "boolean"
},
"broadcast_role": {
"type": [
"string",
"null"
]
},
"pinned_until": {
"type": [
"string",
"null"
]
},
"pinned_by_staff_at": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"author_id",
"brand_id",
"content",
"score",
"reaction_counts",
"tags",
"metadata",
"media_urls",
"moderation_status",
"created_at",
"updated_at",
"edited_at",
"edit_window_ends_at",
"is_broadcast",
"broadcast_role",
"pinned_until",
"pinned_by_staff_at"
]
}400 Validation error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}403 Broadcast permission denied
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}429 Rate limit exceeded
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}502 Unable to resolve staff role
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://community.platform.loop.health/v1/posts \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/community— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced