How to create an API key
A MagicPost API key lets an AI assistant or your own code act on your MagicPost account. You create a key in the app: open the profile menu, select Settings, then open the API & MCP tab. API keys are included in the Creator, Agency, and Team plans and during the MagicPost free trial. The Growth plan does not include API keys.
You create a MagicPost API key to call the MagicPost REST API, and for the three assistants that the MagicPost app sets up with a key: Claude Desktop, Claude Code and Perplexity. Claude Code can also connect through a MagicPost sign-in, with no key. You do not create a key for Claude on the web, ChatGPT or Gemini. Those three assistants connect through a MagicPost sign-in, and MagicPost creates the key for you when you approve the connection.
Who can create a MagicPost API key
Creator, Agency, and Team. API keys and the MagicPost MCP server are part of these plans.
Free trial. API keys are open for as long as the MagicPost free trial lasts. A key stops working when the trial ends without a subscription to one of these plans.
Members of an organization. A member of a Agency or Team organization can create MagicPost API keys. There is one exception on Agency, where seats have types: a Growth, Analytics or Engagement seat does not include API keys. The Creator seat, which has full access, includes them.
Growth. The Growth plan does not include API keys, and MagicPost does not show the API & MCP tab to a Growth subscriber.
A subscription to a former MagicPost plan follows its own rules: see The Analytics and Starter plans. To move to a plan that includes API keys, see how to upgrade your MagicPost plan.
How to create a MagicPost API key
In MagicPost, open the profile menu and select Settings.
Open the API & MCP tab. The direct link is app.magicpost.in/settings?tab=api-keys.
Click Create a key. When the list of keys is empty, the button in the list reads Create your first key.
In the Create an API key window, fill in Key name with the tool you are connecting, for example "Claude Desktop". The name is required.
Click Create. The API key created window shows the key.
Click Copy next to the key and store the key in a safe place.
Click I've copied it, close.
A MagicPost API key starts with mp_. MagicPost shows the full key only once, in the API key created window. MagicPost stores a hash of the key, not the key, so nobody can display it again later. If you close the window without copying the key, create a new one.
What the "API key created" window gives you
Below the key, the MagicPost API key created window has one tab for each assistant, with what to paste where:
Claude Desktop: a configuration block with your key already filled in, to paste into the claude_desktop_config.json file.
Claude Code: a command with your key already filled in, to run in your terminal. Claude Code can also connect without a key, through a MagicPost sign-in: the Claude Code page of the MagicPost developer documentation describes that method.
Perplexity: the address of the MagicPost MCP server, to add as a custom connector with API key authentication.
Claude Web, ChatGPT and Gemini: the address of the MagicPost MCP server only, because these assistants need no key.
The setup for each assistant is in How to connect MagicPost to Claude, ChatGPT, Gemini and Perplexity. What a connected assistant can do in MagicPost is in What is MCP, and what can I do with it? For the product overview, see the LinkedIn MCP feature page.
How to manage and revoke your MagicPost API keys
The Your keys list in the API & MCP tab shows each active MagicPost API key with its name, its first characters, its creation date and the date it was last used. The list never shows a full key.
MagicPost API keys created by a sign-in from Claude on the web, ChatGPT or Gemini appear in the same list, under the name the assistant gave when it connected.
To revoke a MagicPost API key, click the trash icon on its row, then click Revoke in the Revoke this API key? window. The MagicPost API checks the key on every request, so a revoked key stops working right away. Revoking is permanent: a revoked key cannot be reactivated. Revoked keys stay visible in a collapsed section under the list.
A MagicPost API key does not expire. The key works until you revoke it or until the MagicPost account loses API access.
MagicPost limits the number of active API keys on one account. The MagicPost app counts every active key in the Your keys list, including the keys created by a sign-in from Claude on the web, ChatGPT or Gemini. When you reach the limit, Create a key is disabled and the API & MCP tab shows the maximum. Revoke a key or an assistant connection you no longer use to create a new key.
The MagicPost limit on active API keys only blocks Create a key in the app. A sign-in from Claude on the web, ChatGPT or Gemini is still accepted when the account is at the limit, and the key of that connection is added to the Your keys list.
What a MagicPost API key gives access to
A MagicPost API key gives access to your whole account, not to a part of it. With your key, a tool can read your drafts and your LinkedIn metrics, create and schedule posts, publish on your LinkedIn account, and use your Leads credits. Keep the key secret, and create one key per tool so that you can revoke one without stopping the others.
On a Agency or Team organization, a key created from an administrator's account also reaches the accounts of the members: it can list them, read their metrics and their posts, and create and schedule posts for them.
An agency does not need one MagicPost API key per client. A key created from the account of a member who is not an administrator is limited to that member's account.
How to use a MagicPost API key with the REST API
To call the MagicPost REST API, send the key in the Authorization header as a bearer token: the word Bearer, a space, then your key. The base address of the API is https://api.magicpost.in/api/v1/. The API reference is in the MagicPost developer documentation. It covers API keys, metrics, posts and scheduling.
A MagicPost API key alone does not upload a media file to a post through the REST API: only the MagicPost MCP server attaches a file to a draft. A direct REST call can still edit the title and the alt text of a media that is already attached.
The MagicPost API limits the number of requests per minute for each key. Refreshing LinkedIn posts and detecting leads have a stricter limit per minute. Publishing and scheduling a post have their own limit per minute. Post generation has its own limits per minute, per day and per week. Over a limit, the MagicPost API answers with the HTTP status 429, and the answer states the limit that applies.
The MagicPost developer documentation gives the values in two places. The errors and rate limits page gives the default limit per minute and the limit for refreshing posts. The generate_post entry of the tools page gives the post generation limits.
MagicPost also limits how many posts one LinkedIn profile can publish per 24 hours, and scheduled posts count too. Over that limit, the MagicPost API refuses to publish or schedule with the HTTP status 429, and the answer gives the limit and the next free slot. The limit depends on the account.
FAQ
I lost my MagicPost API key. Can I see it again?
No. MagicPost shows an API key only once, when you create it, and stores only a hash of it. Revoke the lost key in Settings, API & MCP, then create a new key and replace it in your tool.
Why is there no API & MCP tab in my MagicPost settings?
MagicPost hides the API & MCP tab in two cases: you are on the Growth plan, or you are a member of a Agency organization with a Growth, Analytics or Engagement seat. API keys are included in the Creator, Agency, and Team plans. On a free account whose trial has ended, the tab is visible, but Create a key opens an upgrade window.
Do I need one MagicPost API key per client or per team member?
No. On a Agency or Team organization, one key created from an administrator's account reaches the accounts of all members. If you prefer one key per member, create it from the settings of that member's account.
Does a connection from ChatGPT, Gemini or Claude on the web create a key?
Yes. When you approve the connection on the MagicPost authorization page, MagicPost creates an API key that carries the name the assistant gave. MagicPost lists this key in the API & MCP tab, and revoking it disconnects the assistant. When a connector that MagicPost already knows signs in again, MagicPost revokes the key that connector had and creates a new one.
My MagicPost API key stopped working. Why?
There are two usual reasons. The key was revoked in the API & MCP tab. Or the account no longer has API access, for example after the free trial ended or after a change to a plan without API keys. In the second case, the MagicPost API answers that API and MCP access is not included in your plan.
Need help?
Reach out via the in-app chat, or book a 30-minute onboarding call: https://cal.com/magicpost/book-a-call