Creating a Channel in a Community
Endpoint Overview
Create a new channel under a specified community associated with your organization.
- HTTP Method:
POST - Endpoint URL:
https://api.trywhiteowl.com/api/v1/communities/channel - Authentication: Bearer Token (API Key)
Request Headers
Section titled “Request Headers”| Header | Type | Required | Description |
|---|---|---|---|
Authorization |
String | Yes | Bearer token format: Bearer YOUR_API_KEY |
Content-Type |
String | Yes | application/json |
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
id |
Number | Yes | The numeric identifier of the community where the channel will be created. |
channel |
String | Yes | The name of the channel to create. |
Example Payload:
{ "id": 101, "channel": "announcements"}Code Examples
Section titled “Code Examples”cURL
curl -X POST "https://api.trywhiteowl.com/api/v1/communities/channel" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": 101, "channel": "announcements" }'JavaScript (Fetch)
const options = { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ id: 101, channel: 'announcements' })};
fetch('https://api.trywhiteowl.com/api/v1/communities/channel', options) .then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error(err));Python (Requests)
import requests
url = "https://api.trywhiteowl.com/api/v1/communities/channel"headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}payload = { "id": 101, "channel": "announcements"}
response = requests.post(url, headers=headers, json=payload)print(response.json())Response Structure
Section titled “Response Structure”Success Response (200 OK)
{ "success": true, "message": "Channel created successfully", "data": { "id": 204, "communityId": 101, "name": "announcements", "created_at": "2026-09-16T22:57:00Z" }}Error Responses
- Validation / Internal Error:
{ "success": false, "message": "There was an error creating channel"}