Connect
The connect commands let you send connection invitations, list pending invitations, and accept or decline received requests. All commands are account-scoped and require --account (or a default set via curviate config set-account).
Each command maps to a single method on the invites resource of the @curviate/sdk:
| CLI command | SDK method |
|---|---|
curviate connect <id> | invites.send() |
curviate connect sent | invites.listSent() |
curviate connect received | invites.listReceived() |
curviate connect accept <id> | invites.accept() |
curviate connect decline <id> | invites.decline() |
curviate connect cancel <id> | invites.cancel() |
The CLI is a thin wrapper: it resolves identifiers, applies a slim output projection (see below), and forwards to the SDK. Reach for the SDK directly when you need the full, unprojected response shape in code.
Changed in 0.15.0:
connect respond <invitation_id> --action accept|decline --shared-secret <token>is removed. It is replaced by two bodyless commands,connect accept <id>andconnect decline <id>— no--shared-secretis required anymore.
Identifiers
The <id> argument for curviate connect <id> accepts the recipient's LinkedIn profile URL, public slug, or provider_id (the ACoAAA… value returned by curviate profile). URL and slug are the most common forms; a provider_id is accepted directly, so you can pipe it straight from a profile lookup without an intermediate slug.
A LinkedIn URN (urn:li:member:N) is also accepted, but the numeric member ID N is not exposed by any Curviate endpoint — so unless you already have a URN from an external source, prefer a slug or provider_id.
Invitation IDs (<id>) used in accept, decline, and cancel are verbatim identifiers returned by connect received / connect sent. They are passed as-is — they are not LinkedIn URLs or slugs and are not normalized.
Commands
# Send a connection invitation (write, --preview accepted)
# <id> accepts a LinkedIn URL, slug, or provider_id (ACoAAA… from `curviate profile`)
curviate connect <id> [--note <text>]--note is the personalized message shown to the recipient alongside the connection request (≤300 characters — a LinkedIn cap). Omit it to send a generic note; personalized notes measurably increase acceptance rates.
# List sent invitations (paginated read)
curviate connect sent [--verbose] [--limit <n>] [--cursor <token>] [--all] [--max-pages <n>]# List received invitations (paginated read)
curviate connect received [--verbose] [--limit <n>] [--cursor <token>] [--all] [--max-pages <n>]# Accept a received invitation (write, bodyless, --preview accepted)
# <id> is the `id` field from `connect received` — NOT a LinkedIn URL or slug
curviate connect accept <id># Decline a received invitation (write, bodyless, --preview accepted)
# <id> is the `id` field from `connect received` — NOT a LinkedIn URL or slug
curviate connect decline <id># Cancel a sent invitation (write, --preview accepted)
# <id> is the `id` field from `connect sent` — NOT a LinkedIn URL or slug
curviate connect cancel <id>The write commands (connect <id>, connect accept, connect decline, connect cancel) do not accept the pagination flags (--limit, --cursor, --all, --max-pages) — those apply only to the sent and received list reads.
Output: slim default and --verbose
connect sent and connect received return a slim projection by default — the fields you need to identify, qualify, and act on a pending invitation, with the structurally-empty fields dropped. Pass --verbose to get the full, unprojected API response (the same shape the SDK returns).
connect sent — slim items keep id, invited_user, invited_user_id, invited_user_public_id, invited_user_description, date, parsed_datetime, and invitation_text. The inviter object (always the caller on sent items) is dropped from the slim output and restored by --verbose.
connect received — slim items keep id, the full inviter object (inviter_name, inviter_id, inviter_public_identifier, inviter_description), date, parsed_datetime, and invitation_text. The invited_user* fields (which describe you, the recipient, not the sender) are dropped. --verbose restores the invited_user* fields.
Use --fields to project further on top of either mode.
Semantics and known limitations
- Pending only.
connect sentandconnect receivedreturn only pending invitations. Accepted and declined invitations are not returned (a LinkedIn API limitation) — an empty list means "no pending invitations," not "none ever sent." parsed_datetimeis approximate. It is derived from LinkedIn's relative date label ("Sent 3 weeks ago"), not an exact send timestamp — all invitations sharing a label (e.g. "1 month ago") receive the same computed time. For exact timing of platform-originated sends, record thesent_atfrom theconnect <id>send response at creation time.- No total count. The list response carries no total. To count all pending sent invitations, stream them and count client-side:
curviate connect sent --all | grep -c invitation_sent. - Propagation delay. After a successful send, the invitation typically takes 10–30 seconds to appear in the recipient's
connect receivedlist (LinkedIn propagation). Poll with a brief backoff before reading the received list.
Examples
Send an invitation
# By LinkedIn URL
curviate connect https://linkedin.com/in/janesmith --account acc_YOUR_ACCOUNT_ID
# By provider_id straight from a profile lookup
curviate connect ACoAAA… --note "Hi Jane, I'd love to connect." --account acc_YOUR_ACCOUNT_ID
# Preview the request without sending
curviate connect janesmith --preview --account acc_YOUR_ACCOUNT_IDList and respond to received invitations
# Step 1: list received invitations and capture the id
curviate connect received --json --account acc_YOUR_ACCOUNT_ID
# Step 2: accept — use the `id` from the response above
curviate connect accept INVITATION_ID --account acc_YOUR_ACCOUNT_ID
# Or decline
curviate connect decline INVITATION_ID --account acc_YOUR_ACCOUNT_IDLook up who is pending, then follow up or cancel
# Qualify pending sent contacts without a separate profile call —
# invited_user_description carries the headline
curviate connect sent --json --account acc_YOUR_ACCOUNT_ID
# Resolve a pending contact's profile by slug or provider_id
curviate profile <invited_user_public_id> --account acc_YOUR_ACCOUNT_ID
# Cancel a stale sent invitation using its id
curviate connect cancel INVITATION_ID --account acc_YOUR_ACCOUNT_ID