Every request carries an API key in the Authorization header. There is no other way to authenticate.
The IQCore API is in private beta. To join, ask through Support in your dashboard or on the contact page.
The Bearer header
curl "https://iqcore.ai/api/public/v1/me" -H "Authorization: Bearer $IQCORE_KEY"const res = await fetch("https://iqcore.ai/api/public/v1/me", {
headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});import os
import requests
res = requests.get("https://iqcore.ai/api/public/v1/me",
headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"})Never send a key in a URL. A request with iqk_live_ or iqk_test_ anywhere in its query string is refused with 400 key_in_url before anything else happens. The key is not looked up, but it may already sit in a log of your own proxy or tool. Rotate it (see below).
The API sets no cookies and has no sessions. It does not accept browser requests from other sites (no CORS), so call it from a server, not from a web page.
| Missing or wrong | Answer |
|---|---|
No Authorization header |
401 missing_api_key |
| Key unknown or malformed | 401 invalid_api_key |
| Key revoked | 401 api_key_revoked |
| Key expired (or its rotation grace ended) | 401 api_key_expired |
Every 401 carries WWW-Authenticate: Bearer realm="IQCore API".
Key format
A key is iqk_live_ or iqk_test_ followed by 40 letters and digits. For example, iqk_live_XXXX.... The dashboard shows only the first characters and the last four afterwards (iqk_live_Ab3dE9...wXyZ), so you can tell keys apart.
IQCore stores a one-way hash of the key, never the key. If you lose it, nobody can show it to you again. Make a new one.
Where keys are made
In IQCore, go to Settings → Apps & integrations → API keys.
- Choose Create key and name it (up to 60 characters).
- Choose live or test, the rights (scopes), the organizations and, for a live key of an organization owner, the approval mode.
- Confirm with your password.
- Copy the secret. It is shown once, in that dialog only.
You can make keys only if you are an owner or admin of every organization the key will reach. A member can make keys only if the owner switched on "Members may create API keys". A viewer cannot hold a key. The plan decides how many keys an organization may hold and whether live keys are allowed (a Spark plan allows test keys only). See Rate limits.
Rotate a key
Rotating gives you a new secret with the same name, rights and organizations. Only the login that owns the key can rotate it, with their password.
- 24-hour grace (default): the old secret keeps working for 24 hours, so you can change your deployment without downtime. A key in its grace period does not count against the key limit.
- Now: the old secret stops at once. Choose this if the key may have leaked.
Revoke a key
Revoking ends a key immediately. The login that owns the key can revoke it, and so can a person who is owner or admin of every organization the key reaches. An owner or admin of only some of them (for example a client's admin and an agency's key) can only remove their own organization from the key; the key keeps working in the others. Owners and admins see every key of their organization. Members see only their own.
What ends keys by itself
A key is revoked automatically when:
- its login changes the password;
- its login changes the e-mail address;
- its login turns two-step sign-in off;
- the login is suspended, becomes IQCore staff, or is deleted;
- the login is removed from the organization (the organization leaves the key; a key with no organization left is revoked).
After one of these, make a new key.
A key can also be paused rather than revoked: a suspended organization answers 403 organization_suspended, and a plan downgrade can answer 403 plan_limit for the newest keys when an organization holds more keys than its plan allows.
The role check on every request
IQCore checks the whole path on every request. Nothing about who you are is cached inside the key.
- The login is active, not suspended and not staff.
- The login is still a member of the organization, and has its current role.
- The role may hold a key: viewers hold no key, and members only if the owner allows it. Otherwise
403 team_role. - The organization is active and its plan allows the API (
403 plan_requiredif not).
Scopes
A scope is a right you give a key when you make it. The key's effective right is the key's scopes combined with the login's current role. A scope the role is too low for does nothing. A write scope also gives its read scope.
An operation that needs a scope the key does not have answers 403 missing_scope with required_scope.
| Scope | What it allows | Lowest role |
|---|---|---|
account.read | See plan, credits and usage. Organizations, plan and limits, credit balance and history, usage, prices and quotes, the list of monthly reports, the AI Chat prompt library, help and the account check. Always on. | viewer |
social.read | See social media. Channels, posts, the calendar, content plans, social settings and the events feed. | viewer |
media.read | See the Media library. Pictures, videos and voice-overs, their jobs, Studio projects and the model lists. | viewer |
inbox.read | See inbox counts. How many conversations are open, never the messages. | viewer |
whatsapp.read | See WhatsApp. WhatsApp numbers, message templates with their texts, campaigns and insights (counts). Never the chats or the phone numbers of customers. | viewer |
support.read | See support tickets and notifications. Your support tickets with their messages, and the notifications (the bell) of the key's login. | viewer |
settings.read | See settings. The e-mail sender and the inbox settings, with the names, roles and availability of team members. Never sign-in or security settings. | viewer |
contacts.read | See contacts. Read your contacts. Personal data: give it only to tools you trust. | viewer |
stores.read | See connected stores. Read the stores connected to this organization. | viewer |
social.write | Prepare posts. Create, change and delete drafts, ask for approval, set the time of an approved post. | member |
media.write | Add to and organise the Media library. Add files (from a link too), rename, tag and move files and collections, mark pictures as favourites and make quick video edits. Never deletes. | member |
media.delete | Delete from the Media library. Delete any file, picture or voice-over of the organization, also ones the key did not add. No undo. Owners and admins only. | admin |
create.spend | Create images, video and voice. Spends credits, at the dashboard price and inside the daily limits. | member |
studio.write | Edit in IQCore Studio. Create, edit and export video projects. | member |
social.publish | Approve and publish posts. Publish now and cancel scheduled posts. Owners and admins only. | admin |
settings.write | Change settings and AI switches. WhatsApp, report and social inbox settings, and the AI switches: AI auto-replies on social channels and WhatsApp numbers, AI suggestions in the monthly report. Once on, these spend credits by themselves, outside max_credits and the daily credit caps of the key. Owners and admins only. | admin |
Choose the fewest scopes a tool needs. You can narrow a key later on the API keys page (its own login, or an owner or admin of every organization it reaches). Widening needs the key's own login (or the owner of every organization it reaches).
Test keys
A test key reads your real channels and media, but every post it creates is a sandbox post, and apart from its own sandbox posts and new media files it changes nothing and spends no credits (403 sandbox_forbidden). See Test keys and dry run.
Next: Errors, Rate limits, Test keys and dry run.