Publish to Instagram and Facebook
Queue an Instagram photo or a Facebook Page post from your server, then check its publishing status.
These examples use a placeholder address. Your console shows the exact address of the API for your workspace.
Connect the account#
- In your Vendrix workspace, open Channels. Choose Connect Instagram and sign in with a professional account, or choose Connect Facebook and select a Page you manage. Allow Vendrix to publish content during Meta sign-in.
- Open the developer console, select the same workspace, create a live application, then create a key with
connections.read,publications.writeandpublications.read. Keep the key on your server. - Call
GET /connections?status=activeand copy the Vendrixidfrom the matching account. Use the connection ID in your request.
curl "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/connections?status=active" \
-H "Authorization: Bearer $VENDRIX_API_KEY"Queue a post#
Replace the sample IDs with your connection ID and a ready image asset ID from the same workspace. Instagram requires an image. Facebook can take a caption alone. Product-linked images go through the catalogue review flow in Vendrix. Reuse the same idempotency key when retrying the same post.
curl -X POST "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/publications" \
-H "Authorization: Bearer $VENDRIX_API_KEY" \
-H "Idempotency-Key: new-arrivals-1" \
-H "Content-Type: application/json" \
-d '{
"connection_id": "a6e7369f-b1a5-47b7-a990-6d4c916aa66e",
"media_asset_id": "eac7edcb-9c30-4fa4-becd-fb92b73d6ee9",
"caption": "New arrivals are in."
}'Check the result#
HTTP 202 means the post was queued. Use the response id as the job ID. A succeeded job includes the Meta post ID when available. If the job fails, check the connection and its publishing permissions in Vendrix before submitting a new request.
curl "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/publications/JOB_ID" \
-H "Authorization: Bearer $VENDRIX_API_KEY"See the full publications endpoint reference for required fields, statuses and errors.