| title | Quickstart |
|---|---|
| description | Mint an API key and make your first authenticated call. |
This page takes you from nothing to a successful API response.
**Give this to your AI agent** and it will handle the API side while you sign up and log the LinkedIn account in:"Connect to gtm-api: add the MCP connector at https://mcp.gtm-api.com/mcp (OAuth) or call the REST API at app.gtm-api.com with my key. Then search my linkedin-accounts, tell me each account's status, and once one reaches active, show what its smart limits allow today. Read-only for now: do not send or post anything."
You can make read calls right away. Outbound actions (connection requests, messages) stay blocked with an `invalid_transition` error until the initial sync finishes.
Keys can also be minted over the API with [`POST /api/api-keys`](/api-reference/id/api_keys/create-api-key) once you have a first key or a session token to call it with.
<CodeGroup>
```bash curl
curl -X POST "https://app.gtm-api.com/linkedin/v4/api/linkedin-accounts/search" \
-H "Authorization: Bearer gtm_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"page_size": 5}'
```
```typescript TypeScript
const res = await fetch(
"https://app.gtm-api.com/linkedin/v4/api/linkedin-accounts/search",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GTM_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ page_size: 5 }),
},
);
const data = await res.json();
```
```python Python
import os, requests
res = requests.post(
"https://app.gtm-api.com/linkedin/v4/api/linkedin-accounts/search",
headers={"Authorization": f"Bearer {os.environ['GTM_API_KEY']}"},
json={"page_size": 5},
)
data = res.json()
```
</CodeGroup>
```json
{
"success": true,
"operation": "search",
"items": [
{
"item": {
"sid": "ln_ac_Hx7kQ3mN2pL4",
"status": "active",
"full_name": "Jane Cooper"
},
"included": {}
}
],
"counts": { "total_count": 1, "groups": { "status": { "active": 1 } } },
"pagination": { "next_cursor": null, "has_more": false, "total_count": 1 },
"applied_filters": {},
"includes": [],
"meta": {
"trace_id": "0198f2ab-7c11-7e32-9a41-d2b64f2a91c3"
}
}
```
The `sid` is the account's stable identifier. Every entity in the platform has one, with a type-specific prefix (`ln_ac_` for LinkedIn accounts, `id_ak_` for API keys, `wh_hk_` for webhooks).