Authentication
Every public API call carries one credential in the Authorization header. There are
two kinds, and they are presented identically.
Get your API key
Section titled “Get your API key”Open Sharek and go to Settings.
-
Open the Developers section.
-
Find the API Key card. The key is masked; Reveal shows it and Copy puts it on your clipboard.
The key belongs to the organization, not to you personally. Anyone calling with it acts as the whole organization.
Present the key
Section titled “Present the key”Put the raw key in the Authorization header. There is no Bearer prefix:
curl -H "Authorization: your-api-key" \ https://dash.sharek.app/api/public/v1/is-connectedA working key answers:
{ "connected": true }That call is check your credentials, the quickest way to confirm that your key works. To see who it acts for, get the current account.
OAuth tokens
Section titled “OAuth tokens”If you are building a product that schedules on behalf of other Sharek accounts, do
not ask them for their API key. Register an OAuth app instead and exchange the
authorization code for an access token. Those tokens are prefixed pos_ and go in the
same header:
curl -H "Authorization: pos_your_oauth_token" \ https://dash.sharek.app/api/public/v1/integrationsAn OAuth token reaches exactly the same operations as an API key. Full flow on OAuth apps.
Authentication failures
Section titled “Authentication failures”All four are HTTP 401 with a msg body. The message tells you which stage rejected
you:
| Response | Meaning |
|---|---|
{"msg": "No API Key found"} |
No Authorization header at all. |
{"msg": "Invalid API key"} |
A header was sent, but no organization has that key. Check for a stray Bearer , whitespace, or a rotated key. |
{"msg": "Invalid OAuth token"} |
The value started with pos_ but does not match a live token. It may have been revoked, or its app deleted. |
{"msg": "No subscription found"} |
The credential is valid, but the organization has no active subscription for API access. |
Rotate a key
Section titled “Rotate a key”The API Key card has a Rotate Key button. Rotating takes effect immediately: the old key stops working the moment the new one is issued.
Everything holding the old key breaks at once, so update them in the same sitting:
scripts and scheduled jobs, the CLI (SHAREK_API_KEY or a fresh sharek auth:login),
any MCP client configuration, and your n8n credential.
Rotating an API key does not affect pos_ OAuth tokens. Those are revoked under
Settings → Apps → Approved Apps instead.
Placeholders on these pages
Section titled “Placeholders on these pages”Every example on this site uses obviously fake credentials: your-api-key for API keys
and pos_your_oauth_token for OAuth tokens. Substitute your own when you run them, and
keep the real values out of anything you share.