Quickstart

Get an API key

1. Create a personal key

In the Sofia app, open Settings › API, tab Personal access, and create a key. Choose its name, its expiry and its permissions. The key is shown once: copy it and keep it in a secret store, never in your code.

2. Make your first call

Send the key in the Authorization header. GET /v1/me tells you who the key acts for, its Workspaces and its permissions.

bash
curl https://api.sofia-post.com/api/v1/me \
  -H "Authorization: Bearer $SOFIA_API_KEY"
json
{
  "tokenType": "personal_key",
  "user": { "id": "cmo7qiltc0000sb1p7zdx1aw4" },
  "coverage": "account",
  "workspaces": [{ "id": "cmo7qiltc0000sb1p7zdx1aw4", "name": "160 food" }],
  "scopes": ["establishments:read", "posts:read", "posts:write"],
  "mode": "live",
  "expiresAt": "2026-11-09T20:09:05.644Z"
}

3. List your establishments

Every post belongs to an establishment. Note the id of the one you want to publish for.

bash
curl https://api.sofia-post.com/api/v1/establishments \
  -H "Authorization: Bearer $SOFIA_API_KEY"

Next steps

You are ready for your first post. To try any endpoint from your browser, open the API reference and press Try it.