Quickstart
Four requests take you from nothing to a saved draft on one of your accounts. The draft sends nothing, so it is safe to run against a real account.
1. Create an API key
Open API keys in your workspace and create a key with the read and write scopes. It is shown once, so store it before you close the dialog. The examples read it from an environment variable.
export ANTWORK_API_KEY="ak_a1b2c3d4e5f6a7b8_<secret>"2. Find an account id
Creating a post takes account ids, and this is where they come from. Copy the id of the account you want to post to.
curl https://antwork.io/api/v1/accounts \
-H "Authorization: Bearer $ANTWORK_API_KEY"3. Save a draft
"draft": true saves the post and sends nothing, which is why a write key is enough. Leave it out, with a key that has publish, when you want the post to go out.
curl https://antwork.io/api/v1/posts \
-H "Authorization: Bearer $ANTWORK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"accounts": ["acc_linkedin"],
"text": "Hello from the Antwork API.",
"draft": true
}'4. Check the post
Use the id from the response. A draft stays draft. A post that goes out moves to published, with publishedUrl saying where it landed, or to failed, with error saying why.
curl https://antwork.io/api/v1/posts/pQ7x... \
-H "Authorization: Bearer $ANTWORK_API_KEY"https://api.antwork.io/mcp as a connector. The MCP server page has the steps for each client. MCP →