List workspaces and channels
Use the Social Service HTTP API to query workspaces and publishable channels
This guide is for developers who want to use the HTTP API to query workspaces available to the current API key user, and to list publishable channels under a specific workspace.
Endpoint
POST /api/social/v1/accountProduction URL:
https://sogrowly.com/api/social/v1/accountAuthentication
Requests require a Bearer Social API key. The API key must include the social:channels:read permission:
Authorization: Bearer sma_live_xxx
Content-Type: application/jsonCommon Response
All responses use the same structure. data is always an object and defaults to {}:
{
"status": "success",
"statusCode": 200,
"data": {},
"message": "",
"meta": {
"version": "v1"
}
}status values:
success -> The request succeeded
warning -> The HTTP request succeeded, but the business result has partial failures or requires caller attention
failed -> The request failed, and the HTTP status code is also an error codeList Workspaces
Request body:
{
"action": "list_workspaces"
}Example:
curl https://sogrowly.com/api/social/v1/account \
-H "Authorization: Bearer sma_live_xxx" \
-H "Content-Type: application/json" \
-d '{"action":"list_workspaces"}'Successful response:
{
"status": "success",
"statusCode": 200,
"data": {
"workspaces": [
{
"id": "sws_123",
"ownerUserId": "user_123",
"organizationId": "",
"organizationName": "Personal",
"organizationType": "individual",
"createdByUserId": "user_123",
"name": "My Workspace",
"slug": "my-workspace",
"description": "",
"createdAt": "1760000000000",
"updatedAt": "1760000000000",
"currentUserRole": "owner"
}
]
},
"message": "Workspaces loaded.",
"meta": {
"version": "v1"
}
}Later channel queries and publish requests require workspaces[].id as the workspaceId.
List Channels
Request body:
{
"action": "list_channels",
"workspaceId": "sws_123"
}Optional platform filter:
{
"action": "list_channels",
"workspaceId": "sws_123",
"platform": "x"
}Example:
curl https://sogrowly.com/api/social/v1/account \
-H "Authorization: Bearer sma_live_xxx" \
-H "Content-Type: application/json" \
-d '{"action":"list_channels","workspaceId":"sws_123","platform":"x"}'Successful response:
{
"status": "success",
"statusCode": 200,
"data": {
"workspaceId": "sws_123",
"channels": [
{
"id": "sch_123",
"workspaceId": "sws_123",
"accountId": "sacct_123",
"platform": "x",
"providerChannelId": "provider_user_123",
"name": "Example",
"handle": "example",
"avatarUrl": "https://example.com/avatar.png",
"isDefault": true,
"status": "active",
"metadata": {},
"createdAt": "1760000000000",
"updatedAt": "1760000000000"
}
]
},
"message": "Channels loaded.",
"meta": {
"version": "v1"
}
}The publish API requires targets[].channelId. Developers should choose the target channel from channels[].id.
Common Errors
Missing workspaceId:
{
"status": "failed",
"statusCode": 400,
"data": {},
"message": "Request body is invalid.",
"error": {
"code": "invalid_payload",
"message": "Request body is invalid.",
"details": {
"issues": [
{
"code": "invalid_type",
"path": "workspaceId",
"message": "Invalid input: expected string, received undefined"
}
]
}
},
"meta": {
"version": "v1"
}
}API key missing the channel read permission:
{
"status": "failed",
"statusCode": 403,
"data": {},
"message": "API key requires \"social:channels:read\" permission.",
"error": {
"code": "workspace_permission_denied",
"message": "API key requires \"social:channels:read\" permission."
},
"meta": {
"version": "v1"
}
}Status Codes and Rate Limits
200 -> success or warning
400 -> Invalid request body, invalid parameters, or platform/channel mismatch
401 -> API key is missing, malformed, invalid, or expired
403 -> API key permission is insufficient, or workspace permission is insufficient
404 -> Workspace/channel does not exist
429 -> Rate limited by userId
500 -> Configuration error or unknown errorCurrent rate limit:
Each resolved userId can make up to 15 requests per minute.
The account and post endpoints share this rate limit.