Authentication
Send both headers on every request:
| Header | Meaning |
|---|---|
x-api-key | Your partner API key, issued per organization. Treat it as a secret. |
x-mealco-org-id | The organization the call acts on behalf of. |
They are required together, and the organization id must be the organization the key belongs to. A mismatch is rejected with 401. It is not silently treated as a request for the key's own organization. Send the organization id exactly as it was issued, in lowercase.
Scope
A credential is scoped to exactly one organization. No request parameter widens that scope, which is why organizationId never appears in a request body: an operation cannot be pointed at data the credential does not already reach.
Handling keys
- Keep the key server-side. It is a bearer credential: anyone who holds it can act as you.
- Rotate by requesting a new key, moving traffic to it, then retiring the old one. Both are live during the overlap, so a rotation needs no downtime window.
- If a key is exposed, contact support@yoursouschef.com immediately. A compromised key is revoked, not rotated on a schedule.
What a failure looks like
401: the key or the organization id is missing, the key is unknown or revoked, the two do not match, or your organization is not set up for this API.403: the key is valid but is not permitted to use this API. Contact support@yoursouschef.com.429: your organization is over its rate limit. The limit is per organization, not per key. See Errors and retries.