Establishments and accounts
Get an API keyEndpoints
GET/v1/establishmentsGET/v1/establishments/{id}/accountsPOST/v1/establishments/{id}/connection-linksAn establishment is a business, a brand or a place with its own networks, media and posts. A Workspace holds one or several.
Connected accounts
GET /v1/establishments/{id}/accounts lists the connected networks: platform, handle, name, avatar and status. Sofia never hands out the token of a network.
Connect a missing network
Create a hosted connection link and send the owner to it. The link is valid for 30 minutes; at the end, Sofia brings them back to your redirectUrl when Sofia recognizes its origin.
curl -X POST https://api.sofia-post.com/api/v1/establishments/$ESTABLISHMENT_ID/connection-links \
-H "Authorization: Bearer $SOFIA_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"platform":"linkedin","redirectUrl":"https://app.example.com/sofia/connected"}'A network already connected answers 409 account_already_connected; a network Sofia does not offer answers 422 platform_not_offered.