Administration

Manage your Linked API subscription status, seats, connected accounts, and rate limits from the terminal.

Admin commands use your Linked API Token and do not require an active account. They work even if no LinkedIn accounts are connected.

Subscription

bash
# Check subscription status
linkedin admin subscription status

# View current seats
linkedin admin subscription seats

# Set seats (updates existing or returns checkout link)
linkedin admin subscription set-seats --quantity 5 --type plus --period year

Accounts

bash
# List all connected accounts and pending sessions
linkedin admin accounts list

# Connect a new LinkedIn account (opens connection link)
linkedin admin accounts connect

# Create a fresh reconnection link for an account
linkedin admin accounts reconnect <accountId>

# Refresh stored profile URL, avatar, headline, and name
linkedin admin accounts reparse <accountId>

# Check connection session status
linkedin admin accounts session <sessionId>

# Cancel a pending connection session
linkedin admin accounts cancel-session <sessionId>

# Disconnect an account (irreversible)
linkedin admin accounts disconnect <accountId>

# Regenerate identification token
linkedin admin accounts regenerate-token <accountId>

Connection flow

bash
# 1. Start a connection session
linkedin admin accounts connect
# → Opens connection link, displays sessionId

# 2. User logs into LinkedIn in the opened page

# 3. Check session status (or wait for the command above to complete)
linkedin admin accounts session <sessionId> --json
# → {"status": "success"} when done

# 4. Verify the account appeared
linkedin admin accounts list

Reconnection flow

bash
# 1. Find accounts that require reconnection
linkedin admin accounts list
# → reconnection_required accounts include reconnectionLink when available

# 2. Create a fresh reconnection session if you need to replace the link
linkedin admin accounts reconnect <accountId>
# → Displays reconnectionSessionId and reconnectionLink

# 3. Open the reconnectionLink and complete LinkedIn login

# 4. Check session status
linkedin admin accounts session <reconnectionSessionId> --json

Webhooks

Register an endpoint that receives workflow and account events, choose which events it receives, sign its deliveries, add the custom headers your endpoint requires, inspect recent deliveries, and verify the endpoint end-to-end. A client may hold one active webhook at a time.

bash
# Register the webhook (fat inlines the workflow result; thin sends a reference)
linkedin admin webhook set https://example.com/hooks/linkedapi
linkedin admin webhook set https://example.com/hooks --payload-mode thin

# Register with signing on, only some events, and custom headers from a JSON object on stdin
cat headers.json | linkedin admin webhook set https://example.com/hooks \
  --signing --events "workflow.*,inbox.messageReceived" --headers-stdin

# Show the active webhook
linkedin admin webhook get

# Switch payload mode
linkedin admin webhook set-payload-mode <webhookId> thin

# Choose which events it receives (exact types and namespace wildcards), or go back to every event
linkedin admin webhook set-events <webhookId> "workflow.completed,inbox.*"
linkedin admin webhook set-events <webhookId> --all

# List the event types a selection can name
linkedin admin webhook event-types

# Turn signing on or off
linkedin admin webhook set-signing <webhookId> --on
linkedin admin webhook set-signing <webhookId> --off

# Read the signing secret: print it alone, or write it to a new file
linkedin admin webhook reveal-secret <webhookId> --print-secret
linkedin admin webhook reveal-secret <webhookId> --secret-file webhook-secret.txt

# Rotate the signing secret (the old one stops working immediately)
linkedin admin webhook rotate-secret <webhookId> --secret-file new-webhook-secret.txt

# Add or replace one custom header, with its value from stdin or an environment variable
cat endpoint-token.txt | linkedin admin webhook set-header <webhookId> Authorization --value-stdin
linkedin admin webhook set-header <webhookId> Authorization --value-env ENDPOINT_TOKEN

# Remove one custom header
linkedin admin webhook delete-header <webhookId> Authorization

# Replace all custom headers from a JSON object on stdin, or clear them
cat headers.json | linkedin admin webhook set-headers <webhookId> --stdin
linkedin admin webhook set-headers <webhookId> --clear

# Delete the webhook (soft-delete: delivery history is kept)
linkedin admin webhook delete <webhookId>

# Inspect the most recent deliveries (debug feed, newest first)
linkedin admin webhook deliveries

# Re-arm an already-settled delivery for redelivery (reuses the same event id)
linkedin admin webhook replay <deliveryId>

# Emit a synthetic webhook.test event to verify the endpoint
linkedin admin webhook send-test

set-events takes either a comma-separated list or --all, and set --events takes the same list; without it, a new webhook receives every event. See event selection for what the list may contain.

Secrets and header values

The CLI keeps the signing secret and header values out of your terminal history and logs:

  • The secret is redacted in normal output. set --signing, set-signing --on and rotate-secret without a flag show it as [REDACTED], with --json and --fields too, and tell you on stderr how to read it.
  • reveal-secret needs one of two flags. --print-secret writes only the secret and a newline to stdout, so it fits $(...). --secret-file <path> creates a new file with mode 0600, refuses a path that already exists, and prints the path rather than the secret.
  • rotate-secret takes effect immediately. It warns on stderr that the old secret stops working at once, and accepts the same two flags. With --secret-file, the file is created before the secret rotates, so a path that already exists stops the command before anything changes. Without a flag, read the new secret with reveal-secret.
  • Header values never go on the command line. set-header reads the value from stdin with --value-stdin, removing one trailing newline, or from the environment variable named by --value-env; exactly one is required. set --headers-stdin and set-headers --stdin read a JSON object of names and values from stdin. An empty value is refused with exit code 5 before anything is sent, whether it comes from stdin, the environment variable or the JSON object – remove a header with delete-header, or clear them all with set-headers --clear or {}.
bash
# Hand the secret to your endpoint's environment without printing it
export LINKED_API_WEBHOOK_SECRET="$(linkedin admin webhook reveal-secret <webhookId> --print-secret)"

Limits

bash
# View system default limits
linkedin admin limits defaults

# View current limits for an account
linkedin admin limits get <accountId>

# View current usage against limits
linkedin admin limits usage <accountId>

# Set limits for an account
linkedin admin limits set <accountId> \
  --category stMessages --period daily --max 25

# Delete specific limits (falls back to defaults)
linkedin admin limits delete <accountId> \
  --category stMessages --period daily

# Reset all limits to defaults
linkedin admin limits reset <accountId>

Limit categories

CategoryDescription
stPersonProfileViewsStandard LinkedIn profile views
stCompanyPageViewsStandard LinkedIn company page views
stConnectionRequestsConnection requests sent
stMessagesMessages sent
stSearchQueriesLinkedIn search queries
stReactionsPost reactions
stCommentsPost comments
stPostsPosts and reposts created
nvPersonProfileViewsSales Navigator profile views
nvCompanyPageViewsSales Navigator company page views
nvMessagesSales Navigator messages

Periods: daily, weekly, monthly.

For the complete HTTP API reference, see the Admin API docs.