# LinkedifyAI API & MCP

> Connect an AI agent to your LinkedifyAI workspace. These docs are public; workspace access requires an API key.

Docs: https://linkedify.net/developers
Settings and API keys: https://linkedify.net/settings
MCP endpoint: POST https://linkedify.net/api/mcp
Authentication: Authorization: Bearer mcp_YOUR_API_KEY
Transport: Streamable HTTP (stateless)

## Connect your agent

Sign in to Settings and generate an MCP API key. Copy it when it is shown, then store it in your agent’s secret settings. Replacing or revoking the key stops clients using the old key.

Use an MCP client that supports Streamable HTTP. Add the connection below and replace the placeholder with your key. No local Linkedify server or database access is needed.

The key works in its owner’s workspace. It does not switch to another workspace or grant access to a collaborator’s data.

### MCP client configuration

```json
{
  "mcpServers": {
    "linkedifyai": {
      "url": "https://linkedify.net/api/mcp",
      "headers": {
        "Authorization": "Bearer mcp_YOUR_API_KEY"
      }
    }
  }
}
```

## Make a first request

Most MCP clients handle initialization and tool discovery for you. These curl examples show the HTTP flow. Set LINKEDIFY_API_KEY through your secret store before running them.

Send JSON-RPC requests with POST. Include both application/json and text/event-stream in Accept; responses can use either format. The examples use supported protocol version 2025-03-26. A client should use the protocol version returned by initialize for later requests.

This endpoint is stateless: there is no session ID to save. Opening /api/mcp in a browser sends GET and returns 405. Read these docs in a browser and use POST for API requests.

### Initialize

```bash
curl --request POST 'https://linkedify.net/api/mcp' \
  --header "Authorization: Bearer $LINKEDIFY_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json, text/event-stream' \
  --header 'MCP-Protocol-Version: 2025-03-26' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0.0"}}}'
```

### Discover tools and their input schemas

```bash
curl --request POST 'https://linkedify.net/api/mcp' \
  --header "Authorization: Bearer $LINKEDIFY_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json, text/event-stream' \
  --header 'MCP-Protocol-Version: 2025-03-26' \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
```

### Read your campaigns

```bash
curl --request POST 'https://linkedify.net/api/mcp' \
  --header "Authorization: Bearer $LINKEDIFY_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json, text/event-stream' \
  --header 'MCP-Protocol-Version: 2025-03-26' \
  --data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_campaigns","arguments":{}}}'
```

## Available MCP tools

These are the tools exposed to external agents. Call tools/list for their current input schemas and detailed instructions before calling a tool.

Some tools need an existing lead-list, campaign, conversation, or LinkedIn account ID. Use the app or a previous tool response to get the ID. Connected accounts and the required subscriptions must already be set up in the app.

Messaging, searches, campaign edits, and starting campaigns change your workspace. Starting a campaign schedules outreach; send_message can send a real message. Review the inputs before using these tools.

| Tool | What it does |
| --- | --- |
| send_message | Read conversation context, then send a LinkedIn message using the two-step tool flow. |
| get_leads_for_followup | Find leads that need a follow-up. |
| tag_conversation | Tag a conversation. |
| queue_linkedin_scrape | Start a LinkedIn search and save results to an existing lead list. |
| queue_sales_nav_scrape | Start a Sales Navigator search. Requires a connected account with Sales Navigator access. |
| get_scrape_status | Check the progress of a search. |
| lookup_linkedin_parameters | Look up LinkedIn filter values such as locations and industries. |
| create_campaign | Create a draft campaign using existing connected account IDs. |
| add_campaign_sequence | Add a step to a campaign sequence. |
| start_campaign | Start a campaign and schedule its outreach. |
| get_campaigns | List campaigns and their status. |
| get_campaign_performance | Read campaign details and performance. |
| get_campaign_activities | Read recent campaign activity. |
| get_message_performance | Compare message performance in a campaign. |

## Upload leads with REST

POST /api/campaigns/{campaignId}/upload-leads accepts the same MCP Bearer key. The campaign must belong to the key’s workspace. Replace the campaign ID and example profile with your own values.

The JSON body needs a leads array with 1–10,000 rows. Every row needs linkedinProfileUrl. Optional fields include firstName, lastName, headline, company, unipileProviderId, isPremium, and customFields. Optional top-level fields are listName, dedupeAllCampaigns, and dedupeCampaignIds.

This creates a lead list for the upload, removes duplicates, and assigns the leads to the campaign. Uploading to an active campaign can schedule outreach immediately. Use a draft campaign while setting up.

Other app REST routes are not a general MCP-key API. Private provisioning and internal account-management routes use separate credentials and are not covered by this public integration.

### Upload to your draft campaign

```bash
curl --request POST 'https://linkedify.net/api/campaigns/YOUR_CAMPAIGN_ID/upload-leads' \
  --header "Authorization: Bearer $LINKEDIFY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"leads":[{"firstName":"Example","linkedinProfileUrl":"https://www.linkedin.com/in/example-profile/"}]}'
```

## If a request fails

401: check the Bearer header and whether the key was replaced or revoked. Create and manage keys in Settings.

405 on /api/mcp: use POST. GET and DELETE are not supported.

429: wait for the Retry-After value before retrying. MCP requests and lead uploads are rate limited.

400 or a JSON-RPC error: check the request and the tool’s schema from tools/list. Also check for isError: true in tool results and success: false in returned tool text or REST responses. An HTTP 200 response alone does not mean the action succeeded.

503: a service may be temporarily unavailable. For a write that times out, check the result in the app before retrying so you do not repeat the action.
