Skip to main content

Make your first API request

Use the REST API to connect your software to Social Champ. You can list social accounts, schedule posts, manage your queue, and work with calendars.

Want to connect an AI assistant instead? Start with Connect an AI assistant.

1. Get an API key​

Create an API key in Social Champ. Your account needs API-key access enabled. If creation is unavailable, check your account's access with Social Champ support.

Choose your terminal below. Replace YOUR_API_KEY with your key. Keep it private and do not include it in shared scripts.

export SOCIALCHAMP_TOKEN='YOUR_API_KEY'

2. Find a social account​

curl 'https://api.socialchamp.com/v1/rest/channels' \
-H "Authorization: Bearer $SOCIALCHAMP_TOKEN"

Example response:

{
"data": [
{
"id": "6512f0a1b2c3d4e5f6a7b8c9",
"name": "My Facebook Page",
"type": "FB_PAGE",
"profileImg": null,
"workspaceId": "6512f0a1b2c3d4e5f6a7b8d0"
}
]
}

A channel is a connected social account, such as a Facebook Page. Copy its id for the next request. The IDs in these examples are placeholders.

3. Schedule a post​

Replace the channel ID and choose a future time in UTC. This request creates a real scheduled post.

curl -X POST 'https://api.socialchamp.com/v1/rest/posts' \
-H "Authorization: Bearer $SOCIALCHAMP_TOKEN" \
-H 'Content-Type: application/json' \
--data '{
"text": "Hello from my integration!",
"channelIds": ["6512f0a1b2c3d4e5f6a7b8c9"],
"isScheduled": true,
"dateTime": "2030-01-15T10:00:00Z"
}'

Read the response before sending another request. A multi-channel request can succeed on some channels and fail on others. Check scheduled, failed, and data.result rather than relying on HTTP 200 alone. See Responses and retries.

4. Check the schedule​

curl 'https://api.socialchamp.com/v1/rest/posts/scheduled?limit=25' \
-H "Authorization: Bearer $SOCIALCHAMP_TOKEN"

Next steps​

Use POST /posts for new integrations. The older POST /post remains available with a different request format.