Forum Threads (List/Create)
Use these endpoints to read and create forum threads for a forum channel.
List Threads
Request
- Method:
GET - URL:
https://chattz.net/api/v1/channels/{FORUM_CHANNEL_ID}/threads - Auth: Required (the community API key)
Path parameters:
FORUM_CHANNEL_ID(required): 12-digit channel ID
Query parameters:
limit(optional):1-100, default50offset(optional):>=0, default0
Success Fields
forum_channel_idlimitoffsetthread_channel_ids(array)
Example
curl "https://chattz.net/api/v1/channels/123456789012/threads?limit=25&offset=0" \
-H "X-Chattz-Api-Key: YOUR_KEY"
Create Thread
Request
- Method:
POST - URL:
https://chattz.net/api/v1/channels/{FORUM_CHANNEL_ID}/threads - Auth: Required (the community API key)
Path parameters:
FORUM_CHANNEL_ID(required): 12-digit channel ID
JSON body:
title(required, string)content(required, string)external_user(optional, object)external_user.username(required ifexternal_useris provided)external_user.avatar(required ifexternal_useris provided, data URL)
Success
- HTTP
201 code: "thread_created"threadobject (IDs, title, timestamps, first message, and related fields)
Example
curl -X POST "https://chattz.net/api/v1/channels/123456789012/threads" \
-H "Content-Type: application/json" \
-H "X-Chattz-Api-Key: YOUR_KEY" \
-d '{
"title": "Release Notes",
"content": "Thread starter message",
"external_user": {
"username": "Webhook Bot",
"avatar": "data:image/png;base64,..."
}
}'