Fix API 401 and tenant errors
Quick checks
1. Confirm the base URL and path match docs.agenstra.com OpenAPI under /spec/....
2. Send the API key in the header the docs specify. Do not put keys in query strings or tickets.
3. Ensure the key belongs to the same organization and workspace you are calling.
4. If the response is 401, rotate only after you confirm the key was copied correctly; then recreate if needed.
5. If the response indicates a wrong tenant / workspace / scope, switch to the correct workspace id from the portal.
Example shape (placeholders only)
Authorization: Bearer YOUR_API_KEY
Exact header names and resources are defined in the OpenAPI specs. Prefer those over copied blog snippets.
Cloud vs self-host
Cloud API hosts differ from your self-host base URL. Point clients at the environment you actually run.