The minimalistic document archiving platform.
docs(api-endpoints): added explications on how to use api keys (#515)
Corentin Thomasset04990b986e04
diff --git a/apps/docs/src/content/docs/04-resources/03-api-endpoints.mdx b/apps/docs/src/content/docs/04-resources/03-api-endpoints.mdxindex 6a1bbdb1..17c8b9fd 100644--- a/apps/docs/src/content/docs/04-resources/03-api-endpoints.mdx+++ b/apps/docs/src/content/docs/04-resources/03-api-endpoints.mdx@@ -17,6 +17,31 @@ The public API uses a bearer token for authentication. You can get a token by lo</details>++To authenticate your requests, include the token in the `Authorization` header with the `Bearer` prefix:++```+Authorization: Bearer YOUR_API_TOKEN+```++### Examples++**Using cURL:**+```bash+curl -H "Authorization: Bearer YOUR_API_TOKEN" \+ https://api.papra.app/api/organizations+```++**Using JavaScript (fetch):**+```javascript+const response = await fetch('https://api.papra.app/api/organizations', {+ headers: {+ 'Authorization': 'Bearer YOUR_API_TOKEN',+ 'Content-Type': 'application/json'+ }+})+```+### API Key PermissionsWhen creating an API key, you can select from the following permissions: