All endpoints

List pending sent invitations

GEThttps://myagentmail.com/linkedin/invitations/sent

Lists the connected account's outbound connection invitations that are still pending (haven't been accepted, rejected, or withdrawn). Drives the connection_accepted signal kind on the cadence runner side; usable directly by clients rendering a "sent invitations" view.

Response shape — names included

Unlike older URN-only LinkedIn list endpoints, this one returns resolved recipient identity already extracted server-side from LinkedIn's SDUI payload — no follow-up profile/lookup round-trip needed:

  • recipientName — Display name parsed from the aria-label="Withdraw invitation sent to NAME" anchor LinkedIn renders on each row. Always a non-empty string for valid invitations.
  • recipientPublicIdentifierlinkedin.com/in/<slug> segment. Build the profile URL as https://www.linkedin.com/in/${slug}/.
  • recipientUrnurn:li:fsd_profile:ACoA…. Use when calling other LinkedIn API endpoints that take a profile URN.
  • invitationUrnurn:li:fsd_invitation:<numeric>. Stable identifier for the invitation itself (used for withdraw on the LinkedIn side; not currently exposed as a MAM endpoint).
  • recipientHeadline — Currently always empty string — the SDUI payload puts the headline in a separate textProps block we don't parse yet. Don't rely on it.
  • sentAt — Currently always null — LinkedIn's sent-invitations SDUI page doesn't expose the original send timestamp. Don't rely on it.
  • message — Currently always null — original invitation note isn't in the SDUI payload either. Don't rely on it.
  • state — Always "pending" for invitations returned by this endpoint (LinkedIn's SDUI page only lists pending). The type union includes accepted | withdrawn | rejected | expired | unknown for internal reconciliation use, but the public response only ever surfaces pending.

Pagination

  • count — page size, max 50, default 50
  • start — 0-based offset

LinkedIn's SDUI page embeds ~20 invitations per response. Asking for count > 20 may return fewer than requested; treat total as advisory rather than authoritative.

Worked example response

{
  "ok": true,
  "total": 3,
  "count": 3,
  "start": 0,
  "invitations": [
    {
      "invitationUrn": "urn:li:fsd_invitation:7195484920123456789",
      "recipientUrn": "urn:li:fsd_profile:ACoAAA…aaaa",
      "recipientPublicIdentifier": "jane-doe-1a2b3c",
      "recipientName": "Jane Doe",
      "recipientHeadline": "",
      "state": "pending",
      "sentAt": null,
      "message": null
    },
    {
      "invitationUrn": "urn:li:fsd_invitation:7195484921987654321",
      "recipientUrn": "urn:li:fsd_profile:ACoAAA…bbbb",
      "recipientPublicIdentifier": "john-smith-4d5e6f",
      "recipientName": "John Smith",
      "recipientHeadline": "",
      "state": "pending",
      "sentAt": null,
      "message": null
    }
  ]
}

Rendering recipe

const { invitations } = await mam.linkedinListSentInvitations({ sessionId });
for (const inv of invitations) {
  const profileUrl = `https://www.linkedin.com/in/${inv.recipientPublicIdentifier}/`;
  render({
    name: inv.recipientName,
    profileUrl,
    withdrawUrl: profileUrl,   // LinkedIn's withdraw lives on the recipient's profile UI
  });
}

Query parameters

sessionId
required
string
count
integer

Page size. Capped at 50; LinkedIn returns ~20 per SDUI response so larger counts may under-fill.

start
integer

0-based offset for pagination.

Responses

200application/jsonPending invitations.
ok
boolean
total
integer

Total count of pending invitations on this page response. Advisory; LinkedIn doesn't expose a true overall count.

count
integer

Number of items in the `invitations` array.

start
integer

0-based offset of this page.

invitations
object[]
invitationUrn
string

`urn:li:fsd_invitation:<numeric>`. Stable identifier.

recipientUrn
string

`urn:li:fsd_profile:ACoA…`. Use for cross-endpoint joins (e.g. matching against connection_accepted signal payloads).

recipientPublicIdentifier
string

`linkedin.com/in/<slug>` segment. Build the profile URL as `https://www.linkedin.com/in/${recipientPublicIdentifier}/`.

recipientName
string

Display name parsed from LinkedIn's `aria-label`. Always non-empty for valid invitations.

recipientHeadline
string

Currently always empty string — the headline isn't in the SDUI payload we parse. Don't rely on this field.

state
"pending"

Always `pending` — LinkedIn's SDUI page only lists pending invitations.

enum: "pending"

sentAt
string

Currently always `null` — LinkedIn doesn't expose the original send timestamp on this page.

message
string

Currently always `null` — the original invitation note isn't in the SDUI payload.

Authentication

Send your API key in the X-API-Key header (or Authorization: Bearer <key>). Any prefix accepted by this endpoint — tk_, wk_, ak_, or sa_ — is documented in the key prefix table.