{
  "openapi": "3.1.0",
  "info": {
    "title": "Lempile Direct API Reference",
    "version": "0.1.0",
    "description": "Lempile Direct answers Unipile's LinkedIn API (its paths, fields, status codes and error types) without a browser: each call goes to LinkedIn's own API through the connected account's own session and proxy. Point a Unipile client at `https://direct.lempile.com/api/v1` with a Direct key in `X-API-KEY` (each key sees its own workspace's accounts and webhooks only). Anything Direct doesn't do answers Unipile's 501 `errors/feature_not_implemented`. Guides: https://lempile.com/docs. This document: https://direct.lempile.com/api/v1/openapi.json.",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://direct.lempile.com",
      "description": "Lempile Direct production. Paths start with /api/v1, as on Unipile."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Accounts",
      "description": "The LinkedIn accounts a key can use, their status, resync and removal."
    },
    {
      "name": "Hosted auth",
      "description": "A link where a person connects their LinkedIn account through Lempile's real-browser sign-in."
    },
    {
      "name": "Webhooks",
      "description": "Unipile's webhook registry and the events Direct sends."
    },
    {
      "name": "Users and profiles",
      "description": "The account's own profile and other members' profiles, with their sections."
    },
    {
      "name": "Relations and invitations",
      "description": "Connections, sent invitations, inviting and withdrawing."
    },
    {
      "name": "Chats and messages",
      "description": "The LinkedIn inbox: chats, messages, attendees, sending."
    },
    {
      "name": "Posts",
      "description": "Members' and companies' posts; creating and deleting posts."
    },
    {
      "name": "Comments and reactions",
      "description": "A post's comments and reactions; commenting and reacting."
    },
    {
      "name": "Search and companies",
      "description": "LinkedIn's classic search (people, companies, posts, jobs), its parameters, company pages and the raw route."
    }
  ],
  "paths": {
    "/api/v1/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "operationId": "directListAccounts",
        "summary": "List accounts",
        "description": "The LinkedIn accounts of this key's workspace, with their status (`total_count` and `status_counts` count those only). An account Direct never checked is checked once (one LinkedIn call).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 100
            },
            "description": "Items per page: 1 to 250 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountList"
                },
                "example": {
                  "object": "AccountList",
                  "items": [
                    {
                      "object": "Account",
                      "type": "LINKEDIN",
                      "id": "00000000-0000-4000-8000-0000000000a1",
                      "name": "Ada Sender",
                      "created_at": "2026-10-28T09:12:44.512Z",
                      "connection_params": {
                        "im": {
                          "id": "ACoAAAbcdefghijklmnop",
                          "publicIdentifier": "ada-sender",
                          "username": "Ada Sender",
                          "premiumId": null,
                          "premiumContractId": null,
                          "premiumFeatures": [
                            "premium"
                          ],
                          "organizations": []
                        }
                      },
                      "groups": [],
                      "sources": [
                        {
                          "id": "00000000-0000-4000-8000-0000000000a1_MESSAGING",
                          "status": "OK"
                        }
                      ]
                    }
                  ],
                  "cursor": null,
                  "total_count": 1,
                  "status_counts": {
                    "OK": 1,
                    "CONNECTING": 0,
                    "CREDENTIALS": 0,
                    "STOPPED": 0,
                    "ERROR": 0
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/accounts\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/accounts/{account_id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "operationId": "directGetAccount",
        "summary": "Retrieve an account",
        "description": "The account and its status. A status older than 10 minutes (15 while failing) is checked first: one `/voyager/api/me` through the account's own session.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id.",
            "example": "00000000-0000-4000-8000-0000000000a1"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "object": "Account",
                  "type": "LINKEDIN",
                  "id": "00000000-0000-4000-8000-0000000000a1",
                  "name": "Ada Sender",
                  "created_at": "2026-10-28T09:12:44.512Z",
                  "connection_params": {
                    "im": {
                      "id": "ACoAAAbcdefghijklmnop",
                      "publicIdentifier": "ada-sender",
                      "username": "Ada Sender",
                      "premiumId": null,
                      "premiumContractId": null,
                      "premiumFeatures": [
                        "premium"
                      ],
                      "organizations": []
                    }
                  },
                  "groups": [],
                  "sources": [
                    {
                      "id": "00000000-0000-4000-8000-0000000000a1_MESSAGING",
                      "status": "OK"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/accounts/$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "operationId": "directDeleteAccount",
        "summary": "Delete an account",
        "description": "Direct stops serving the account (it stays off across restarts), drops its kept session and sends the `account_status` webhook `DELETED`. The LinkedIn session and the Lempile account are untouched. Connect it again with a hosted auth link.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id.",
            "example": "00000000-0000-4000-8000-0000000000a1"
          },
          {
            "name": "provider_session_revoke",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true` answers 501: Direct never signs an account out of LinkedIn."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeleted"
                },
                "example": {
                  "object": "AccountDeleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/accounts/$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/accounts/{account_id}/resync": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "operationId": "directResyncAccount",
        "summary": "Resync an account",
        "description": "Drops the kept session, reads a fresh one from the account's browser and checks it with LinkedIn (one call). `SYNC_DONE` also sends the `account_status` webhook `SYNC_SUCCESS`. A signed-out account answers 401 `errors/disconnected_account`. Same as `GET /accounts/{account_id}/sync`.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id.",
            "example": "00000000-0000-4000-8000-0000000000a1"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResync"
                },
                "example": {
                  "object": "AccountResync",
                  "status": "SYNC_DONE"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/accounts/$ACCOUNT_ID/resync\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/accounts/{account_id}/sync": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "operationId": "directSyncAccount",
        "summary": "Resync an account (Unipile's GET form)",
        "description": "Drops the kept session, reads a fresh one from the account's browser and checks it with LinkedIn (one call). `SYNC_DONE` also sends the `account_status` webhook `SYNC_SUCCESS`. A signed-out account answers 401 `errors/disconnected_account`.",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id.",
            "example": "00000000-0000-4000-8000-0000000000a1"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResync"
                },
                "example": {
                  "object": "AccountResync",
                  "status": "SYNC_DONE"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/accounts/$ACCOUNT_ID/sync\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/chat_attendees": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directListAllAttendees",
        "summary": "List all attendees",
        "description": "Everyone the account has a conversation with, newest conversation first. With `chat_id`: that chat's attendees.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 100
            },
            "description": "Items per page: 1 to 250 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "chat_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only this chat's attendees."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatAttendeeList"
                },
                "example": {
                  "object": "ChatAttendeeList",
                  "items": [
                    {
                      "object": "ChatAttendee",
                      "id": "ACoAAAperson0000xyz",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "provider_id": "ACoAAAperson0000xyz",
                      "name": "P0 Person",
                      "is_self": 0,
                      "hidden": 0,
                      "specifics": {
                        "provider": "LINKEDIN",
                        "member_urn": "urn:li:member:930446784",
                        "occupation": "Founder",
                        "headline": "Founder",
                        "network_distance": "DISTANCE_2"
                      },
                      "picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                      "profile_url": "https://www.linkedin.com/in/ACoAAAperson0000xyz"
                    },
                    {
                      "object": "ChatAttendee",
                      "id": "ACoAAAperson0001xyz",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "provider_id": "ACoAAAperson0001xyz",
                      "name": "P1 Person",
                      "is_self": 0,
                      "hidden": 0,
                      "specifics": {
                        "provider": "LINKEDIN",
                        "member_urn": "urn:li:member:199989907",
                        "occupation": "Founder",
                        "headline": "Founder",
                        "network_distance": "DISTANCE_2"
                      },
                      "picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                      "profile_url": "https://www.linkedin.com/in/ACoAAAperson0001xyz"
                    }
                  ],
                  "cursor": "eyJrIjoiYXR0ZW5kZWVzIiwiYiI6MTc2MTI5OTg4MDAwMCwieCI6WyIyLSsvOTBhSEpsWVdRd01EQXlJUT09Il19"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/chat_attendees?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/chats": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directListChats",
        "summary": "List chats",
        "description": "The account's conversations, newest activity first: the inbox and the archive (not spam). The newest 20 come from LinkedIn's inbox sync (kept a minute); further pages, `before`, `after`, `unread` or a `limit` over 20 walk the inbox and the archive by last activity (25 a LinkedIn call).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 10
            },
            "description": "Items per page: 1 to 250 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "unread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Only chats with unread messages."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only chats last active before this time (ISO 8601 UTC)."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only chats last active after this time (ISO 8601 UTC)."
          },
          {
            "name": "account_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "LINKEDIN"
              ]
            },
            "description": "Anything but `LINKEDIN` answers 400."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatList"
                },
                "example": {
                  "object": "ChatList",
                  "items": [
                    {
                      "object": "Chat",
                      "id": "2--_90aHJlYWQwMDAwIQ",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "account_type": "LINKEDIN",
                      "provider_id": "2--_90aHJlYWQwMDAwIQ",
                      "name": null,
                      "type": 0,
                      "timestamp": "2025-10-24T10:00:00.000Z",
                      "unread_count": 1,
                      "archived": 0,
                      "muted_until": null,
                      "read_only": 0,
                      "folder": [
                        "INBOX",
                        "INBOX_LINKEDIN_CLASSIC"
                      ],
                      "pinned": 0,
                      "attendee_provider_id": "ACoAAAperson0000xyz"
                    },
                    {
                      "object": "Chat",
                      "id": "2--_90aHJlYWQwMDAxIQ",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "account_type": "LINKEDIN",
                      "provider_id": "2--_90aHJlYWQwMDAxIQ",
                      "name": null,
                      "type": 0,
                      "timestamp": "2025-10-24T09:59:00.000Z",
                      "unread_count": 0,
                      "archived": 0,
                      "muted_until": null,
                      "read_only": 0,
                      "folder": [
                        "INBOX",
                        "INBOX_LINKEDIN_CLASSIC"
                      ],
                      "pinned": 0,
                      "attendee_provider_id": "ACoAAAperson0001xyz"
                    }
                  ],
                  "cursor": "eyJrIjoiY2hhdHMiLCJiIjoxNzYxMjk5ODgwMDAwLCJ4IjpbIjItKy85MGFISmxZV1F3TURBeUlRPT0iXX0"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/chats?account_id=$ACCOUNT_ID&limit=20\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "post": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directStartChat",
        "summary": "Start a chat",
        "description": "A first message to one person. Reads the profile's \"Message\" option first: someone the account can't message for free answers 422 `errors/no_connection_with_recipient` (with `linkedin[inmail]=true`: an InMail, or `errors/not_allowed_inmail` / `errors/insufficient_credits`). A voice note (`voice_message`) starts the chat the same way; never as an InMail (501).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartChatRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "attendees_ids": [
                  "ACoAAAzyxwvutsrqponml"
                ],
                "text": "Hi Bob, quick question about your post."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StartChatRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatStarted"
                },
                "example": {
                  "object": "ChatStarted",
                  "chat_id": "2-QUFBQXRocmVhZPv_b25lMQ",
                  "message_id": "2-_vptc2cwMTMxIQ",
                  "id": "2-QUFBQXRocmVhZPv_b25lMQ"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/chats\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"attendees_ids\": [\"ACoAAAzyxwvutsrqponml\"], \"text\": \"Hi Bob, quick question about your post.\"}'"
          }
        ]
      }
    },
    "/api/v1/chats/{chat_id}": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directGetChat",
        "summary": "Retrieve a chat",
        "description": "One conversation with its `lastMessage`: from the newest conversations, else LinkedIn's conversation by its id.",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The chat's id as Direct answers it (LinkedIn's own `2-…` form, URL-encoded, works too).",
            "example": "2--_90aHJlYWQwMDAwIQ"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Chat"
                },
                "example": {
                  "object": "Chat",
                  "id": "2--_90aHJlYWQwMDAwIQ",
                  "account_id": "00000000-0000-4000-8000-0000000000a1",
                  "account_type": "LINKEDIN",
                  "provider_id": "2--_90aHJlYWQwMDAwIQ",
                  "name": null,
                  "type": 0,
                  "timestamp": "2025-10-24T10:00:00.000Z",
                  "unread_count": 1,
                  "archived": 0,
                  "muted_until": null,
                  "read_only": 0,
                  "folder": [
                    "INBOX",
                    "INBOX_LINKEDIN_CLASSIC"
                  ],
                  "pinned": 0,
                  "attendee_provider_id": "ACoAAAperson0000xyz",
                  "lastMessage": {
                    "object": "Message",
                    "id": "2-_vptc2cwMTI5IQ",
                    "provider_id": "2-_vptc2cwMTI5IQ",
                    "account_id": "00000000-0000-4000-8000-0000000000a1",
                    "chat_id": "2--_90aHJlYWQwMDAwIQ",
                    "chat_provider_id": "2--_90aHJlYWQwMDAwIQ",
                    "sender_id": "ACoAAAbcdefghijklmnop",
                    "sender_attendee_id": "ACoAAAbcdefghijklmnop",
                    "sender_urn": "urn:li:fsd_profile:ACoAAAbcdefghijklmnop",
                    "text": "message 129",
                    "attachments": [],
                    "timestamp": "2025-10-24T09:59:59.000Z",
                    "is_sender": 1,
                    "reactions": [],
                    "seen": 0,
                    "seen_by": {},
                    "hidden": 0,
                    "deleted": 0,
                    "edited": 0,
                    "is_event": 0,
                    "delivered": 1,
                    "behavior": null,
                    "original": "",
                    "message_type": "MESSAGE",
                    "attendee_type": "MEMBER"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/chats/$CHAT_ID?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "patch": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directPatchChat",
        "summary": "Mark a chat read or unread, mute it",
        "description": "`setReadStatus` (`value: true` marks it read) or `setMuteStatus`. The chat is read first (unknown answers 404). Unipile's WhatsApp and Telegram actions answer 422 `errors/not_supported_by_provider`.",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LinkedIn's thread id (`2-…`, as Direct answers it)."
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchChatRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "action": "setReadStatus",
                "value": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ChatPatched"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "ChatPatched"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X PATCH \"https://direct.lempile.com/api/v1/chats/2-QUFBQXRocmVhZPv_b25lMQ\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"$ACCOUNT_ID\", \"action\": \"setReadStatus\", \"value\": true}'"
          }
        ]
      },
      "delete": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directDeleteChat",
        "summary": "Delete a chat",
        "description": "Deletes the conversation from the account's inbox (LinkedIn's Delete conversation; the other people keep theirs).",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LinkedIn's thread id (`2-…`, as Direct answers it)."
          },
          {
            "$ref": "#/components/parameters/AccountIdWrite"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ChatDeleted"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "ChatDeleted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/chats/2-QUFBQXRocmVhZPv_b25lMQ?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/chats/{chat_id}/attendees": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directListChatAttendees",
        "summary": "List a chat's attendees",
        "description": "Everyone in the conversation, the account included (`is_self: 1`).",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The chat's id as Direct answers it (LinkedIn's own `2-…` form, URL-encoded, works too).",
            "example": "2--_90aHJlYWQwMDAwIQ"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatAttendeeList"
                },
                "example": {
                  "object": "ChatAttendeeList",
                  "items": [
                    {
                      "object": "ChatAttendee",
                      "id": "ACoAAAbcdefghijklmnop",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "provider_id": "ACoAAAbcdefghijklmnop",
                      "name": "Ada Sender",
                      "is_self": 1,
                      "hidden": 0,
                      "specifics": {
                        "provider": "LINKEDIN",
                        "member_urn": "urn:li:member:946529289",
                        "occupation": "Founder",
                        "headline": "Founder",
                        "network_distance": "SELF"
                      },
                      "picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                      "profile_url": "https://www.linkedin.com/in/ACoAAAbcdefghijklmnop"
                    },
                    {
                      "object": "ChatAttendee",
                      "id": "ACoAAAperson0005xyz",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "provider_id": "ACoAAAperson0005xyz",
                      "name": "P5 Person",
                      "is_self": 0,
                      "hidden": 0,
                      "specifics": {
                        "provider": "LINKEDIN",
                        "member_urn": "urn:li:member:618293495",
                        "occupation": "Founder",
                        "headline": "Founder",
                        "network_distance": "DISTANCE_2"
                      },
                      "picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                      "profile_url": "https://www.linkedin.com/in/ACoAAAperson0005xyz"
                    }
                  ],
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/chats/$CHAT_ID/attendees?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/chats/{chat_id}/messages": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directListMessages",
        "summary": "List a chat's messages",
        "description": "Newest first, back to the first message (100 a LinkedIn call).",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The chat's id as Direct answers it (LinkedIn's own `2-…` form, URL-encoded, works too).",
            "example": "2--_90aHJlYWQwMDAwIQ"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 20
            },
            "description": "Items per page: 1 to 250 (default 20)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only messages before this time (ISO 8601 UTC)."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only messages after this time (ISO 8601 UTC)."
          },
          {
            "name": "sender_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only this sender's messages (a provider id)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageList"
                },
                "example": {
                  "object": "MessageList",
                  "items": [
                    {
                      "object": "Message",
                      "id": "2-_vptc2cwMTI5IQ",
                      "provider_id": "2-_vptc2cwMTI5IQ",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "chat_id": "2--_90aHJlYWQwMDAwIQ",
                      "chat_provider_id": "2--_90aHJlYWQwMDAwIQ",
                      "sender_id": "ACoAAAbcdefghijklmnop",
                      "sender_attendee_id": "ACoAAAbcdefghijklmnop",
                      "sender_urn": "urn:li:fsd_profile:ACoAAAbcdefghijklmnop",
                      "text": "message 129",
                      "attachments": [],
                      "timestamp": "2025-10-24T09:59:59.000Z",
                      "is_sender": 1,
                      "reactions": [],
                      "seen": 0,
                      "seen_by": {},
                      "hidden": 0,
                      "deleted": 0,
                      "edited": 0,
                      "is_event": 0,
                      "delivered": 1,
                      "behavior": null,
                      "original": "",
                      "message_type": "MESSAGE",
                      "attendee_type": "MEMBER"
                    },
                    {
                      "object": "Message",
                      "id": "2-_vptc2cwMTI4IQ",
                      "provider_id": "2-_vptc2cwMTI4IQ",
                      "account_id": "00000000-0000-4000-8000-0000000000a1",
                      "chat_id": "2--_90aHJlYWQwMDAwIQ",
                      "chat_provider_id": "2--_90aHJlYWQwMDAwIQ",
                      "sender_id": "ACoAAAperson0000xyz",
                      "sender_attendee_id": "ACoAAAperson0000xyz",
                      "sender_urn": "urn:li:fsd_profile:ACoAAAperson0000xyz",
                      "text": "message 128",
                      "attachments": [],
                      "timestamp": "2025-10-24T09:59:58.000Z",
                      "is_sender": 0,
                      "reactions": [],
                      "seen": 0,
                      "seen_by": {},
                      "hidden": 0,
                      "deleted": 0,
                      "edited": 0,
                      "is_event": 0,
                      "delivered": 1,
                      "behavior": null,
                      "original": "",
                      "message_type": "MESSAGE",
                      "attendee_type": "MEMBER",
                      "attendee_distance": 2
                    }
                  ],
                  "cursor": "eyJrIjoibWVzc2FnZXMiLCJiIjoxNzYxMjk5OTk3MDAwLCJ4IjpbIjItX3ZwdGMyY3dNVEkzSVEiXSwiYyI6IjItKy85MGFISmxZV1F3TURBd0lRPT0ifQ"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/chats/$CHAT_ID/messages?account_id=$ACCOUNT_ID&limit=20\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "post": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directSendMessage",
        "summary": "Send a message in a chat",
        "description": "A message in an existing conversation: text and files, or a voice note (multipart `voice_message`). A voice note is uploaded to LinkedIn as a `VOICE_MESSAGE` and sent as the message's `audio` (its asset, size and length), with no text.",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The chat's id as Direct answers it (LinkedIn's own `2-…` form, URL-encoded, works too).",
            "example": "2--_90aHJlYWQwMDAwIQ"
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "text": "Thanks, Tuesday works for me."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSent"
                },
                "example": {
                  "object": "MessageSent",
                  "message_id": "2-_vptc2cwMTMwIQ",
                  "id": "2-_vptc2cwMTMwIQ"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/chats/$CHAT_ID/messages\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Idempotency-Key: reply-42\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"text\": \"Thanks, Tuesday works for me.\"}'"
          },
          {
            "lang": "Shell",
            "label": "curl (voice note)",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/chats/$CHAT_ID/messages\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Idempotency-Key: voice-42\" \\\n  -F account_id=00000000-0000-4000-8000-0000000000a1 \\\n  -F 'linkedin[api]=classic' \\\n  -F 'voice_message=@voice_message.m4a;type=audio/m4a'"
          }
        ]
      }
    },
    "/api/v1/hosted/accounts/link": {
      "post": {
        "tags": [
          "Hosted auth"
        ],
        "operationId": "directHostedAuthLink",
        "summary": "Create a hosted auth link",
        "description": "A link to a page where a person connects (or reconnects) their LinkedIn account through Lempile's own real-browser sign-in, checkpoints included. When they're back, Direct serves the account, checks it, POSTs `notify_url`, sends the `account_status` webhooks and redirects to `success_redirect_url`. A new account joins the key's workspace; a reconnect is for one of its accounts only.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostedAuthLinkRequest"
              },
              "example": {
                "type": "create",
                "api_url": "https://direct.lempile.com",
                "providers": [
                  "LINKEDIN"
                ],
                "expiresOn": "2026-11-01T12:00:00.000Z",
                "name": "user_42",
                "success_redirect_url": "https://app.example.com/linkedin/connected",
                "failure_redirect_url": "https://app.example.com/linkedin/failed",
                "notify_url": "https://app.example.com/hooks/direct-connected?secret=your-own-secret"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedAuthUrl"
                },
                "example": {
                  "object": "HostedAuthUrl",
                  "url": "https://direct.lempile.com/connect/q1w2e3r4t5y6u7i8o9p0a1s2d3f4g5h6.j7k8l9z0x1c2v3b4n5m6"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/hosted/accounts/link\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\": \"create\", \"api_url\": \"https://direct.lempile.com\", \"providers\": [\"LINKEDIN\"], \"expiresOn\": \"2026-11-01T12:00:00.000Z\", \"name\": \"user_42\", \"success_redirect_url\": \"https://app.example.com/linkedin/connected\", \"failure_redirect_url\": \"https://app.example.com/linkedin/failed\", \"notify_url\": \"https://app.example.com/hooks/direct-connected?secret=your-own-secret\"}'"
          }
        ]
      }
    },
    "/api/v1/linkedin/search": {
      "post": {
        "tags": [
          "Search and companies"
        ],
        "operationId": "directSearchCompanies",
        "summary": "Search people, companies, posts or jobs",
        "description": "LinkedIn's classic search in Unipile's shape: people (10 a LinkedIn call), companies (keywords only), posts (3 by default) and jobs (25 a call), by Unipile's body, by a LinkedIn search page's `url`, or by `cursor` alone. `api: sales_navigator` or `recruiter` answers 403 `errors/feature_not_subscribed`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CompanySearchRequest"
                  },
                  {
                    "$ref": "#/components/schemas/PeopleSearchRequest"
                  },
                  {
                    "$ref": "#/components/schemas/PostSearchRequest"
                  },
                  {
                    "$ref": "#/components/schemas/JobSearchRequest"
                  },
                  {
                    "$ref": "#/components/schemas/UrlSearchRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CursorSearchRequest"
                  }
                ]
              },
              "example": {
                "api": "classic",
                "category": "people",
                "keywords": "founder",
                "network_distance": [
                  2
                ],
                "company": [
                  "1035"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedinSearch"
                },
                "example": {
                  "object": "LinkedinSearch",
                  "items": [
                    {
                      "type": "COMPANY",
                      "id": "1035",
                      "name": "Example Co",
                      "location": "Cambridge, MA",
                      "profile_url": "https://www.linkedin.com/company/example-co/",
                      "industry": "Software Development",
                      "summary": "Grow better",
                      "logo": "https://media.licdn.com/dms/image/logo1035/100.jpg",
                      "followers_count": 1200000
                    },
                    {
                      "type": "COMPANY",
                      "id": "2046",
                      "name": "Small Shop",
                      "location": null,
                      "profile_url": "https://www.linkedin.com/company/small-shop/",
                      "industry": "Retail",
                      "summary": null,
                      "followers_count": 845
                    }
                  ],
                  "config": {
                    "params": {
                      "api": "classic",
                      "category": "companies",
                      "keywords": "x"
                    }
                  },
                  "paging": {
                    "start": 0,
                    "page_count": 2,
                    "total_count": 2
                  },
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/linkedin/search?account_id=$ACCOUNT_ID&limit=10\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"api\": \"classic\", \"category\": \"people\", \"keywords\": \"founder\", \"company\": [\"1035\"]}'"
          }
        ]
      }
    },
    "/api/v1/messages/{message_id}": {
      "get": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directGetMessage",
        "summary": "Retrieve a message",
        "description": "One message by its id (a LinkedIn call by ids). 404 when LinkedIn doesn't know it.",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The message's id as Direct answers it.",
            "example": "2-_vptc2cwMDAzIQ"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                },
                "example": {
                  "object": "Message",
                  "id": "2-_vptc2cwMDAzIQ",
                  "provider_id": "2-_vptc2cwMDAzIQ",
                  "account_id": "00000000-0000-4000-8000-0000000000a1",
                  "chat_id": "2--_90aHJlYWQwMDAwIQ",
                  "chat_provider_id": "2--_90aHJlYWQwMDAwIQ",
                  "sender_id": "ACoAAAbcdefghijklmnop",
                  "sender_attendee_id": "ACoAAAbcdefghijklmnop",
                  "sender_urn": "urn:li:fsd_profile:ACoAAAbcdefghijklmnop",
                  "text": "message 3",
                  "attachments": [],
                  "timestamp": "2025-10-24T09:57:53.000Z",
                  "is_sender": 1,
                  "reactions": [],
                  "seen": 0,
                  "seen_by": {},
                  "hidden": 0,
                  "deleted": 0,
                  "edited": 0,
                  "is_event": 0,
                  "delivered": 1,
                  "behavior": null,
                  "original": "",
                  "message_type": "MESSAGE",
                  "attendee_type": "MEMBER",
                  "account_type": "LINKEDIN"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/messages/$MESSAGE_ID?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "delete": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directDeleteMessage",
        "summary": "Delete a message",
        "description": "Unipile's route: takes back one of the account's own messages for everyone, as LinkedIn's \"Delete\" does (`messengerMessages?action=recall`). Reads the message first: someone else's answers 403, one already deleted 422 `errors/action_already_performed`, and one sent more than 60 minutes ago 422 `errors/unprocessable_entity` (LinkedIn's limit, as Unipile says). Direct needs `account_id`, as on every inbox call.",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The message's id as Direct answers it.",
            "example": "2-_vptc2cwMDAzIQ"
          },
          {
            "$ref": "#/components/parameters/AccountIdWrite"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MessageDeleted"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "MessageDeleted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/messages/2-_vptc2cwMDAzIQ?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "patch": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directEditMessage",
        "summary": "Edit a message",
        "description": "Changes the text of one of the account's own messages, within 60 minutes of sending it (LinkedIn's limit; checked first: someone else's message answers 403, an older one 422 `errors/unprocessable_entity`).",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LinkedIn's message id (`2-…`, as Direct answers it)."
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditMessageRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "text": "Hi Bob, see you at 3pm"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Edited, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MessagePatched"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "MessagePatched"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X PATCH \"https://direct.lempile.com/api/v1/messages/2-QUFBQXRocmVhZPv_b25lMQ\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"$ACCOUNT_ID\", \"text\": \"Hi Bob, see you at 3pm\"}'"
          }
        ]
      }
    },
    "/api/v1/posts": {
      "post": {
        "tags": [
          "Posts"
        ],
        "operationId": "directCreatePost",
        "summary": "Create a post",
        "description": "Publishes a post (public, comments open), with mentions, a link, up to 20 images or one video, as the member or as a page. Files are uploaded first (multipart). With `repost`: a repost (LinkedIn's instant repost, or with `text` a repost with those words).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "text": "We shipped it today. Thanks {{0}} for the review!",
                "mentions": [
                  {
                    "name": "Bob Buyer",
                    "profile_id": "ACoAAAzyxwvutsrqponml"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCreated"
                },
                "example": {
                  "object": "PostCreated",
                  "post_id": "7389000000000000000",
                  "id": "7389000000000000000",
                  "share_url": "https://www.linkedin.com/feed/update/urn:li:activity:7389000000000000000/"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/posts\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Idempotency-Key: post-2026-10-29-1\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"text\": \"We shipped it today. Thanks {{0}} for the review!\", \"mentions\": [{\"name\": \"Bob Buyer\", \"profile_id\": \"ACoAAAzyxwvutsrqponml\"}]}'"
          }
        ]
      }
    },
    "/api/v1/posts/reaction": {
      "post": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directAddReaction",
        "summary": "React to a post or a comment",
        "description": "Adds the account's reaction (or the page's, with `as_organization`). Reacting again with another type replaces it on LinkedIn.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReactionRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "post_id": "urn:li:activity:7388000000000000000",
                "reaction_type": "like"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ReactionRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionAdded"
                },
                "example": {
                  "object": "ReactionAdded"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/posts/reaction\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"post_id\": \"urn:li:activity:7388000000000000000\", \"reaction_type\": \"like\"}'"
          }
        ]
      },
      "delete": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directRemoveReaction",
        "summary": "Remove a reaction",
        "description": "Direct's own route (Unipile has none): takes the account's reaction back. The fields go in the query or in a JSON body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "name": "post_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The post."
          },
          {
            "name": "comment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The comment, for a reaction on a comment."
          },
          {
            "name": "as_organization",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The page, for a page's reaction."
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Removed, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ReactionRemoved"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "ReactionRemoved"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/posts/reaction?account_id=$ACCOUNT_ID&post_id=urn%3Ali%3Aactivity%3A7388000000000000000\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/posts/{post_id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "operationId": "directGetPost",
        "summary": "Retrieve a post",
        "description": "One post (one LinkedIn call).",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Post"
                },
                "example": {
                  "object": "Post",
                  "provider": "LINKEDIN",
                  "id": "7388000000000000000",
                  "social_id": "urn:li:activity:7388000000000000000",
                  "share_url": "https://www.linkedin.com/posts/ada-sender_hello-activity-7388000000000000000-abcd",
                  "text": "Hello\nworld",
                  "date": "2d",
                  "parsed_datetime": "2025-10-25T23:54:22.402Z",
                  "reaction_counter": 12,
                  "comment_counter": 3,
                  "repost_counter": 1,
                  "impressions_counter": 0,
                  "author": {
                    "public_identifier": "ada-sender",
                    "id": "ACoAAAbcdefghijklmnop",
                    "name": "Ada Sender",
                    "is_company": false,
                    "headline": "Founder",
                    "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg"
                  },
                  "permissions": {
                    "can_react": true,
                    "can_share": true,
                    "can_post_comments": true
                  },
                  "is_repost": false,
                  "attachments": [
                    {
                      "id": "D1",
                      "type": "img",
                      "url": "https://media.licdn.com/dms/image/x/1280.jpg",
                      "url_expires_at": 1900000000000,
                      "size": {
                        "width": 1280,
                        "height": 1280
                      },
                      "mimetype": "image/jpeg",
                      "unavailable": false,
                      "sticker": false
                    }
                  ],
                  "mentions": []
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7388000000000000000?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "delete": {
        "tags": [
          "Posts"
        ],
        "operationId": "directDeletePost",
        "summary": "Delete a post",
        "description": "Reads the post first (it must be the account's own, or a page's), then deletes it. The account's own plain repost (its `repost_id`) is undone as LinkedIn's \"Delete repost\" does; the reposted post stays. Answers 204 with an empty body.",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "$ref": "#/components/parameters/AccountIdWrite"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "204": {
            "description": "Deleted (empty body)."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7389000000000000000?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/posts/{post_id}/comments": {
      "get": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directListComments",
        "summary": "List a post's comments",
        "description": "A post's comments, or with `comment_id` that comment's replies: newest first by default (`MOST_RECENT`, as Unipile), or in LinkedIn's relevance order (`MOST_RELEVANT`; replies oldest first, as LinkedIn's apps read them).",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MOST_RELEVANT",
                "MOST_RECENT"
              ],
              "default": "MOST_RECENT"
            },
            "description": "`MOST_RECENT` (the default, as Unipile's): newest first, page after page. `MOST_RELEVANT`: LinkedIn's relevance order (a comment's replies oldest first)."
          },
          {
            "name": "comment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "List this comment's replies instead (its id, digits)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentList"
                },
                "example": {
                  "object": "CommentList",
                  "items": [
                    {
                      "object": "Comment",
                      "id": "7390000000000000001",
                      "post_id": "7388000000000000000",
                      "post_urn": "urn:li:activity:7388000000000000000",
                      "author": "Bob Buyer",
                      "author_details": {
                        "id": "ACoAAAzyxwvutsrqponml",
                        "headline": "Founder",
                        "profile_url": "https://www.linkedin.com/in/bob-buyer",
                        "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                        "network_distance": "DISTANCE_2",
                        "is_company": false
                      },
                      "date": "2025-10-24T10:00:00.000Z",
                      "text": "Great point",
                      "reaction_counter": 4,
                      "reply_counter": 1
                    }
                  ],
                  "cursor": "eyJrIjoiY29tbWVudHMiLCJzIjoyfQ",
                  "total_items": 5,
                  "paging": {
                    "start": 0,
                    "page_count": 1,
                    "total_count": 5
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7388000000000000000/comments?account_id=$ACCOUNT_ID&sort_by=MOST_RECENT\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      },
      "post": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directCommentPost",
        "summary": "Comment on a post",
        "description": "A comment, or with `comment_id` a reply, with mentions, a link and one image, as the member or as a page.",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "text": "Agreed, the second point is the one people miss."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CommentRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "With `?dry_run=true`: the write's plan. Nothing is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRun"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentSent"
                },
                "example": {
                  "object": "CommentSent",
                  "comment_id": "7390000000000000009"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7388000000000000000/comments\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"text\": \"Agreed, the second point is the one people miss.\"}'"
          }
        ]
      }
    },
    "/api/v1/posts/{post_id}/comments/{comment_id}": {
      "delete": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directDeleteComment",
        "summary": "Delete a comment",
        "description": "Direct's own route (Unipile has none): deletes one of the account's comments.",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The comment's id (digits).",
            "example": "7390000000000000009"
          },
          {
            "$ref": "#/components/parameters/AccountIdWrite"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CommentDeleted"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "CommentDeleted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7388000000000000000/comments/7390000000000000009?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/posts/{post_id}/reactions": {
      "get": {
        "tags": [
          "Comments and reactions"
        ],
        "operationId": "directListReactions",
        "summary": "List a post's reactions",
        "description": "Who reacted to a post, or with `comment_id` to one of its comments.",
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The post: its id (digits), `urn:li:activity:…` (or a `ugcPost`/`share` urn) or its URL.",
            "example": "urn:li:activity:7388000000000000000"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "comment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "List this comment's reactions instead."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostReactionList"
                },
                "example": {
                  "object": "PostReactionList",
                  "items": [
                    {
                      "object": "PostReaction",
                      "value": "PRAISE",
                      "post_id": "7388000000000000000",
                      "author": {
                        "id": "ACoAAAzyxwvutsrqponml",
                        "type": "INDIVIDUAL",
                        "name": "Bob Buyer",
                        "headline": "Head of Sales",
                        "profile_url": "https://www.linkedin.com/in/bob-buyer/",
                        "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                        "public_identifier": "bob-buyer",
                        "network_distance": "SECOND_DEGREE"
                      }
                    }
                  ],
                  "cursor": null,
                  "paging": {
                    "cursor": null,
                    "start": 0,
                    "page_count": 1,
                    "total_count": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/posts/urn:li:activity:7388000000000000000/reactions?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "tags": [
          "Users and profiles"
        ],
        "operationId": "directListUsers",
        "summary": "Look up a profile by URL, or list chat attendees",
        "description": "With `provider_url`: that profile (`UserProfile`), as `GET /users/{identifier}`. Without: everyone the account has a conversation with, newest conversation first (`ChatAttendeeList`), as `GET /chat_attendees`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "provider_url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A LinkedIn profile URL (`https://www.linkedin.com/in/…`)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 100
            },
            "description": "Items per page: 1 to 250 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UserProfile"
                    },
                    {
                      "$ref": "#/components/schemas/ChatAttendeeList"
                    }
                  ]
                },
                "example": {
                  "object": "UserProfile",
                  "provider": "LINKEDIN",
                  "provider_id": "ACoAAAbcdefghijklmnop",
                  "public_identifier": "ada-sender",
                  "first_name": "Ada",
                  "last_name": "Sender",
                  "headline": "Founder at Example",
                  "websites": [],
                  "is_premium": false,
                  "is_influencer": false,
                  "is_creator": true,
                  "is_open_profile": true,
                  "is_relationship": false,
                  "is_self": true,
                  "public_profile_url": "https://www.linkedin.com/in/ada-sender/",
                  "member_urn": "123",
                  "location": "Paris, Île-de-France, France",
                  "primary_locale": {
                    "country": "US",
                    "language": "en"
                  },
                  "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                  "profile_picture_url_large": "https://media.licdn.com/dms/image/x/800.jpg",
                  "background_picture_url": "https://media.licdn.com/dms/image/x/1584.jpg"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users?account_id=$ACCOUNT_ID&provider_url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fada-sender%2F\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/followers": {
      "get": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directListFollowers",
        "summary": "List followers",
        "description": "The account's followers, newest first, as My Network → Followers lists them (one LinkedIn call a page; LinkedIn may answer a few less than `limit`, and the next page starts after the ones asked, as Unipile). `user_id` of another member answers an empty list (LinkedIn shows a member's follower count, never the list, to another account; Unipile answers the same); a company's answers 501. `GET /api/v1/users/following` answers Unipile's own 501 for LinkedIn.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A member's provider id: the account's own (the default), or another member's (an empty list)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Items per page: 1 to 100 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserFollowersList"
                },
                "example": {
                  "object": "UserFollowersList",
                  "items": [
                    {
                      "object": "UserFollower",
                      "id": "ACoAAAfollower00000000",
                      "urn": "urn:li:fsd_profile:ACoAAAfollower00000000",
                      "name": "Follower 0",
                      "headline": "Founder at Example 0",
                      "profile_url": "https://www.linkedin.com/in/ACoAAAfollower00000000",
                      "profile_picture_url": "https://media.licdn.com/dms/image/f0/100.jpg",
                      "profile_picture_url_large": "https://media.licdn.com/dms/image/f0/800.jpg"
                    }
                  ],
                  "cursor": "eyJrIjoiZm9sbG93ZXJzIiwicyI6MX0"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/followers?account_id=$ACCOUNT_ID&limit=100\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/invite": {
      "post": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directSendInvitation",
        "summary": "Send an invitation",
        "description": "Reads the person's top card first: a connection answers 422 `errors/already_connected`, an invitation already waiting `errors/already_invited_recently`, the account itself or someone who invited it `errors/cannot_invite_attendee`, an unknown profile `errors/invalid_recipient`. Then sends the invitation (one write).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "provider_id": "ACoAAAzyxwvutsrqponml",
                "message": "Hi Bob, good to meet you at the meetup."
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InviteRequest"
              },
              "encoding": {
                "attachments": {
                  "contentType": "application/octet-stream"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UserInvitationSent"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "UserInvitationSent",
                  "invitation_id": "7300000000000000002"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/users/invite\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Idempotency-Key: invite-bob-1\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"00000000-0000-4000-8000-0000000000a1\", \"provider_id\": \"ACoAAAzyxwvutsrqponml\", \"message\": \"Hi Bob, good to meet you at the meetup.\"}'"
          }
        ]
      }
    },
    "/api/v1/users/invite/sent": {
      "get": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directListSentInvitations",
        "summary": "List sent invitations",
        "description": "Invitations the account sent that are still waiting, newest first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationList"
                },
                "example": {
                  "object": "InvitationList",
                  "items": [
                    {
                      "object": "InvitationSent",
                      "id": "7300000000000000001",
                      "invited_user": "Bob Buyer",
                      "invited_user_id": "ACoAAAzyxwvutsrqponml",
                      "invited_user_public_id": "bob-buyer",
                      "invited_user_description": "Founder",
                      "date": "2025-10-24T10:00:00.000Z",
                      "parsed_datetime": "2025-10-24T10:00:00.000Z",
                      "invitation_text": "Hi Bob",
                      "specifics": {
                        "provider": "LINKEDIN",
                        "shared_secret": "secret-1"
                      },
                      "inviter": {
                        "inviter_name": "Ada Sender",
                        "inviter_id": "ACoAAAbcdefghijklmnop",
                        "inviter_public_identifier": "ada-sender",
                        "inviter_description": "Founder"
                      }
                    }
                  ],
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/invite/sent?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/invite/sent/{invitation_id}": {
      "delete": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directWithdrawInvitation",
        "summary": "Withdraw an invitation",
        "description": "Finds the invitation among the account's latest 100 sent (one read), then withdraws it. LinkedIn then blocks a new invitation to that person for about 3 weeks.",
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The invitation's id (digits), from `GET /users/invite/sent`.",
            "example": "7300000000000000001"
          },
          {
            "$ref": "#/components/parameters/AccountIdWrite"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Withdrawn, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvitationCanceled"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "InvitationCanceled"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/users/invite/sent/7300000000000000001?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/me": {
      "get": {
        "tags": [
          "Users and profiles"
        ],
        "operationId": "directGetOwnProfile",
        "summary": "Retrieve the account's own profile",
        "description": "The connected member: three LinkedIn calls the first time, then kept an hour. Its `profile_picture_url` is Direct's permanent copy of the member's own picture (see the field).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOwnerProfile"
                },
                "example": {
                  "object": "AccountOwnerProfile",
                  "provider": "LINKEDIN",
                  "provider_id": "ACoAAAbcdefghijklmnop",
                  "entity_urn": "urn:li:fsd_profile:ACoAAAbcdefghijklmnop",
                  "object_urn": "urn:li:member:123",
                  "first_name": "Ada",
                  "last_name": "Sender",
                  "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                  "public_profile_url": "https://www.linkedin.com/in/ada-sender/",
                  "public_identifier": "ada-sender",
                  "email": "ada@example.com",
                  "premium": true,
                  "open_profile": true,
                  "organizations": [],
                  "recruiter": null,
                  "sales_navigator": null,
                  "headline": "Founder",
                  "occupation": "Founder",
                  "location": "Paris, Île-de-France, France"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/me?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/relations": {
      "get": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directListRelations",
        "summary": "List relations",
        "description": "The account's connections, newest first (100 a LinkedIn call).",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            },
            "description": "Items per page: 1 to 1000 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Answers 501: filtering by name isn't done yet."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRelationsList"
                },
                "example": {
                  "object": "UserRelationsList",
                  "items": [
                    {
                      "object": "UserRelation",
                      "first_name": "First0",
                      "last_name": "Last0",
                      "headline": "Sales",
                      "public_identifier": "person-0",
                      "public_profile_url": "https://www.linkedin.com/in/person-0/",
                      "created_at": 1761000000000,
                      "member_id": "ACoAAAmember0000000000",
                      "member_urn": "urn:li:fsd_profile:ACoAAAmember0000000000",
                      "connection_urn": "urn:li:fsd_connection:ACoAAAmember0000000000",
                      "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg"
                    },
                    {
                      "object": "UserRelation",
                      "first_name": "First1",
                      "last_name": "Last1",
                      "headline": "Sales",
                      "public_identifier": "person-1",
                      "public_profile_url": "https://www.linkedin.com/in/person-1/",
                      "created_at": 1761000000001,
                      "member_id": "ACoAAAmember0000000001",
                      "member_urn": "urn:li:fsd_profile:ACoAAAmember0000000001",
                      "connection_urn": "urn:li:fsd_connection:ACoAAAmember0000000001",
                      "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg"
                    }
                  ],
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/relations?account_id=$ACCOUNT_ID&limit=100\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/{identifier}": {
      "get": {
        "tags": [
          "Users and profiles"
        ],
        "operationId": "directGetProfile",
        "summary": "Retrieve a profile",
        "description": "A member's profile, as Unipile answers it: its top card, the profile page's second card (followers, connections, mutual connections, verification) and its contact info (websites, emails, phones): three LinkedIn calls. `linkedin_sections` adds the sections. Someone from the account's recent conversations, read by provider id without sections, is answered from what the conversation showed, with no LinkedIn call (names, headline, picture, link, degree).",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The person: provider id (`ACo…`), public identifier, `urn:li:fsd_profile:…`, a profile URL (URL-encoded) or `me`.",
            "example": "ada-sender"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "linkedin_sections",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Sections to add: `*` (all, in full), `*_preview`, or any of `about`, `experience`, `education`, `skills`, `languages`, `certifications`, `volunteering_experience`, `projects`, `recommendations_received`, `recommendations_given`, `recruiting_activity`, each also `<name>_preview`. Repeat the parameter or separate with commas. `skills_preview` keeps the skills the profile shows; the other `_preview` values equal the full ones. Sections cost 1 to 6 more LinkedIn calls in all."
          },
          {
            "name": "linkedin_api",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Any value (`recruiter`, `sales_navigator`) answers 501."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfile"
                },
                "examples": {
                  "the account itself": {
                    "value": {
                      "object": "UserProfile",
                      "provider": "LINKEDIN",
                      "provider_id": "ACoAAAbcdefghijklmnop",
                      "public_identifier": "ada-sender",
                      "first_name": "Ada",
                      "last_name": "Sender",
                      "headline": "Founder at Example",
                      "websites": [],
                      "is_premium": false,
                      "is_influencer": false,
                      "is_creator": true,
                      "is_open_profile": true,
                      "is_relationship": false,
                      "is_self": true,
                      "public_profile_url": "https://www.linkedin.com/in/ada-sender/",
                      "member_urn": "123",
                      "location": "Paris, Île-de-France, France",
                      "primary_locale": {
                        "country": "US",
                        "language": "en"
                      },
                      "profile_picture_url": "https://media.licdn.com/dms/image/x/100.jpg",
                      "profile_picture_url_large": "https://media.licdn.com/dms/image/x/800.jpg",
                      "background_picture_url": "https://media.licdn.com/dms/image/x/800.jpg",
                      "follower_count": 973,
                      "connections_count": 970,
                      "is_verified": false
                    }
                  },
                  "a connection": {
                    "value": {
                      "object": "UserProfile",
                      "provider": "LINKEDIN",
                      "provider_id": "ACoAAAbcdefghijklmnop",
                      "public_identifier": "ada-sender",
                      "first_name": "Ada",
                      "last_name": "Sender",
                      "headline": "Founder at Example",
                      "websites": [
                        "https://example.com"
                      ],
                      "is_premium": false,
                      "is_influencer": false,
                      "is_creator": true,
                      "is_open_profile": true,
                      "is_relationship": true,
                      "is_self": false,
                      "public_profile_url": "https://www.linkedin.com/in/ada-sender/",
                      "member_urn": "123",
                      "location": "Paris, Île-de-France, France",
                      "primary_locale": {
                        "country": "US",
                        "language": "en"
                      },
                      "profile_picture_url": "https://media.licdn.com/dms/image/x/100.jpg",
                      "profile_picture_url_large": "https://media.licdn.com/dms/image/x/800.jpg",
                      "background_picture_url": "https://media.licdn.com/dms/image/x/800.jpg",
                      "follower_count": 973,
                      "connections_count": 970,
                      "is_verified": true,
                      "network_distance": "FIRST_DEGREE",
                      "connected_at": 1761000000000,
                      "shared_connections_count": 1,
                      "contact_info": {
                        "emails": [
                          "ada@example.com"
                        ]
                      }
                    }
                  },
                  "with every section": {
                    "value": {
                      "object": "UserProfile",
                      "provider": "LINKEDIN",
                      "provider_id": "ACoAAAbcdefghijklmnop",
                      "public_identifier": "ada-sender",
                      "first_name": "Ada",
                      "last_name": "Sender",
                      "headline": "Founder at Example",
                      "websites": [
                        "https://example.com"
                      ],
                      "is_premium": false,
                      "is_influencer": false,
                      "is_creator": true,
                      "is_open_profile": true,
                      "is_relationship": true,
                      "is_self": false,
                      "public_profile_url": "https://www.linkedin.com/in/ada-sender/",
                      "member_urn": "123",
                      "location": "Paris, Île-de-France, France",
                      "primary_locale": {
                        "country": "US",
                        "language": "en"
                      },
                      "profile_picture_url": "https://media.licdn.com/dms/image/x/100.jpg",
                      "profile_picture_url_large": "https://media.licdn.com/dms/image/x/800.jpg",
                      "background_picture_url": "https://media.licdn.com/dms/image/x/800.jpg",
                      "network_distance": "FIRST_DEGREE",
                      "contact_info": {
                        "emails": [
                          "ada@example.com"
                        ],
                        "phones": [
                          "+33 1 23 45 67 89"
                        ],
                        "socials": [
                          {
                            "type": "twitter",
                            "name": "adasender"
                          }
                        ]
                      },
                      "birthdate": {
                        "month": 4,
                        "day": 12
                      },
                      "summary": "I build things.\nMostly outbound.",
                      "education": [
                        {
                          "school": "Example School",
                          "start": "9/1/2012",
                          "end": "6/1/2014",
                          "id": "101",
                          "degree": "Master's Degree",
                          "field_of_study": "Computer Science",
                          "school_id": "8398",
                          "school_url": "https://www.linkedin.com/school/example/",
                          "school_picture_url": "https://media.licdn.com/dms/image/logo/200.jpg"
                        }
                      ],
                      "education_total_count": 1,
                      "languages": [
                        {
                          "name": "French",
                          "proficiency": "Native or bilingual proficiency"
                        },
                        {
                          "name": "German",
                          "proficiency": "Limited working proficiency"
                        }
                      ],
                      "languages_total_count": 2,
                      "skills": [
                        {
                          "name": "Skill 0",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 1",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 2",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 3",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 4",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 5",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 6",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 7",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 8",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 9",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 10",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 11",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 12",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 13",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 14",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 15",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 16",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 17",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 18",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 19",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 20",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 21",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 22",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 23",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        },
                        {
                          "name": "Skill 24",
                          "endorsement_count": 0,
                          "endorsement_id": null,
                          "insights": [],
                          "endorsed": false
                        }
                      ],
                      "skills_total_count": 25,
                      "certifications": [
                        {
                          "name": "Cloud Practitioner",
                          "organization": "Example Cloud",
                          "url": "https://example.com/cert"
                        }
                      ],
                      "certifications_total_count": 1,
                      "volunteering_experience": [
                        {
                          "company": "Food Bank",
                          "description": "Weekends.",
                          "role": "Driver",
                          "cause": "POVERTY_ALLEVIATION",
                          "start": "1/1/2019",
                          "end": "1/1/2021"
                        }
                      ],
                      "volunteering_experience_total_count": 1,
                      "projects": [],
                      "projects_total_count": 0,
                      "recruiting_activity": [],
                      "work_experience": [
                        {
                          "id": "2398765",
                          "position": "Founder",
                          "company": "Example Co",
                          "skills": [],
                          "current": true,
                          "start": "2/1/2024",
                          "end": null,
                          "company_id": "1035",
                          "company_url": "https://www.linkedin.com/company/example-co/",
                          "company_picture_url": "https://media.licdn.com/dms/image/logo/200.jpg",
                          "location": "Paris, Île-de-France, France",
                          "description": "Building it.",
                          "status": "Full-time"
                        },
                        {
                          "id": "1111111",
                          "position": "Engineer",
                          "company": "Example Co",
                          "skills": [],
                          "current": false,
                          "start": "1/1/2020",
                          "end": "1/1/2024",
                          "company_id": "1035",
                          "company_url": "https://www.linkedin.com/company/example-co/",
                          "company_picture_url": "https://media.licdn.com/dms/image/logo/200.jpg"
                        },
                        {
                          "id": "2222222",
                          "position": "Intern",
                          "company": "Side Project",
                          "skills": [],
                          "current": true,
                          "start": "1/1/2018",
                          "end": null
                        }
                      ],
                      "work_experience_total_count": 3,
                      "recommendations": {
                        "received": [
                          {
                            "caption": "May 3, 2010, Bob managed Ada directly",
                            "text": "Ada ships.",
                            "actor": {
                              "first_name": "Bob",
                              "last_name": "Buyer",
                              "provider_id": "ACoAAAzyxwvutsrqponml",
                              "headline": "Head of Sales",
                              "public_identifier": "bob-buyer",
                              "public_profile_url": "https://www.linkedin.com/in/bob-buyer",
                              "profile_picture_url": "https://media.licdn.com/dms/image/x/200.jpg"
                            }
                          }
                        ],
                        "received_total_count": 1,
                        "given": [],
                        "given_total_count": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/ada-sender?account_id=$ACCOUNT_ID&linkedin_sections=experience,skills_preview\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/{identifier}/posts": {
      "get": {
        "tags": [
          "Posts"
        ],
        "operationId": "directListUserPosts",
        "summary": "List a profile's or a company's posts",
        "description": "A member's posts, newest first (20 a LinkedIn call; `me` for the account's own), or with `is_company=true` a company page's (`identifier` = its id or universal name).",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The person: provider id (`ACo…`), public identifier, `urn:li:fsd_profile:…`, a profile URL (URL-encoded) or `me`.",
            "example": "ada-sender"
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "is_company",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: `identifier` is a company."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostList"
                },
                "example": {
                  "object": "PostList",
                  "items": [
                    {
                      "object": "Post",
                      "provider": "LINKEDIN",
                      "id": "7388000000000000000",
                      "social_id": "urn:li:activity:7388000000000000000",
                      "share_url": "https://www.linkedin.com/posts/ada-sender_hello-activity-7388000000000000000-abcd",
                      "text": "Hello\nworld",
                      "date": "2d",
                      "parsed_datetime": "2025-10-25T23:54:22.402Z",
                      "reaction_counter": 12,
                      "comment_counter": 3,
                      "repost_counter": 1,
                      "impressions_counter": 0,
                      "author": {
                        "public_identifier": "ada-sender",
                        "id": "ACoAAAbcdefghijklmnop",
                        "name": "Ada Sender",
                        "is_company": false,
                        "headline": "Founder",
                        "profile_picture_url": "https://media.licdn.com/dms/image/x/400.jpg"
                      },
                      "permissions": {
                        "can_react": true,
                        "can_share": true,
                        "can_post_comments": true
                      },
                      "is_repost": false,
                      "attachments": [
                        {
                          "id": "D1",
                          "type": "img",
                          "url": "https://media.licdn.com/dms/image/x/1280.jpg",
                          "url_expires_at": 1900000000000,
                          "size": {
                            "width": 1280,
                            "height": 1280
                          },
                          "mimetype": "image/jpeg",
                          "unavailable": false,
                          "sticker": false
                        }
                      ],
                      "mentions": []
                    }
                  ],
                  "paging": {
                    "page_count": 1
                  },
                  "cursor": "eyJrIjoicG9zdHMiLCJzIjoxLCJ0IjoidG9rLTEifQ"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/users/me/posts?account_id=$ACCOUNT_ID&limit=10\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "directCreateWebhook",
        "summary": "Create a webhook",
        "description": "Registers a URL for one source's events. The webhook belongs to the key's workspace: only that workspace's accounts send to it. The poller starts reading the accounts it covers within a minute.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              },
              "example": {
                "request_url": "https://app.example.com/hooks/linkedin-messages",
                "source": "messaging",
                "name": "messages",
                "headers": [
                  {
                    "key": "x-webhook-secret",
                    "value": "your-own-secret"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                },
                "example": {
                  "object": "WebhookCreated",
                  "webhook_id": "a1B2c3D4e5F6g7H8i9J0kL"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/webhooks\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"request_url\": \"https://app.example.com/hooks/linkedin-messages\", \"source\": \"messaging\", \"name\": \"messages\", \"headers\": [{\"key\": \"x-webhook-secret\", \"value\": \"your-own-secret\"}]}'"
          }
        ]
      },
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "directListWebhooks",
        "summary": "List webhooks",
        "description": "This key's workspace's webhooks, header values masked.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 100
            },
            "description": "Items per page: 1 to 250 (default 100)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookList"
                },
                "example": {
                  "object": "WebhookList",
                  "items": [
                    {
                      "object": "Webhook",
                      "id": "a1B2c3D4e5F6g7H8i9J0kL",
                      "account_ids": [],
                      "enabled": true,
                      "name": "messages",
                      "request_url": "https://app.example.com/hooks/linkedin-messages",
                      "format": "json",
                      "headers": [
                        {
                          "key": "x-webhook-secret",
                          "value": "********"
                        }
                      ],
                      "data": [],
                      "events": [
                        "message_received",
                        "message_read",
                        "message_reaction",
                        "message_edited",
                        "message_deleted",
                        "message_delivered"
                      ],
                      "type": "AUTO",
                      "source": "messaging"
                    }
                  ],
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS \"https://direct.lempile.com/api/v1/webhooks\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/webhooks/{hook_id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "directDeleteWebhook",
        "summary": "Delete a webhook",
        "description": "Deletes one of this key's workspace's webhooks (another workspace's answers 404); its deliveries still pending are dropped.",
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The webhook's id.",
            "example": "a1B2c3D4e5F6g7H8i9J0kL"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeleted"
                },
                "example": {
                  "object": "WebhookDeleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/webhooks/$WEBHOOK_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/linkedin/search/parameters": {
      "get": {
        "tags": [
          "Search and companies"
        ],
        "operationId": "directSearchParameters",
        "summary": "Find search parameter ids",
        "description": "LinkedIn's own typeahead: the ids its search filters take, for `LOCATION`, `REGION`, `PEOPLE`, `CONNECTIONS`, `COMPANY`, `SCHOOL`, `INDUSTRY`, `JOB_TITLE` and `SKILL` (one LinkedIn call). Other classic types answer 501; Sales Navigator and Recruiter types or services answer 403 `errors/feature_not_subscribed`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LOCATION, REGION, PEOPLE, CONNECTIONS, COMPANY, SCHOOL, INDUSTRY, JOB_TITLE or SKILL."
          },
          {
            "name": "keywords",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "What to look for (required)."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CLASSIC",
                "RECRUITER",
                "SALES_NAVIGATOR"
              ],
              "default": "CLASSIC"
            },
            "description": "Only CLASSIC is served."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedinSearchParametersList"
                },
                "example": {
                  "object": "LinkedinSearchParametersList",
                  "items": [
                    {
                      "object": "LinkedinSearchParameter",
                      "id": "105015875",
                      "title": "Paris, Île-de-France, France"
                    }
                  ],
                  "paging": {
                    "page_count": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X GET \"https://direct.lempile.com/api/v1/linkedin/search/parameters?account_id=$ACCOUNT_ID&type=LOCATION&keywords=paris\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/linkedin/company/{identifier}": {
      "get": {
        "tags": [
          "Search and companies"
        ],
        "operationId": "directGetCompany",
        "summary": "Retrieve a company page",
        "description": "A company page by its public identifier, id, urn or link (one LinkedIn call). Its employees: `POST /linkedin/search` with `category: people` and `company: [id]`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The company's public identifier (`example-co`), id (`1035`), urn or link."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyProfile"
                },
                "example": {
                  "object": "CompanyProfile",
                  "id": "1035",
                  "name": "Example Co",
                  "description": "We make outbound simple.",
                  "entity_urn": "urn:li:fsd_company:1035",
                  "public_identifier": "example-co",
                  "profile_url": "https://www.linkedin.com/company/example-co/",
                  "tagline": "Grow better",
                  "followers_count": 5400,
                  "is_following": true,
                  "is_employee": false,
                  "hashtags": [
                    {
                      "title": "#outbound"
                    }
                  ],
                  "messaging": {
                    "is_enabled": false
                  },
                  "claimed": true,
                  "viewer_permissions": {
                    "canReadAdminDashboard": false
                  },
                  "organization_type": "PRIVATELY_HELD",
                  "locations": [
                    {
                      "is_headquarter": true,
                      "country": "US",
                      "city": "Boston",
                      "street": [
                        "1 Main St"
                      ],
                      "postalCode": "02110",
                      "area": "MA"
                    }
                  ],
                  "industry": [
                    "Software Development"
                  ],
                  "employee_count": 120,
                  "employee_count_range": {
                    "from": 51,
                    "to": 200
                  },
                  "website": "https://example.com",
                  "foundation_date": "2015"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X GET \"https://direct.lempile.com/api/v1/linkedin/company/example-co?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/linkedin": {
      "post": {
        "tags": [
          "Search and companies"
        ],
        "operationId": "directRawData",
        "summary": "Raw LinkedIn data (reads)",
        "description": "Unipile's raw route, for reads: a GET of one of LinkedIn's API addresses with the account's own session, paced and counted like every read. Writes (any other method, or an `action=`) answer 501: they go through Direct's own routes, each checked and dry-runnable.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RawDataRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "request_url": "https://www.linkedin.com/voyager/api/me"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedinRawData"
                },
                "example": {
                  "object": "LinkedinRawData",
                  "data": {
                    "data": {
                      "plainId": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/linkedin\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"$ACCOUNT_ID\", \"request_url\": \"https://www.linkedin.com/voyager/api/me\"}'"
          }
        ]
      }
    },
    "/api/v1/users/invite/received": {
      "get": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directListReceivedInvitations",
        "summary": "List received invitations",
        "description": "Invitations the account received that wait for its answer, newest first, each with the `shared_secret` accepting or declining it takes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceivedList"
                },
                "example": {
                  "object": "InvitationList",
                  "items": [
                    {
                      "object": "InvitationReceived",
                      "id": "7400000000000000000",
                      "invited_user": "Ada Sender",
                      "invited_user_id": "ACoAAAbcdefghijklmnop",
                      "invited_user_public_id": "ada-sender",
                      "invited_user_description": "Founder",
                      "date": "2025-10-24T10:00:00.000Z",
                      "parsed_datetime": "2025-10-24T10:00:00.000Z",
                      "invitation_text": "Hi Ada, let's connect",
                      "inviter": {
                        "inviter_name": "Bob Buyer",
                        "inviter_id": "ACoAAAzyxwvutsrqponml",
                        "inviter_public_identifier": "bob-buyer",
                        "inviter_description": "CTO"
                      },
                      "specifics": {
                        "provider": "LINKEDIN",
                        "shared_secret": "s3cret0"
                      }
                    }
                  ],
                  "cursor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X GET \"https://direct.lempile.com/api/v1/users/invite/received?account_id=$ACCOUNT_ID&limit=10\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/invite/received/{invitation_id}": {
      "post": {
        "tags": [
          "Relations and invitations"
        ],
        "operationId": "directHandleInvitation",
        "summary": "Accept or decline a received invitation",
        "description": "Accepts the invitation, or declines it (LinkedIn's Ignore). Reads the account's latest 100 received invitations first: an unknown id answers 404, a wrong `shared_secret` 400.",
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The invitation's id (digits)."
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HandleInvitationRequest"
              },
              "example": {
                "provider": "LINKEDIN",
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "action": "accept",
                "shared_secret": "s3cret0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Handled, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UserInvitationHandled"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "UserInvitationHandled",
                  "status": "ACCEPTED"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/users/invite/received/7400000000000000000\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"provider\": \"LINKEDIN\", \"account_id\": \"$ACCOUNT_ID\", \"action\": \"accept\", \"shared_secret\": \"s3cret0\"}'"
          }
        ]
      }
    },
    "/api/v1/users/{identifier}/comments": {
      "get": {
        "tags": [
          "Users and profiles"
        ],
        "operationId": "directListUserComments",
        "summary": "List a member's comments",
        "description": "The comments the member wrote, from their profile's activity (20 posts a LinkedIn call), newest first.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The member's provider id (ACo…), public identifier, or `me`."
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserCommentList"
                },
                "example": {
                  "object": "CommentList",
                  "items": [
                    {
                      "object": "Comment",
                      "id": "7391000000000000001",
                      "post_id": "7390000000000000004",
                      "post_urn": "urn:li:activity:7390000000000000004",
                      "author": "Ada Sender",
                      "author_details": {
                        "id": "ACoAAAbcdefghijklmnop",
                        "headline": "Founder",
                        "profile_url": "https://www.linkedin.com/in/ada-sender",
                        "profile_picture_url": null,
                        "network_distance": null
                      },
                      "date": "2025-10-24T10:00:00.000Z",
                      "text": "Great point",
                      "reaction_counter": 3,
                      "reply_counter": 1
                    }
                  ],
                  "cursor": null,
                  "paging": {
                    "page_count": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X GET \"https://direct.lempile.com/api/v1/users/ACoAAAbcdefghijklmnop/comments?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/users/{identifier}/reactions": {
      "get": {
        "tags": [
          "Users and profiles"
        ],
        "operationId": "directListUserReactions",
        "summary": "List a member's reactions",
        "description": "The posts the member reacted to, from their profile's activity (20 a LinkedIn call), newest first, with the reaction LinkedIn shows.",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The member's provider id (ACo…), public identifier, or `me`."
          },
          {
            "$ref": "#/components/parameters/AccountId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Items per page: 1 to 100 (default 10)."
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserReactionList"
                },
                "example": {
                  "object": "PostReactionList",
                  "items": [
                    {
                      "object": "PostReaction",
                      "value": "PRAISE",
                      "post_id": "7390000000000000005",
                      "author": {
                        "id": "ACoAAAbcdefghijklmnop",
                        "type": "INDIVIDUAL",
                        "name": "Ada Sender",
                        "headline": null,
                        "profile_url": "https://www.linkedin.com/in/ada-sender/",
                        "profile_picture_url": null
                      }
                    }
                  ],
                  "cursor": null,
                  "paging": {
                    "page_count": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X GET \"https://direct.lempile.com/api/v1/users/ACoAAAbcdefghijklmnop/reactions?account_id=$ACCOUNT_ID\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\""
          }
        ]
      }
    },
    "/api/v1/messages/{message_id}/reaction": {
      "post": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directAddMessageReaction",
        "summary": "React to a message",
        "description": "Adds the account's emoji reaction to a message (the message is read first: unknown answers 404).",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LinkedIn's message id (`2-…`, as Direct answers it)."
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReactionRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "reaction": "👍"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Added, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MessageReactionAdded"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "MessageReactionAdded",
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X POST \"https://direct.lempile.com/api/v1/messages/2-QUFBQXRocmVhZPv_b25lMQ/reaction\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"$ACCOUNT_ID\", \"reaction\": \"👍\"}'"
          }
        ]
      },
      "delete": {
        "tags": [
          "Chats and messages"
        ],
        "operationId": "directRemoveMessageReaction",
        "summary": "Remove a message reaction",
        "description": "Takes the account's emoji reaction off a message. `reaction` in a JSON body or the query.",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "LinkedIn's message id (`2-…`, as Direct answers it)."
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/DryRun"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "reaction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The emoji, when the body doesn't name it."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReactionRequest"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "reaction": "👍"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Removed, or with `?dry_run=true` the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MessageReactionRemoved"
                    },
                    {
                      "$ref": "#/components/schemas/DryRun"
                    }
                  ]
                },
                "example": {
                  "object": "MessageReactionRemoved",
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ProviderError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/NetworkDown"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -sS -X DELETE \"https://direct.lempile.com/api/v1/messages/2-QUFBQXRocmVhZPv_b25lMQ/reaction\" \\\n  -H \"X-API-KEY: $DIRECT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"account_id\": \"$ACCOUNT_ID\", \"reaction\": \"👍\"}'"
          }
        ]
      }
    }
  },
  "webhooks": {
    "messageReceived": {
      "post": {
        "operationId": "directWebhookMessageReceived",
        "summary": "messaging: message_received",
        "description": "A new message in one of the account's chats, received or sent (from Direct or from LinkedIn's own apps). Within seconds, from LinkedIn's own live connection (polling is the backstop). The same payload carries `message_read` (with `read_by`), `message_reaction` (with `reaction`, `reaction_sender`), `message_edited` and `message_deleted` (`message: null`). Delivered as a POST (`content-type: application/json`, or a form with `format: form`), with the webhook's own headers and `user-agent: Lempile-Direct-Webhooks/1`. Answer any 2xx within 30 seconds. A 5xx, 408, 425, 429, a timeout or a refused connection is tried again 30 s, 2 min, 10 min, 30 min and 2 h later; any other answer is final.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReceivedEvent"
              },
              "example": {
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "account_type": "LINKEDIN",
                "account_info": {
                  "type": "LINKEDIN",
                  "feature": "classic",
                  "user_id": "ACoAAAbcdefghijklmnop"
                },
                "event": "message_received",
                "chat_id": "2-QUFBQXRocmVhZPv_b25lMQ",
                "timestamp": "2026-10-29T09:41:07.000Z",
                "webhook_name": "messages",
                "message_id": "2-_vptc2cwMTMyIQ",
                "message": "Sounds good",
                "sender": {
                  "attendee_id": "ACoAAAzyxwvutsrqponml",
                  "attendee_name": "Bob Buyer",
                  "attendee_provider_id": "ACoAAAzyxwvutsrqponml",
                  "attendee_profile_url": "https://www.linkedin.com/in/ACoAAAzyxwvutsrqponml",
                  "attendee_public_identifier": null,
                  "attendee_specifics": {
                    "provider": "LINKEDIN",
                    "member_urn": "urn:li:member:123456789",
                    "network_distance": "DISTANCE_1",
                    "occupation": "Head of Sales at Example",
                    "is_company": false
                  }
                },
                "attendees": [
                  {
                    "attendee_id": "ACoAAAzyxwvutsrqponml",
                    "attendee_name": "Bob Buyer",
                    "attendee_provider_id": "ACoAAAzyxwvutsrqponml",
                    "attendee_profile_url": "https://www.linkedin.com/in/ACoAAAzyxwvutsrqponml",
                    "attendee_public_identifier": null,
                    "attendee_specifics": {
                      "provider": "LINKEDIN",
                      "member_urn": "urn:li:member:123456789",
                      "network_distance": "DISTANCE_1",
                      "occupation": "Head of Sales at Example",
                      "is_company": false
                    }
                  }
                ],
                "attachments": [],
                "is_sender": false,
                "subject": null,
                "provider_chat_id": "2-QUFBQXRocmVhZPv_b25lMQ",
                "provider_message_id": "2-_vptc2cwMTMyIQ",
                "is_event": 0,
                "chat_pinned": 0,
                "quoted": null,
                "reply_to": null,
                "is_forwarded": null,
                "is_view_once": null,
                "chat_content_type": null,
                "message_type": "MESSAGE",
                "is_group": false,
                "folder": [
                  "INBOX",
                  "INBOX_LINKEDIN_CLASSIC"
                ],
                "event_type": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx: delivered, never sent again."
          }
        }
      }
    },
    "newRelation": {
      "post": {
        "operationId": "directWebhookNewRelation",
        "summary": "users: new_relation",
        "description": "A new connection. The newest relations are read within seconds when LinkedIn's live connection hints at one (an invitation event, the notifications or My Network badge going up, an in-app alert: an accepted invitation is a notification), and every 30 to 60 minutes while the account is awake in any case (Unipile's own: up to 8 hours after, by polling). Delivered as a POST (`content-type: application/json`, or a form with `format: form`), with the webhook's own headers and `user-agent: Lempile-Direct-Webhooks/1`. Answer any 2xx within 30 seconds. A 5xx, 408, 425, 429, a timeout or a refused connection is tried again 30 s, 2 min, 10 min, 30 min and 2 h later; any other answer is final.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRelationEvent"
              },
              "example": {
                "event": "new_relation",
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "account_type": "LINKEDIN",
                "webhook_name": "relations",
                "user_full_name": "Bob Buyer",
                "user_provider_id": "ACoAAAzyxwvutsrqponml",
                "user_public_identifier": "bob-buyer",
                "user_profile_url": "https://www.linkedin.com/in/bob-buyer/",
                "user_picture_url": "https://media.licdn.com/dms/image/x/400.jpg",
                "timestamp": 1793260931000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx: delivered, never sent again."
          }
        }
      }
    },
    "accountStatus": {
      "post": {
        "operationId": "directWebhookAccountStatus",
        "summary": "account_status",
        "description": "An account's status changed (`OK`, `CREDENTIALS`, `ERROR`, `CONNECTING`), or it was connected (`CREATION_SUCCESS`), reconnected (`RECONNECTED`), resynced (`SYNC_SUCCESS`) or removed (`DELETED`). Delivered as a POST (`content-type: application/json`, or a form with `format: form`), with the webhook's own headers and `user-agent: Lempile-Direct-Webhooks/1`. Answer any 2xx within 30 seconds. A 5xx, 408, 425, 429, a timeout or a refused connection is tried again 30 s, 2 min, 10 min, 30 min and 2 h later; any other answer is final.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountStatusEvent"
              },
              "example": {
                "AccountStatus": {
                  "account_id": "00000000-0000-4000-8000-0000000000a1",
                  "account_type": "LINKEDIN",
                  "message": "CREDENTIALS"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx: delivered, never sent again."
          }
        }
      }
    },
    "hostedAuthNotify": {
      "post": {
        "operationId": "directHostedAuthNotify",
        "summary": "Hosted auth notify_url",
        "description": "Sent to a hosted auth link's `notify_url` once the account is connected and checked. Not a registered webhook: no extra headers are added, so put your own secret in the URL. Delivered as a POST (`content-type: application/json`, or a form with `format: form`), with the webhook's own headers and `user-agent: Lempile-Direct-Webhooks/1`. Answer any 2xx within 30 seconds. A 5xx, 408, 425, 429, a timeout or a refused connection is tried again 30 s, 2 min, 10 min, 30 min and 2 h later; any other answer is final.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostedAuthNotification"
              },
              "example": {
                "status": "CREATION_SUCCESS",
                "account_id": "00000000-0000-4000-8000-0000000000a1",
                "account_type": "LINKEDIN",
                "name": "user_42"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx: delivered, never sent again."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "description": "A Lempile Direct API key, made for your workspace in Lempile's dashboard. It sees only its workspace's accounts and webhooks."
      }
    },
    "parameters": {
      "AccountId": {
        "name": "account_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The account that reads: a Lempile LinkedIn account id (`GET /accounts` lists them).",
        "example": "00000000-0000-4000-8000-0000000000a1"
      },
      "AccountIdOptional": {
        "name": "account_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "The account that writes, when the body doesn't name it."
      },
      "AccountIdWrite": {
        "name": "account_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The account that writes."
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "A cursor a previous page gave."
      },
      "DryRun": {
        "name": "dry_run",
        "in": "query",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        },
        "description": "`true`: answer the write's plan (`DryRun`, 200) and send nothing to LinkedIn."
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": "The same key (per account) never writes twice: a repeat answers the first answer for 7 days; a repeat while the first runs answers 409."
      }
    },
    "headers": {
      "RetryAfter": {
        "description": "Seconds to wait before this account's next call.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A required parameter missing (`errors/missing_parameters`), or one that isn't valid (`errors/invalid_parameters`, `errors/invalid_url`, `errors/content_too_large`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing_parameters": {
                "value": {
                  "title": "Missing parameters",
                  "detail": "account_id is required.",
                  "type": "errors/missing_parameters",
                  "status": 400
                }
              },
              "invalid_parameters": {
                "value": {
                  "title": "Invalid parameters",
                  "detail": "limit must be between 1 and 100.",
                  "type": "errors/invalid_parameters",
                  "status": 400
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "`errors/missing_credentials`: the `X-API-KEY` header is missing, wrong or revoked. `errors/disconnected_account`: LinkedIn signed the account out (or asks it for a security check); reconnect it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing_credentials": {
                "value": {
                  "title": "Missing credentials",
                  "detail": "The X-API-KEY header is missing or wrong.",
                  "type": "errors/missing_credentials",
                  "status": 401
                }
              },
              "disconnected_account": {
                "value": {
                  "title": "Disconnected account",
                  "detail": "LinkedIn signed this account out. Reconnect it.",
                  "type": "errors/disconnected_account",
                  "status": 401
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "LinkedIn refused it for this account (`errors/resource_access_restricted`, `errors/account_restricted`, `errors/action_required`), or the account doesn't write through Direct (`errors/insufficient_permissions`), or it needs Sales Navigator or Recruiter (`errors/feature_not_subscribed`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "resource_access_restricted": {
                "value": {
                  "title": "Access restricted",
                  "detail": "LinkedIn refused this read for this account.",
                  "type": "errors/resource_access_restricted",
                  "status": 403
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "`errors/resource_not_found`: an unknown or removed account, an account of another workspace (answered exactly the same), or nothing on LinkedIn with this id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "resource_not_found": {
                "value": {
                  "title": "Account not found",
                  "detail": "No account with this account_id is enabled here.",
                  "type": "errors/resource_not_found",
                  "status": 404
                }
              }
            }
          }
        }
      },
      "Unprocessable": {
        "description": "A write LinkedIn refuses, or that the checks before it refuse: `errors/already_connected`, `errors/already_invited_recently`, `errors/cannot_invite_attendee`, `errors/invalid_recipient`, `errors/cannot_resend_yet`, `errors/limit_exceeded`, `errors/connection_limit_reached`, `errors/no_connection_with_recipient`, `errors/not_allowed_inmail`, `errors/insufficient_credits`, `errors/invalid_post`, `errors/unprocessable_entity`, `errors/invalid_parameters`, `errors/invalid_message` (a voice note over 60 seconds), `errors/action_already_performed` (a message already deleted), `errors/not_supported_by_provider`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "already_connected": {
                "value": {
                  "title": "Already connected",
                  "detail": "This person is already a connection of the account.",
                  "type": "errors/already_connected",
                  "status": 422
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "`errors/too_many_requests`: LinkedIn asked the account to slow down (it rests 15 minutes), its daily calls or writes are used up, or it's busy with other calls. Wait `retry_after` seconds.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "rest": {
                "value": {
                  "title": "Too many requests",
                  "detail": "LinkedIn asked this account to slow down.",
                  "type": "errors/too_many_requests",
                  "status": 429,
                  "retry_after": 900
                }
              }
            }
          }
        }
      },
      "ProviderError": {
        "description": "`errors/provider_error`: LinkedIn answered something Direct couldn't read (nothing was written). `errors/unexpected_error`: Direct failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "provider_error": {
                "value": {
                  "title": "Provider error",
                  "detail": "LinkedIn answered 500.",
                  "type": "errors/provider_error",
                  "status": 500
                }
              }
            }
          }
        }
      },
      "NotImplemented": {
        "description": "`errors/feature_not_implemented`: Direct doesn't do this (yet). A Unipile client can fall back to Unipile.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "feature_not_implemented": {
                "value": {
                  "title": "Missing feature",
                  "detail": "Lempile Direct reads LinkedIn only (see /api/v1/users and /api/v1/posts).",
                  "type": "errors/feature_not_implemented",
                  "status": 501
                }
              }
            }
          }
        }
      },
      "NetworkDown": {
        "description": "`errors/network_down`: the account's proxy or browser server didn't answer. Nothing was sent.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "network_down": {
                "value": {
                  "title": "Network down",
                  "detail": "The account's proxy didn't connect.",
                  "type": "errors/network_down",
                  "status": 503
                }
              }
            }
          }
        }
      },
      "Timeout": {
        "description": "`errors/request_timeout`: LinkedIn didn't answer in time. On a write: an unknown outcome (it may have been sent); it's never retried and its Idempotency-Key never writes again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unknown_outcome": {
                "value": {
                  "title": "Unknown outcome",
                  "detail": "LinkedIn may have received this write; it isn't tried again. Check before sending it once more.",
                  "type": "errors/request_timeout",
                  "status": 504
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "`errors/conflict`: a write with this Idempotency-Key is still running.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "conflict": {
                "value": {
                  "title": "Write in progress",
                  "detail": "A write with this key is still running.",
                  "type": "errors/conflict",
                  "status": 409
                }
              }
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "`errors/unsupported_media_type`: a voice note that isn't audio Direct can turn into LinkedIn's format (AAC .m4a). Nothing was sent.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unsupported_media_type": {
                "value": {
                  "title": "Unsupported media type",
                  "detail": "This voice note isn't an audio file LinkedIn can take (m4a, mp3, ogg, webm, wav, aac or flac).",
                  "type": "errors/unsupported_media_type",
                  "status": 415
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "A short title, e.g. `Too many requests`."
          },
          "detail": {
            "type": "string",
            "description": "What happened, in plain words. Never an account's data."
          },
          "type": {
            "type": "string",
            "description": "Unipile's error type: `errors/<kind>`. Branch on this, not on `detail`."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status again."
          },
          "retry_after": {
            "type": "integer",
            "description": "Seconds to wait before trying this account again. Only on 429; the `Retry-After` header carries the same value."
          }
        },
        "required": [
          "title",
          "detail",
          "type",
          "status"
        ],
        "description": "Every error Direct answers itself, in Unipile's shape."
      },
      "DryRun": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "DryRun"
          },
          "route": {
            "type": "string",
            "description": "Direct's name for the write, e.g. `chats.message`, `posts.create`, `chats.start.inmail`."
          },
          "method": {
            "type": "string",
            "description": "The HTTP method of LinkedIn's call."
          },
          "path": {
            "type": "string",
            "description": "LinkedIn's own endpoint the write would call (`/voyager/api/...`)."
          },
          "body": {
            "type": [
              "object",
              "null"
            ],
            "description": "The exact body LinkedIn would get. Files appear as `$upload:N` until uploaded; an invitation's shared secret is masked."
          },
          "status": {
            "type": "integer",
            "description": "The status the real write answers (200, 201 or 204)."
          },
          "uploads": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "body": {
                  "type": "object"
                },
                "then": {
                  "type": "string"
                },
                "content_type": {
                  "type": "string"
                },
                "file": {
                  "type": "object",
                  "description": "A voice note: its length (`duration_ms`), what it came as (`from`, container/codec) and whether its AAC audio was kept or encoded (`audio`)."
                }
              }
            },
            "description": "Each file's registration with LinkedIn's uploader, in order."
          },
          "multiphoto": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "body": {
                "type": "object"
              }
            },
            "description": "Several images on one post: the call that groups them."
          },
          "checked": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What Direct read to plan it (e.g. `profile relationship`, `compose option`, `post author`)."
          }
        },
        "required": [
          "object",
          "route",
          "method",
          "path",
          "body",
          "status"
        ],
        "description": "A write's plan, answered with `?dry_run=true`: every call it would send. Nothing is sent to a LinkedIn write endpoint. Reads made to plan it (a profile, a compose option, the post) do happen and count in the account's calls."
      },
      "Account": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Account"
          },
          "type": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "id": {
            "type": "string",
            "description": "The account id: a Lempile account id. Every other route names it as `account_id`."
          },
          "name": {
            "type": "string",
            "description": "The member's name on LinkedIn (empty until the first check)."
          },
          "created_at": {
            "type": "string",
            "description": "When Direct started serving the account."
          },
          "connection_params": {
            "type": "object",
            "properties": {
              "im": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The member's LinkedIn provider id (`ACo…`)."
                  },
                  "publicIdentifier": {
                    "type": "string",
                    "description": "The member's public identifier (the `/in/<…>` part)."
                  },
                  "username": {
                    "type": "string",
                    "description": "The member's name."
                  },
                  "premiumId": {
                    "type": "null"
                  },
                  "premiumContractId": {
                    "type": "null"
                  },
                  "premiumFeatures": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`[\"premium\"]` for a Premium member, else `[]`."
                  },
                  "organizations": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Always `[]`."
                  }
                },
                "required": [
                  "id",
                  "publicIdentifier",
                  "username",
                  "premiumId",
                  "premiumContractId",
                  "premiumFeatures",
                  "organizations"
                ]
              }
            },
            "required": [
              "im"
            ]
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Always `[]`."
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "`<account id>_MESSAGING`."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "OK",
                    "CONNECTING",
                    "CREDENTIALS",
                    "ERROR"
                  ],
                  "description": "`OK`: LinkedIn answered the account's last call. `CREDENTIALS`: LinkedIn refused its session (signed out, a security check). `ERROR`: the account's browser or proxy gave no working session twice over 10 minutes. `CONNECTING`: not checked yet."
                }
              },
              "required": [
                "id",
                "status"
              ]
            },
            "description": "One source, as Unipile's LinkedIn accounts have."
          }
        },
        "required": [
          "object",
          "type",
          "id",
          "name",
          "created_at",
          "connection_params",
          "groups",
          "sources"
        ],
        "description": "Unipile's LinkedIn `Account`."
      },
      "AccountList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "AccountList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          },
          "total_count": {
            "type": "integer",
            "description": "How many accounts this key sees."
          },
          "status_counts": {
            "type": "object",
            "properties": {
              "OK": {
                "type": "integer"
              },
              "CONNECTING": {
                "type": "integer"
              },
              "CREDENTIALS": {
                "type": "integer"
              },
              "STOPPED": {
                "type": "integer"
              },
              "ERROR": {
                "type": "integer"
              }
            },
            "required": [
              "OK",
              "CONNECTING",
              "CREDENTIALS",
              "STOPPED",
              "ERROR"
            ],
            "description": "Accounts by status (`STOPPED` is always 0)."
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "total_count",
          "status_counts"
        ]
      },
      "AccountDeleted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "AccountDeleted"
          }
        },
        "required": [
          "object"
        ]
      },
      "AccountResync": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "AccountResync"
          },
          "status": {
            "type": "string",
            "enum": [
              "SYNC_DONE",
              "SYNC_ERROR"
            ]
          }
        },
        "required": [
          "object",
          "status"
        ],
        "description": "`SYNC_DONE`: a fresh session was read from the account's browser and LinkedIn answered it. `SYNC_ERROR`: the browser or the proxy didn't give a working session (try again in a few minutes)."
      },
      "HostedAuthLinkRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "create",
              "reconnect"
            ],
            "description": "`create` connects a new LinkedIn account; `reconnect` signs an existing one in again."
          },
          "api_url": {
            "type": "string",
            "description": "Required, as on Unipile (any non-empty string; Direct doesn't use it)."
          },
          "providers": {
            "description": "Required for `create`: one provider, a category or a list, taking LinkedIn (`\"LINKEDIN\"`, `[\"LINKEDIN\"]`, `\"*\"`, `\"*:MESSAGING\"`). Optional for `reconnect`; when given, it must take LinkedIn too.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "string",
                "enum": [
                  "LINKEDIN",
                  "*",
                  "*:MESSAGING"
                ]
              }
            ]
          },
          "expiresOn": {
            "type": "string",
            "description": "ISO 8601 UTC time (`YYYY-MM-DDTHH:MM:SS.sssZ`), in the future. The link lasts 24 hours at most, whatever this says."
          },
          "name": {
            "type": "string",
            "description": "Your own reference (1 to 500 characters), sent back in `notify_url`'s body."
          },
          "reconnect_account": {
            "type": "string",
            "description": "The account id to reconnect (one of the key's workspace, served or removed). Required for `reconnect`."
          },
          "success_redirect_url": {
            "type": "string",
            "description": "Where the person lands once the account is connected and checked (https)."
          },
          "failure_redirect_url": {
            "type": "string",
            "description": "Where the person lands after a cancel, a failure, or a session that doesn't work (https)."
          },
          "notify_url": {
            "type": "string",
            "description": "Direct POSTs `{status, account_id, name}` here once the account works (https; put your own secret in it)."
          },
          "bypass_success_screen": {
            "type": "boolean",
            "description": "Accepted; no effect (Direct redirects at once when `success_redirect_url` is set)."
          }
        },
        "required": [
          "type",
          "api_url",
          "expiresOn"
        ],
        "description": "Unipile's hosted auth body. Unipile's other options (`disabled_features`, `disabled_options`, `proxy`, `sync_limit`, scopes, `single_use`) are accepted and ignored."
      },
      "HostedAuthUrl": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "HostedAuthUrl"
          },
          "url": {
            "type": "string",
            "description": "`https://direct.lempile.com/connect/<token>`: send the person there."
          }
        },
        "required": [
          "object",
          "url"
        ]
      },
      "WebhookHeader": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "WebhookDataKey": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "A key of the payload (see each source's payload)."
          },
          "name": {
            "type": "string",
            "description": "The name it's sent under."
          }
        },
        "required": [
          "key",
          "name"
        ]
      },
      "WebhookCreateRequest": {
        "type": "object",
        "properties": {
          "request_url": {
            "type": "string",
            "description": "Where events are POSTed: https (http only to 127.0.0.1 or localhost)."
          },
          "source": {
            "type": "string",
            "enum": [
              "messaging",
              "users",
              "account_status"
            ]
          },
          "name": {
            "type": "string",
            "description": "200 characters at most; sent as `webhook_name` in messaging and users payloads."
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "form"
            ],
            "default": "json"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHeader"
            },
            "description": "Up to 20 headers sent with every delivery (your secret goes here). Values are kept encrypted and never shown again."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "messaging: `message_received`, `message_read`, `message_reaction`, `message_edited`, `message_deleted` (sent, in real time), `message_delivered` (accepted, never sent). users: `new_relation`. account_status: `creation_success`, `reconnected`, `deleted`, `sync_success`, `ok`, `credentials`, `error`, `connecting` (sent), `creation_fail`, `stopped`, `permissions` (accepted, never sent)."
            },
            "description": "Default: every event of the source."
          },
          "account_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Only these accounts. Default (empty): every account of the key's workspace. Another workspace's account named here never sends."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDataKey"
            },
            "description": "Send only these keys, renamed (messaging and users only)."
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "request_url",
          "source"
        ]
      },
      "WebhookCreated": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "WebhookCreated"
          },
          "webhook_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "webhook_id"
        ]
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Webhook"
          },
          "id": {
            "type": "string"
          },
          "account_ids": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "const": "LINKEDIN"
                }
              },
              "required": [
                "id",
                "name",
                "type"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "request_url": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "form"
            ]
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string",
                  "const": "********"
                }
              },
              "required": [
                "key",
                "value"
              ]
            },
            "description": "Values are always masked."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDataKey"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "type": "string",
            "const": "AUTO"
          },
          "source": {
            "type": "string",
            "enum": [
              "messaging",
              "users",
              "account_status"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "account_ids",
          "enabled",
          "name",
          "request_url",
          "format",
          "headers",
          "data",
          "events",
          "type",
          "source"
        ]
      },
      "WebhookList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "WebhookList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "WebhookDeleted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "WebhookDeleted"
          }
        },
        "required": [
          "object"
        ]
      },
      "WebhookAttendee": {
        "type": "object",
        "properties": {
          "attendee_id": {
            "type": "string",
            "description": "The person's provider id (Unipile puts its own attendee id here; Direct has none)."
          },
          "attendee_name": {
            "type": "string"
          },
          "attendee_provider_id": {
            "type": "string"
          },
          "attendee_profile_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "`https://www.linkedin.com/in/<provider id>`, as LinkedIn's messaging links people; `null` for a page."
          },
          "attendee_public_identifier": {
            "type": "null",
            "description": "Always `null`, as Unipile's."
          },
          "attendee_specifics": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "member_urn": {
                "type": "string",
                "description": "`urn:li:member:<id>`; for a page, `urn:li:msg_messagingParticipant:urn:li:fsd_company:<id>`."
              },
              "network_distance": {
                "type": "string",
                "enum": [
                  "SELF",
                  "DISTANCE_1",
                  "DISTANCE_2",
                  "DISTANCE_3",
                  "OUT_OF_NETWORK"
                ],
                "description": "Members only."
              },
              "occupation": {
                "type": "string",
                "description": "The headline (members only)."
              },
              "is_company": {
                "type": "boolean"
              }
            },
            "required": [
              "provider",
              "member_urn",
              "is_company"
            ]
          }
        },
        "required": [
          "attendee_id",
          "attendee_name",
          "attendee_provider_id",
          "attendee_profile_url",
          "attendee_public_identifier",
          "attendee_specifics"
        ],
        "description": "Someone in a chat, as Unipile's messaging webhooks name them (`sender`, `attendees`, `read_by`, `reaction_sender`)."
      },
      "MessageReceivedEvent": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "account_info": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "feature": {
                "type": "string",
                "const": "classic"
              },
              "user_id": {
                "type": "string",
                "description": "The account's own provider id."
              }
            },
            "required": [
              "type",
              "feature",
              "user_id"
            ]
          },
          "event": {
            "type": "string",
            "enum": [
              "message_received",
              "message_read",
              "message_reaction",
              "message_edited",
              "message_deleted"
            ]
          },
          "chat_id": {
            "type": "string",
            "description": "The chat's id, as `GET /chats` answers it."
          },
          "timestamp": {
            "type": "string",
            "description": "The message's time."
          },
          "webhook_name": {
            "type": "string",
            "description": "The webhook's `name`."
          },
          "message_id": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The message's text (empty for a file alone); `null` for `message_deleted`."
          },
          "sender": {
            "$ref": "#/components/schemas/WebhookAttendee"
          },
          "attendees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookAttendee"
            },
            "description": "Everyone in the chat but the account."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "attachment_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "attachment_name": {
                  "type": "string",
                  "description": "A file's name (files only)."
                },
                "attachment_size": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "A file's size in bytes; `null` for an image or a voice note."
                },
                "attachment_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`img`, `file` or `audio` (a voice note)."
                },
                "attachment_unavailable": {
                  "type": "boolean"
                },
                "attachment_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "LinkedIn's own link to it (Unipile's is an `att://` reference to its attachments route)."
                }
              },
              "required": [
                "attachment_id",
                "attachment_size",
                "attachment_type",
                "attachment_unavailable",
                "attachment_url"
              ]
            },
            "description": "Empty for `message_deleted`."
          },
          "is_sender": {
            "type": "boolean",
            "description": "True when the account sent it (from anywhere: LinkedIn's own apps too)."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_chat_id": {
            "type": "string"
          },
          "provider_message_id": {
            "type": "string"
          },
          "is_event": {
            "type": "integer",
            "const": 0
          },
          "chat_pinned": {
            "type": "integer",
            "const": 0
          },
          "quoted": {
            "type": "null"
          },
          "reply_to": {
            "type": "null"
          },
          "is_forwarded": {
            "type": "null"
          },
          "is_view_once": {
            "type": "null"
          },
          "chat_content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "`inmail`, `sponsored`, or `null`."
          },
          "message_type": {
            "type": "string",
            "const": "MESSAGE"
          },
          "is_group": {
            "type": "boolean"
          },
          "folder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "event_type": {
            "type": "null"
          },
          "read_by": {
            "$ref": "#/components/schemas/WebhookAttendee",
            "description": "`message_read` only: who read it."
          },
          "reaction": {
            "type": "string",
            "description": "`message_reaction` only: the emoji."
          },
          "reaction_sender": {
            "$ref": "#/components/schemas/WebhookAttendee",
            "description": "`message_reaction` only: who reacted."
          }
        },
        "required": [
          "account_id",
          "account_type",
          "account_info",
          "event",
          "chat_id",
          "timestamp",
          "webhook_name",
          "message_id",
          "message",
          "sender",
          "attendees",
          "attachments",
          "is_sender",
          "subject",
          "provider_chat_id",
          "provider_message_id",
          "is_event",
          "quoted",
          "chat_content_type",
          "message_type",
          "is_group",
          "folder",
          "chat_pinned",
          "reply_to",
          "is_forwarded",
          "is_view_once",
          "event_type"
        ],
        "description": "Source `messaging`: a new message in one of the account's chats, received or sent (`message_received`), or one of them read by someone else (`message_read`, with `read_by`), reacted to (`message_reaction`, with `reaction` and `reaction_sender`), edited (`message_edited`) or deleted (`message_deleted`). Key for key and type for type as Unipile's own deliveries."
      },
      "NewRelationEvent": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "const": "new_relation"
          },
          "account_id": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "webhook_name": {
            "type": "string"
          },
          "user_full_name": {
            "type": "string"
          },
          "user_provider_id": {
            "type": "string"
          },
          "user_public_identifier": {
            "type": "string"
          },
          "user_profile_url": {
            "type": "string"
          },
          "user_picture_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": "integer",
            "description": "When the connection was made, in milliseconds (to the second), as Unipile's."
          }
        },
        "required": [
          "event",
          "account_id",
          "account_type",
          "webhook_name",
          "user_full_name",
          "user_provider_id",
          "user_public_identifier",
          "user_profile_url",
          "user_picture_url",
          "timestamp"
        ],
        "description": "Source `users`, event `new_relation`: a new connection (an invitation accepted either way)."
      },
      "AccountStatusEvent": {
        "type": "object",
        "properties": {
          "AccountStatus": {
            "type": "object",
            "properties": {
              "account_id": {
                "type": "string"
              },
              "account_type": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "message": {
                "type": "string",
                "enum": [
                  "OK",
                  "CREDENTIALS",
                  "ERROR",
                  "CONNECTING",
                  "CREATION_SUCCESS",
                  "RECONNECTED",
                  "DELETED",
                  "SYNC_SUCCESS"
                ]
              }
            },
            "required": [
              "account_id",
              "account_type",
              "message"
            ]
          },
          "Product": {
            "type": "string",
            "const": "classic",
            "description": "Only beside `SYNC_SUCCESS`, as Unipile's."
          }
        },
        "required": [
          "AccountStatus"
        ],
        "description": "Source `account_status`: an account's status changed, or it was connected, reconnected, resynced or removed."
      },
      "HostedAuthNotification": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "CREATION_SUCCESS",
              "RECONNECTED"
            ]
          },
          "account_id": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "name": {
            "type": "string",
            "description": "The link's `name`, when it had one."
          }
        },
        "required": [
          "status",
          "account_id",
          "account_type"
        ],
        "description": "What `notify_url` receives once a hosted auth link's account works. Exactly these keys."
      },
      "AccountOwnerProfile": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "AccountOwnerProfile"
          },
          "provider": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "provider_id": {
            "type": "string",
            "description": "The account's own LinkedIn provider id (`ACo…`)."
          },
          "entity_urn": {
            "type": "string"
          },
          "object_urn": {
            "type": "string",
            "description": "`urn:li:member:<number>`."
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "profile_picture_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account's own picture (400 px) at a permanent public address on Direct, `https://direct.lempile.com/pictures/<token>/<image id>.jpg`, instead of LinkedIn's link, which expires about three weeks after it's read. No key is needed to load it (the token can't be guessed). The address stays the same while the photo is the same and changes when the member changes their photo (LinkedIn's image id is in it); an older address answers 302 to the newest. `null` when the member has no photo. LinkedIn's own link only until Direct has kept a copy (its first read of the account)."
          },
          "public_profile_url": {
            "type": "string"
          },
          "public_identifier": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "description": "The account's email address on LinkedIn, or empty."
          },
          "premium": {
            "type": "boolean"
          },
          "open_profile": {
            "type": "boolean"
          },
          "organizations": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Always `[]`."
          },
          "recruiter": {
            "type": "null"
          },
          "sales_navigator": {
            "type": "null"
          },
          "headline": {
            "type": "string"
          },
          "occupation": {
            "type": "string"
          },
          "location": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "provider",
          "provider_id",
          "entity_urn",
          "object_urn",
          "first_name",
          "last_name",
          "profile_picture_url",
          "public_profile_url",
          "public_identifier",
          "email",
          "premium",
          "open_profile",
          "organizations",
          "recruiter",
          "sales_navigator"
        ],
        "description": "The connected account's own profile. Kept an hour."
      },
      "WorkExperience": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "current": {
            "type": "boolean"
          },
          "start": {
            "type": [
              "string",
              "null"
            ],
            "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
          },
          "end": {
            "type": [
              "string",
              "null"
            ],
            "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
          },
          "company_id": {
            "type": "string"
          },
          "company_url": {
            "type": "string"
          },
          "company_picture_url": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "The employment type, e.g. `Full-time`."
          }
        },
        "required": [
          "id",
          "position",
          "company",
          "skills",
          "current",
          "start",
          "end"
        ]
      },
      "Education": {
        "type": "object",
        "properties": {
          "school": {
            "type": "string"
          },
          "start": {
            "type": [
              "string",
              "null"
            ],
            "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
          },
          "end": {
            "type": [
              "string",
              "null"
            ],
            "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "degree": {
            "type": [
              "string",
              "null"
            ]
          },
          "field_of_study": {
            "type": [
              "string",
              "null"
            ]
          },
          "grade": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "activities": {
            "type": [
              "string",
              "null"
            ]
          },
          "school_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "school_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "school_picture_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "school",
          "start",
          "end"
        ]
      },
      "Skill": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "endorsement_count": {
            "type": "integer",
            "description": "Always 0 (not read)."
          },
          "endorsement_id": {
            "type": "null"
          },
          "insights": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "endorsed": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "endorsement_count",
          "endorsement_id",
          "insights",
          "endorsed"
        ]
      },
      "Recommendation": {
        "type": "object",
        "properties": {
          "caption": {
            "type": "string",
            "description": "When and how they worked together, as LinkedIn shows it."
          },
          "text": {
            "type": "string"
          },
          "actor": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "provider_id": {
                "type": "string"
              },
              "headline": {
                "type": "string"
              },
              "public_identifier": {
                "type": "string"
              },
              "public_profile_url": {
                "type": "string"
              },
              "profile_picture_url": {
                "type": "string"
              }
            },
            "required": [
              "first_name",
              "last_name",
              "provider_id",
              "headline",
              "public_identifier",
              "public_profile_url"
            ]
          }
        },
        "required": [
          "caption",
          "text",
          "actor"
        ]
      },
      "UserProfile": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserProfile"
          },
          "provider": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "provider_id": {
            "type": "string",
            "description": "The member's provider id (`ACo…`): what the writes take."
          },
          "public_identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "headline": {
            "type": "string"
          },
          "websites": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The member's websites, as LinkedIn shows them to the account (its contact info)."
          },
          "is_premium": {
            "type": "boolean"
          },
          "is_influencer": {
            "type": "boolean"
          },
          "is_creator": {
            "type": "boolean"
          },
          "is_open_profile": {
            "type": "boolean"
          },
          "is_relationship": {
            "type": "boolean",
            "description": "A first-degree connection of the account."
          },
          "is_self": {
            "type": "boolean",
            "description": "The account itself."
          },
          "public_profile_url": {
            "type": "string"
          },
          "member_urn": {
            "type": "string",
            "description": "The member's number."
          },
          "location": {
            "type": "string"
          },
          "primary_locale": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string"
              },
              "language": {
                "type": "string"
              }
            },
            "required": [
              "country",
              "language"
            ]
          },
          "profile_picture_url": {
            "type": "string",
            "description": "LinkedIn's link to the smallest picture (100 px; it expires about three weeks after it's read). The connected account's own profile (`is_self`): the same permanent address as `GET /users/me` answers (400 px)."
          },
          "profile_picture_url_large": {
            "type": "string",
            "description": "LinkedIn's link to the largest picture (800 px), read fresh each time; it expires about three weeks after it's read, the account's own profile included."
          },
          "background_picture_url": {
            "type": "string"
          },
          "follower_count": {
            "type": "integer",
            "description": "The member's followers (the profile page's own count)."
          },
          "connections_count": {
            "type": "integer",
            "description": "The member's connections, exact (LinkedIn's \"500+\" aside)."
          },
          "shared_connections_count": {
            "type": "integer",
            "description": "Mutual connections with the account, when LinkedIn shows any."
          },
          "connected_at": {
            "type": "integer",
            "description": "When the member became a connection of the account (ms), connections only."
          },
          "is_verified": {
            "type": "boolean",
            "description": "LinkedIn's verification badge."
          },
          "network_distance": {
            "type": "string",
            "enum": [
              "FIRST_DEGREE",
              "SECOND_DEGREE",
              "THIRD_DEGREE",
              "OUT_OF_NETWORK"
            ]
          },
          "invitation": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "SENT",
                  "RECEIVED"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "PENDING",
                  "IGNORED",
                  "WITHDRAWN"
                ],
                "description": "`IGNORED`: a received invitation the account ignored."
              }
            },
            "required": [
              "type",
              "status"
            ],
            "description": "An invitation between the account and this person: `SENT` by the account, or `RECEIVED` from them."
          },
          "contact_info": {
            "type": "object",
            "properties": {
              "emails": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "phones": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "adresses": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Unipile's spelling."
              },
              "socials": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "name"
                  ]
                }
              }
            },
            "description": "What the member shares with the account (from its contact info, read with every profile, as Unipile)."
          },
          "birthdate": {
            "type": "object",
            "properties": {
              "month": {
                "type": "integer"
              },
              "day": {
                "type": "integer"
              }
            },
            "required": [
              "month",
              "day"
            ]
          },
          "summary": {
            "type": "string",
            "description": "The About section (`about`)."
          },
          "work_experience": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkExperience"
            },
            "description": "`experience`: every position, grouped by company, newest first."
          },
          "work_experience_total_count": {
            "type": "integer"
          },
          "education": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Education"
            }
          },
          "education_total_count": {
            "type": "integer"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "proficiency": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "languages_total_count": {
            "type": "integer"
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Skill"
            },
            "description": "In full (`skills`): every skill; in preview: the ones the profile shows."
          },
          "skills_total_count": {
            "type": "integer"
          },
          "certifications": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "organization": {
                  "type": "string"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "organization"
              ]
            }
          },
          "certifications_total_count": {
            "type": "integer"
          },
          "volunteering_experience": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "company": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "cause": {
                  "type": "string"
                },
                "start": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
                },
                "end": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
                }
              },
              "required": [
                "company",
                "description",
                "role",
                "cause",
                "start",
                "end"
              ]
            }
          },
          "volunteering_experience_total_count": {
            "type": "integer"
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "skills": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "start": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
                },
                "end": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`month/day/year`, the 1st of the month: `2/1/2024`."
                }
              },
              "required": [
                "name",
                "description",
                "skills",
                "start",
                "end"
              ]
            }
          },
          "projects_total_count": {
            "type": "integer"
          },
          "recruiting_activity": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Always `[]`."
          },
          "recommendations": {
            "type": "object",
            "properties": {
              "received": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Recommendation"
                }
              },
              "received_total_count": {
                "type": "integer"
              },
              "given": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Recommendation"
                }
              },
              "given_total_count": {
                "type": "integer"
              }
            },
            "description": "`recommendations_received` and `recommendations_given`."
          }
        },
        "required": [
          "object",
          "provider",
          "provider_id",
          "public_identifier",
          "first_name",
          "last_name",
          "headline",
          "websites",
          "is_premium",
          "is_influencer",
          "is_creator",
          "is_open_profile",
          "is_relationship",
          "is_self"
        ],
        "description": "Unipile's LinkedIn `UserProfile`. Optional keys appear only when LinkedIn has them; the section keys only when `linkedin_sections` asks them."
      },
      "UserRelation": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserRelation"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "public_identifier": {
            "type": "string"
          },
          "public_profile_url": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "description": "When the connection was made, in milliseconds since 1970."
          },
          "member_id": {
            "type": "string",
            "description": "The relation's provider id (`ACo…`)."
          },
          "member_urn": {
            "type": "string"
          },
          "connection_urn": {
            "type": "string"
          },
          "profile_picture_url": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "first_name",
          "last_name",
          "headline",
          "public_identifier",
          "public_profile_url",
          "created_at",
          "member_id",
          "member_urn",
          "connection_urn"
        ]
      },
      "UserRelationsList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserRelationsList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRelation"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "InvitationSent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "InvitationSent"
          },
          "id": {
            "type": "string",
            "description": "The invitation's id (digits): what `DELETE /users/invite/sent/{invitation_id}` takes."
          },
          "invited_user": {
            "type": [
              "string",
              "null"
            ]
          },
          "invited_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invited_user_public_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invited_user_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string"
          },
          "parsed_datetime": {
            "type": [
              "string",
              "null"
            ]
          },
          "invitation_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "specifics": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "shared_secret": {
                "type": "string"
              }
            },
            "required": [
              "provider",
              "shared_secret"
            ]
          },
          "inviter": {
            "type": "object",
            "properties": {
              "inviter_name": {
                "type": "string"
              },
              "inviter_id": {
                "type": "string"
              },
              "inviter_public_identifier": {
                "type": "string"
              },
              "inviter_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "inviter_name",
              "inviter_id",
              "inviter_public_identifier",
              "inviter_description"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "invited_user",
          "invited_user_id",
          "invited_user_public_id",
          "invited_user_description",
          "date",
          "parsed_datetime",
          "invitation_text",
          "specifics"
        ]
      },
      "InvitationList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "InvitationList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationSent"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "UserInvitationSent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserInvitationSent"
          },
          "invitation_id": {
            "type": "string",
            "description": "The new invitation's id, or empty when LinkedIn didn't name it."
          }
        },
        "required": [
          "object",
          "invitation_id"
        ]
      },
      "InvitationCanceled": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "InvitationCanceled"
          }
        },
        "required": [
          "object"
        ]
      },
      "PostAuthor": {
        "type": "object",
        "properties": {
          "public_identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_company": {
            "type": "boolean"
          },
          "headline": {
            "type": "string"
          },
          "profile_picture_url": {
            "type": "string"
          }
        },
        "required": [
          "public_identifier",
          "id",
          "name",
          "is_company"
        ]
      },
      "PostAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "img",
              "video"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "url_expires_at": {
            "type": [
              "integer",
              "null"
            ],
            "description": "When `url` stops working, in milliseconds since 1970."
          },
          "size": {
            "type": "object",
            "properties": {
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              }
            },
            "required": [
              "width",
              "height"
            ]
          },
          "duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "A video's length in seconds."
          },
          "mimetype": {
            "type": "string"
          },
          "file_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "gif": {
            "type": "boolean"
          },
          "unavailable": {
            "type": "boolean"
          },
          "sticker": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "type",
          "unavailable"
        ]
      },
      "Post": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Post"
          },
          "provider": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "id": {
            "type": "string",
            "description": "The post's activity id (digits)."
          },
          "social_id": {
            "type": "string",
            "description": "`urn:li:activity:<id>`: what comments and reactions take as `post_id`."
          },
          "share_url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "description": "LinkedIn's relative date, e.g. `2d`."
          },
          "parsed_datetime": {
            "type": "string",
            "description": "The post's time (ISO 8601), from its id."
          },
          "reaction_counter": {
            "type": "integer"
          },
          "comment_counter": {
            "type": "integer"
          },
          "repost_counter": {
            "type": "integer"
          },
          "impressions_counter": {
            "type": "integer",
            "description": "0 unless LinkedIn shows it to the account."
          },
          "author": {
            "$ref": "#/components/schemas/PostAuthor"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "can_react": {
                "type": "boolean"
              },
              "can_share": {
                "type": "boolean"
              },
              "can_post_comments": {
                "type": "boolean"
              }
            },
            "required": [
              "can_react",
              "can_share",
              "can_post_comments"
            ]
          },
          "is_repost": {
            "type": "boolean",
            "description": "`true` on a plain repost (no words of its own): the post is then the reposted one as LinkedIn shows it (`id`, `social_id`, `text`, `author`, counts), and `repost_id`, `reposted_by` and `repost_parsed_datetime` are the repost's. A repost with words is the reposter's own post (`false`), with `repost_content`."
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "integer"
                },
                "length": {
                  "type": "integer"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "length",
                "url"
              ]
            },
            "description": "People and pages named in the text."
          },
          "user_reacted": {
            "type": "string",
            "description": "The account's own reaction (LinkedIn's name: `LIKE`, `PRAISE`…), when it reacted."
          },
          "reposted_by": {
            "$ref": "#/components/schemas/PostAuthor",
            "description": "A plain repost: who reposted it."
          },
          "repost_id": {
            "type": "string",
            "description": "A plain repost: the repost's own activity id (what `POST /posts` answered as `post_id`, and what `DELETE /posts/{post_id}` takes to undo it)."
          },
          "repost_content": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "parsed_datetime": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "author": {
                "$ref": "#/components/schemas/PostAuthor"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PostAttachment"
                }
              }
            },
            "required": [
              "id",
              "date",
              "parsed_datetime",
              "text",
              "author",
              "attachments"
            ],
            "description": "The post shared: the reposted post, on a plain repost and on a repost with words."
          },
          "repost_parsed_datetime": {
            "type": "string",
            "description": "A plain repost: when it was reposted."
          }
        },
        "required": [
          "object",
          "provider",
          "id",
          "social_id",
          "share_url",
          "text",
          "date",
          "parsed_datetime",
          "reaction_counter",
          "comment_counter",
          "repost_counter",
          "impressions_counter",
          "author",
          "permissions",
          "is_repost",
          "attachments",
          "mentions"
        ],
        "description": "Unipile's LinkedIn `Post`. A plain repost is the reposted post (its `id`, `author`, text and counts) with `is_repost: true`, `reposted_by` the one who reposted and `repost_id` the repost's own id; a repost with words is the reposter's own post, with `repost_content` the post it shares."
      },
      "PostList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "PostList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          },
          "paging": {
            "type": "object",
            "properties": {
              "page_count": {
                "type": "integer"
              }
            },
            "required": [
              "page_count"
            ]
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "paging",
          "cursor"
        ]
      },
      "PostCreated": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "PostCreated"
          },
          "post_id": {
            "type": "string",
            "description": "The new post's activity id (or its ugcPost/share urn while LinkedIn hasn't given an activity)."
          },
          "id": {
            "type": "string",
            "description": "Same as `post_id`."
          },
          "share_url": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "post_id",
          "id"
        ]
      },
      "CommentAuthor": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "headline": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_picture_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "network_distance": {
            "type": "string",
            "enum": [
              "SELF",
              "DISTANCE_1",
              "DISTANCE_2",
              "DISTANCE_3"
            ],
            "description": "The author's degree as Unipile answers it on comments: LinkedIn's own word for the account itself and its 1st and 2nd degree (`DISTANCE_2`, not `SECOND_DEGREE`), `DISTANCE_3` for anyone further, out of network, or a page."
          },
          "is_company": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "headline",
          "profile_url",
          "profile_picture_url",
          "network_distance",
          "is_company"
        ],
        "description": "Unipile's comment author: the name is the comment's `author`; no public identifier."
      },
      "Comment": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Comment"
          },
          "id": {
            "type": "string",
            "description": "The comment's id (digits): what `comment_id` takes."
          },
          "post_id": {
            "type": "string"
          },
          "post_urn": {
            "type": "string"
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "author_details": {
            "$ref": "#/components/schemas/CommentAuthor"
          },
          "date": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "reaction_counter": {
            "type": "integer"
          },
          "reply_counter": {
            "type": "integer"
          },
          "thread_id": {
            "type": "string",
            "description": "A reply's parent comment id (in a `comment_id` list); absent on a post's own comments, as Unipile."
          },
          "user_reacted": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "post_id",
          "post_urn",
          "author",
          "author_details",
          "date",
          "text",
          "reaction_counter",
          "reply_counter"
        ]
      },
      "CommentList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "CommentList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Comment"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          },
          "total_items": {
            "type": [
              "integer",
              "null"
            ],
            "description": "LinkedIn's total of a post's comments; `null` for a comment's replies, as Unipile."
          },
          "paging": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer"
              },
              "page_count": {
                "type": "integer"
              },
              "total_count": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "start",
              "page_count",
              "total_count"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "total_items",
          "paging"
        ]
      },
      "CommentSent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "CommentSent"
          },
          "comment_id": {
            "type": "string",
            "description": "The new comment's id; left out when LinkedIn's answer didn't name it."
          }
        },
        "required": [
          "object"
        ]
      },
      "CommentDeleted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "CommentDeleted"
          }
        },
        "required": [
          "object"
        ]
      },
      "PostReaction": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "PostReaction"
          },
          "value": {
            "type": "string",
            "enum": [
              "LIKE",
              "PRAISE",
              "APPRECIATION",
              "EMPATHY",
              "INTEREST",
              "ENTERTAINMENT"
            ],
            "description": "LinkedIn's names."
          },
          "post_id": {
            "type": "string"
          },
          "comment_id": {
            "type": "string"
          },
          "author": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "INDIVIDUAL",
                  "COMPANY"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "headline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_picture_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "public_identifier": {
                "type": "string"
              },
              "network_distance": {
                "type": "string",
                "enum": [
                  "FIRST_DEGREE",
                  "SECOND_DEGREE",
                  "THIRD_DEGREE",
                  "OUT_OF_NETWORK"
                ]
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "headline",
              "profile_url",
              "profile_picture_url"
            ]
          }
        },
        "required": [
          "object",
          "value",
          "post_id",
          "author"
        ]
      },
      "PostReactionList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "PostReactionList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostReaction"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          },
          "paging": {
            "type": "object",
            "properties": {
              "cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
              },
              "start": {
                "type": "integer"
              },
              "page_count": {
                "type": "integer"
              },
              "total_count": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "cursor",
              "start",
              "page_count",
              "total_count"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "paging"
        ]
      },
      "ReactionAdded": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ReactionAdded"
          }
        },
        "required": [
          "object"
        ]
      },
      "ReactionRemoved": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ReactionRemoved"
          }
        },
        "required": [
          "object"
        ]
      },
      "CompanySearchRequest": {
        "type": "object",
        "properties": {
          "api": {
            "type": "string",
            "enum": [
              "classic"
            ],
            "default": "classic"
          },
          "category": {
            "type": "string",
            "enum": [
              "companies"
            ]
          },
          "keywords": {
            "type": "string",
            "description": "Required."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10,
            "description": "The query's `limit` wins over this one."
          }
        },
        "required": [
          "category",
          "keywords"
        ],
        "description": "Unipile's LinkedIn search body, classic company search with keywords only. Any filter (`industry`, `location`, `has_job_offers`, `headcount`, `network_distance`), another `api` or another `category` answers 501."
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "COMPANY"
          },
          "id": {
            "type": "string",
            "description": "The company's id (digits)."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_url": {
            "type": "string"
          },
          "industry": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo": {
            "type": "string",
            "description": "The company's logo, 100 px."
          },
          "followers_count": {
            "type": "integer"
          }
        },
        "required": [
          "type",
          "id",
          "name",
          "location",
          "profile_url",
          "industry",
          "summary"
        ]
      },
      "LinkedinSearch": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "LinkedinSearch"
          },
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SearchResult"
                },
                {
                  "$ref": "#/components/schemas/PeopleSearchResult"
                },
                {
                  "$ref": "#/components/schemas/PostSearchResult"
                },
                {
                  "$ref": "#/components/schemas/JobSearchResult"
                }
              ]
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "params": {
                "type": "object",
                "required": [
                  "api",
                  "category"
                ],
                "description": "The search as asked (Unipile's body)."
              }
            },
            "required": [
              "params"
            ]
          },
          "paging": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer"
              },
              "page_count": {
                "type": "integer"
              },
              "total_count": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "start",
              "page_count",
              "total_count"
            ]
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "config",
          "paging",
          "cursor"
        ]
      },
      "MessageAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "img",
              "file",
              "audio"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "LinkedIn's signed link to the file (a voice note: its AAC .m4a, `audio/mp4`). It expires."
          },
          "unavailable": {
            "type": "boolean"
          },
          "size": {
            "type": "object",
            "properties": {
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              }
            },
            "required": [
              "width",
              "height"
            ]
          },
          "sticker": {
            "type": "boolean"
          },
          "file_name": {
            "type": "string"
          },
          "file_size": {
            "type": "integer"
          },
          "mimetype": {
            "type": [
              "string",
              "null"
            ]
          },
          "voice_note": {
            "type": "boolean",
            "description": "`audio` only: always true (a LinkedIn voice note)."
          },
          "duration": {
            "type": "integer",
            "description": "`audio` only: its length in milliseconds, as LinkedIn gives it."
          }
        },
        "required": [
          "id",
          "type",
          "unavailable"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Message"
          },
          "id": {
            "type": "string",
            "description": "LinkedIn's own message id (`2-…`), URL-safe and unpadded."
          },
          "provider_id": {
            "type": "string",
            "description": "Same as `id`."
          },
          "account_id": {
            "type": "string"
          },
          "chat_id": {
            "type": "string",
            "description": "LinkedIn's own thread id (`2-…`), URL-safe and unpadded."
          },
          "chat_provider_id": {
            "type": "string",
            "description": "Same as `chat_id`."
          },
          "sender_id": {
            "type": "string",
            "description": "The sender's provider id."
          },
          "sender_attendee_id": {
            "type": "string",
            "description": "Same as `sender_id`."
          },
          "sender_urn": {
            "type": "string"
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageAttachment"
            }
          },
          "timestamp": {
            "type": "string",
            "description": "UTC time, ISO 8601 with milliseconds: `2026-10-28T21:15:03.123Z`."
          },
          "is_sender": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when the account sent it."
          },
          "reactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "sender_id": {
                  "type": "string"
                },
                "is_sender": {
                  "type": "boolean"
                }
              },
              "required": [
                "value",
                "sender_id",
                "is_sender"
              ]
            },
            "description": "The account's own reactions only."
          },
          "seen": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "Always 0 (not read)."
          },
          "seen_by": {
            "type": "object",
            "description": "Always `{}`."
          },
          "hidden": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "Always 0."
          },
          "deleted": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when its sender took it back."
          },
          "deleted_for": {
            "type": "string",
            "const": "everyone"
          },
          "edited": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when edited."
          },
          "is_event": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 for a conversation event LinkedIn writes itself."
          },
          "delivered": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "Always 1."
          },
          "behavior": {
            "type": "null"
          },
          "original": {
            "type": "string",
            "const": ""
          },
          "message_type": {
            "type": "string",
            "const": "MESSAGE"
          },
          "attendee_type": {
            "type": "string",
            "enum": [
              "MEMBER",
              "ORGANIZATION"
            ]
          },
          "attendee_distance": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "The sender's distance: 1 to 3, 4 out of network."
          },
          "subject": {
            "type": "string",
            "description": "An InMail's subject."
          },
          "account_type": {
            "type": "string",
            "const": "LINKEDIN",
            "description": "Only on `GET /messages/{message_id}`."
          }
        },
        "required": [
          "object",
          "id",
          "provider_id",
          "account_id",
          "chat_id",
          "chat_provider_id",
          "sender_id",
          "sender_attendee_id",
          "sender_urn",
          "text",
          "attachments",
          "timestamp",
          "is_sender",
          "reactions",
          "seen",
          "seen_by",
          "hidden",
          "deleted",
          "edited",
          "is_event",
          "delivered",
          "behavior",
          "original",
          "message_type",
          "attendee_type"
        ],
        "description": "Unipile's `Message`."
      },
      "MessageList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessageList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "Chat": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "Chat"
          },
          "id": {
            "type": "string",
            "description": "LinkedIn's own thread id (`2-…`), URL-safe and unpadded."
          },
          "account_id": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "provider_id": {
            "type": "string",
            "description": "Same as `id`."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A group conversation's title."
          },
          "type": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "0: one person. 1: a group."
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last activity (ISO 8601)."
          },
          "unread_count": {
            "type": "integer"
          },
          "archived": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when in LinkedIn's archive."
          },
          "muted_until": {
            "type": [
              "integer",
              "null"
            ],
            "description": "-1 when muted, else `null`."
          },
          "read_only": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when nobody can answer (sponsored messages)."
          },
          "folder": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Its box (`INBOX`, `ARCHIVED`, `OTHER`, `PENDING`, `SPAM`) and `INBOX_LINKEDIN_CLASSIC`."
          },
          "pinned": {
            "type": "integer",
            "const": 0
          },
          "disabledFeatures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "reactions",
                "reply"
              ]
            }
          },
          "attendee_provider_id": {
            "type": "string",
            "description": "The other person's provider id, in a one-to-one chat."
          },
          "content_type": {
            "type": "string",
            "enum": [
              "inmail",
              "sponsored",
              "linkedin_offer"
            ],
            "description": "`linkedin_offer`: a sponsored message LinkedIn labels \"LinkedIn Offer\"; `sponsored`: any other ad; `inmail`: an InMail."
          },
          "lastMessage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only on `GET /chats/{chat_id}`."
          },
          "unread": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 when the chat has unread messages (Unipile's flag next to unread_count)."
          },
          "subject": {
            "type": "string",
            "description": "An InMail's or a sponsored message's subject; the chat's name when it has no title."
          }
        },
        "required": [
          "object",
          "id",
          "account_id",
          "account_type",
          "provider_id",
          "name",
          "type",
          "timestamp",
          "unread_count",
          "archived",
          "muted_until",
          "read_only",
          "folder",
          "pinned"
        ],
        "description": "Unipile's `Chat`, one LinkedIn conversation."
      },
      "ChatList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chat"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "ChatAttendee": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatAttendee"
          },
          "id": {
            "type": "string",
            "description": "The person's (or page's) provider id."
          },
          "account_id": {
            "type": "string"
          },
          "provider_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "is_self": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 for the account itself."
          },
          "hidden": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "Always 0."
          },
          "specifics": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "member_urn": {
                "type": "string"
              },
              "occupation": {
                "type": "string"
              },
              "headline": {
                "type": "string"
              },
              "network_distance": {
                "type": "string",
                "enum": [
                  "SELF",
                  "DISTANCE_1",
                  "DISTANCE_2",
                  "DISTANCE_3",
                  "OUT_OF_NETWORK"
                ]
              }
            },
            "required": [
              "provider",
              "member_urn"
            ]
          },
          "picture_url": {
            "type": "string"
          },
          "profile_url": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "account_id",
          "provider_id",
          "name",
          "is_self",
          "hidden",
          "specifics"
        ]
      },
      "ChatAttendeeList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatAttendeeList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatAttendee"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "ChatStarted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatStarted"
          },
          "chat_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Same as `chat_id`."
          }
        },
        "required": [
          "object",
          "chat_id",
          "message_id",
          "id"
        ]
      },
      "MessageSent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessageSent"
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Same as `message_id`."
          }
        },
        "required": [
          "object",
          "message_id",
          "id"
        ]
      },
      "InviteRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "provider_id": {
            "type": "string",
            "description": "The person: their provider id (`ACo…`), public identifier or profile URL."
          },
          "message": {
            "type": "string",
            "description": "The note, 300 characters at most."
          },
          "user_email": {
            "type": "string",
            "description": "The person's email address, when LinkedIn asks for it to connect."
          }
        },
        "required": [
          "account_id",
          "provider_id"
        ]
      },
      "StartChatRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "attendees_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "One person: their provider id, public identifier or profile URL. Several (a group) answers 501. In a form: `attendees_ids[0]`."
          },
          "text": {
            "type": "string",
            "description": "8,000 characters at most. Required unless a file or a voice note is sent."
          },
          "subject": {
            "type": "string",
            "description": "An InMail's subject (200 characters at most)."
          },
          "linkedin": {
            "type": "object",
            "properties": {
              "api": {
                "type": "string",
                "enum": [
                  "classic"
                ],
                "description": "Only `classic`; `recruiter` or `sales_navigator` answers 501."
              },
              "inmail": {
                "type": "boolean",
                "description": "Send an InMail when the person isn't reachable by a free message."
              }
            },
            "description": "In a form: `linkedin[api]`, `linkedin[inmail]`. `topic`, `applicant_id`, `invitation_id` and `group_id` answer 501."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary",
              "contentMediaType": "application/octet-stream"
            },
            "description": "Files, 20 MB each at most (multipart: `attachments`, `attachments[]` or `attachments[0]`…)."
          },
          "video_message": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "A video, sent as a file."
          },
          "voice_message": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "A voice note (multipart): sent alone (no `text` or files with it), as LinkedIn's apps send one. Any audio (m4a/AAC as Looply records it, mp3, ogg, webm/opus, wav, aac, flac; 20 MB at most) is turned into LinkedIn's AAC .m4a on the server; 60 seconds at most (422 `errors/invalid_message` over it, 415 `errors/unsupported_media_type` when it isn't audio)."
          }
        },
        "required": [
          "account_id",
          "attendees_ids"
        ]
      },
      "SendMessageRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "text": {
            "type": "string",
            "description": "8,000 characters at most. Required unless a file or a voice note is sent."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary",
              "contentMediaType": "application/octet-stream"
            },
            "description": "Files, 20 MB each at most."
          },
          "video_message": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "A video, sent as a file."
          },
          "voice_message": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "A voice note (multipart): sent alone (no `text` or files with it), as LinkedIn's apps send one. Any audio (m4a/AAC as Looply records it, mp3, ogg, webm/opus, wav, aac, flac; 20 MB at most) is turned into LinkedIn's AAC .m4a on the server; 60 seconds at most (422 `errors/invalid_message` over it, 415 `errors/unsupported_media_type` when it isn't audio)."
          },
          "quote_id": {
            "type": "string",
            "description": "Answers 501: quoting a message isn't sent yet."
          }
        },
        "required": [
          "account_id"
        ]
      },
      "CreatePostRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "text": {
            "type": "string",
            "description": "3,000 characters at most (mentions' names and an added link count)."
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The text shown."
                },
                "profile_id": {
                  "type": "string",
                  "description": "A person's provider id (`ACo…`) or a company's id (digits)."
                },
                "is_company": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "profile_id"
              ]
            },
            "description": "Placed in `text` with `{{0}}`, `{{1}}`… Every mention must be placed."
          },
          "external_link": {
            "type": "string",
            "description": "An http(s) link, added at the end of the text unless it's already in it."
          },
          "as_organization": {
            "type": "string",
            "description": "Write as this company page (its id, digits). The account must be an admin of the page."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary",
              "contentMediaType": "application/octet-stream"
            },
            "description": "Up to 20 images (jpg, png, gif, webp; 36 MB each) or one video (75 KB to 5 GB)."
          },
          "video_thumbnail": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "An image for the video."
          },
          "repost": {
            "type": "string",
            "description": "A post's id to repost. With no `text` (or an empty one): LinkedIn's instant repost (as a page with `as_organization`). With `text`: a repost with those words (mentions and link as for a post; no files)."
          },
          "include_job_posting": {
            "type": "string",
            "description": "Answers 501."
          },
          "targeted_audience": {
            "type": "string",
            "description": "Answers 501."
          }
        },
        "required": [
          "account_id",
          "text"
        ]
      },
      "CommentRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "text": {
            "type": "string",
            "description": "1,250 characters at most."
          },
          "comment_id": {
            "type": "string",
            "description": "Reply to this comment (its id, digits)."
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The text shown."
                },
                "profile_id": {
                  "type": "string",
                  "description": "A person's provider id (`ACo…`) or a company's id (digits)."
                },
                "is_company": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "profile_id"
              ]
            },
            "description": "Placed in `text` with `{{0}}`, `{{1}}`… Every mention must be placed."
          },
          "external_link": {
            "type": "string",
            "description": "An http(s) link, added at the end of the text unless it's already in it."
          },
          "as_organization": {
            "type": "string",
            "description": "Write as this company page (its id, digits). The account must be an admin of the page."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary",
              "contentMediaType": "application/octet-stream"
            },
            "description": "One image (jpg, png, gif or webp)."
          }
        },
        "required": [
          "account_id",
          "text"
        ]
      },
      "ReactionRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "post_id": {
            "type": "string",
            "description": "The post: its `social_id` (`urn:li:activity:…`, or a `ugcPost`/`share` urn), its id, or its URL."
          },
          "comment_id": {
            "type": "string",
            "description": "React to this comment of the post instead (its id, digits)."
          },
          "reaction_type": {
            "type": "string",
            "enum": [
              "like",
              "celebrate",
              "support",
              "love",
              "insightful",
              "funny"
            ],
            "default": "like"
          },
          "as_organization": {
            "type": "string",
            "description": "Write as this company page (its id, digits). The account must be an admin of the page."
          }
        },
        "required": [
          "account_id",
          "post_id"
        ]
      },
      "RemoveReactionRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The account that writes (or `?account_id=`). Required."
          },
          "post_id": {
            "type": "string",
            "description": "The post, as for adding one."
          },
          "comment_id": {
            "type": "string",
            "description": "The comment, when the reaction is on a comment."
          },
          "as_organization": {
            "type": "string",
            "description": "Write as this company page (its id, digits). The account must be an admin of the page."
          }
        },
        "required": [
          "account_id",
          "post_id"
        ]
      },
      "MessageDeleted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessageDeleted"
          }
        },
        "required": [
          "object"
        ]
      },
      "InvitationReceived": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "InvitationReceived"
          },
          "id": {
            "type": "string",
            "description": "The invitation's id (digits): what `POST /users/invite/received/{invitation_id}` takes."
          },
          "invited_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "The invitee: the account itself."
          },
          "invited_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invited_user_public_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invited_user_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string"
          },
          "parsed_datetime": {
            "type": [
              "string",
              "null"
            ]
          },
          "invitation_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "The inviter's note, when they wrote one."
          },
          "inviter": {
            "type": "object",
            "properties": {
              "inviter_name": {
                "type": "string"
              },
              "inviter_id": {
                "type": "string"
              },
              "inviter_public_identifier": {
                "type": "string"
              },
              "inviter_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "inviter_name",
              "inviter_id",
              "inviter_public_identifier",
              "inviter_description"
            ]
          },
          "specifics": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "const": "LINKEDIN"
              },
              "shared_secret": {
                "type": "string"
              }
            },
            "required": [
              "provider",
              "shared_secret"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "invited_user",
          "invited_user_id",
          "invited_user_public_id",
          "invited_user_description",
          "date",
          "parsed_datetime",
          "invitation_text",
          "specifics"
        ]
      },
      "InvitationReceivedList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "InvitationList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationReceived"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      },
      "HandleInvitationRequest": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "account_id": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "accept",
              "decline"
            ],
            "description": "`decline` is LinkedIn's Ignore."
          },
          "shared_secret": {
            "type": "string",
            "description": "The invitation's `specifics.shared_secret` from `GET /users/invite/received`."
          }
        },
        "required": [
          "account_id",
          "action",
          "shared_secret"
        ]
      },
      "UserInvitationHandled": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserInvitationHandled"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACCEPTED",
              "DECLINED"
            ]
          }
        },
        "required": [
          "object",
          "status"
        ]
      },
      "UserComment": {
        "type": "object",
        "description": "A comment the member wrote, under someone's post (Unipile's user comment).",
        "properties": {
          "object": {
            "type": "string",
            "const": "Comment"
          },
          "id": {
            "type": "string",
            "description": "The comment's id (digits)."
          },
          "post_id": {
            "type": "string",
            "description": "The post's activity id."
          },
          "post_urn": {
            "type": "string"
          },
          "thread_id": {
            "type": "string",
            "description": "For a reply: the comment it answers (digits)."
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "author_details": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "headline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_picture_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "network_distance": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "FIRST_DEGREE",
                  "SECOND_DEGREE",
                  "THIRD_DEGREE",
                  "OUT_OF_NETWORK",
                  null
                ]
              }
            },
            "required": [
              "id",
              "headline",
              "profile_url",
              "profile_picture_url",
              "network_distance"
            ]
          },
          "date": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "reaction_counter": {
            "type": "integer"
          },
          "reply_counter": {
            "type": "integer"
          },
          "user_reacted": {
            "type": "string",
            "enum": [
              "LIKE",
              "PRAISE",
              "APPRECIATION",
              "EMPATHY",
              "INTEREST",
              "ENTERTAINMENT"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "post_id",
          "post_urn",
          "author",
          "author_details",
          "date",
          "text",
          "reaction_counter",
          "reply_counter"
        ]
      },
      "UserCommentList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "CommentList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserComment"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          },
          "paging": {
            "type": "object",
            "properties": {
              "page_count": {
                "type": "integer"
              }
            },
            "required": [
              "page_count"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "paging"
        ]
      },
      "UserReactionList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "PostReactionList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostReaction"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next page's cursor, or `null` on the last page. Opaque: send it back as `cursor`."
          },
          "paging": {
            "type": "object",
            "properties": {
              "page_count": {
                "type": "integer"
              }
            },
            "required": [
              "page_count"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "paging"
        ]
      },
      "PeopleSearchResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "SearchResult"
          },
          "type": {
            "type": "string",
            "const": "PEOPLE"
          },
          "id": {
            "type": "string",
            "description": "The member's provider id (ACo…): what every route takes."
          },
          "public_identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "public_profile_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_picture_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_picture_url_large": {
            "type": [
              "string",
              "null"
            ]
          },
          "member_urn": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "network_distance": {
            "type": "string",
            "enum": [
              "SELF",
              "DISTANCE_1",
              "DISTANCE_2",
              "DISTANCE_3",
              "OUT_OF_NETWORK"
            ],
            "description": "LinkedIn's own word, as Unipile answers it in a search."
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "industry": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always `null`: LinkedIn's classic search doesn't give it."
          },
          "keywords_match": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "type",
          "id",
          "public_identifier",
          "public_profile_url",
          "profile_url",
          "profile_picture_url",
          "profile_picture_url_large",
          "member_urn",
          "name",
          "network_distance",
          "location",
          "industry",
          "headline"
        ]
      },
      "PostSearchResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "SearchResult"
          },
          "type": {
            "type": "string",
            "const": "POST"
          },
          "provider": {
            "type": "string",
            "const": "LINKEDIN"
          },
          "id": {
            "type": "string",
            "description": "The post's activity id."
          },
          "social_id": {
            "type": "string"
          },
          "share_url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "parsed_datetime": {
            "type": "string"
          },
          "reaction_counter": {
            "type": "integer"
          },
          "comment_counter": {
            "type": "integer"
          },
          "repost_counter": {
            "type": "integer"
          },
          "impressions_counter": {
            "type": "integer"
          },
          "user_reacted": {
            "type": "string",
            "enum": [
              "LIKE",
              "PRAISE",
              "APPRECIATION",
              "EMPATHY",
              "INTEREST",
              "ENTERTAINMENT"
            ]
          },
          "author": {
            "$ref": "#/components/schemas/PostAuthor"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "can_react": {
                "type": "boolean"
              },
              "can_share": {
                "type": "boolean"
              },
              "can_post_comments": {
                "type": "boolean"
              }
            },
            "required": [
              "can_react",
              "can_share",
              "can_post_comments"
            ]
          },
          "is_repost": {
            "type": "boolean"
          },
          "repost_id": {
            "type": "string",
            "description": "A plain repost: the repost's own activity id."
          },
          "reposted_by": {
            "$ref": "#/components/schemas/PostAuthor",
            "description": "A plain repost: who reposted it."
          },
          "repost_content": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "parsed_datetime": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "author": {
                "$ref": "#/components/schemas/PostAuthor"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PostAttachment"
                }
              }
            },
            "required": [
              "id",
              "date",
              "parsed_datetime",
              "text",
              "author",
              "attachments"
            ],
            "description": "The post shared: the reposted post, on a plain repost and on a repost with words."
          },
          "repost_parsed_datetime": {
            "type": "string",
            "description": "A plain repost: when it was reposted."
          }
        },
        "required": [
          "object",
          "type",
          "provider",
          "id",
          "social_id",
          "share_url",
          "text",
          "date",
          "parsed_datetime",
          "reaction_counter",
          "comment_counter",
          "repost_counter",
          "impressions_counter",
          "author",
          "permissions",
          "is_repost"
        ]
      },
      "JobSearchResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "SearchResult"
          },
          "type": {
            "type": "string",
            "const": "JOB"
          },
          "id": {
            "type": "string",
            "description": "The job posting's id (digits)."
          },
          "reference_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reposted": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          },
          "promoted": {
            "type": "boolean"
          },
          "benefits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "easy_apply": {
            "type": "boolean"
          },
          "company": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public_identifier": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_picture_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "public_identifier",
                  "name",
                  "profile_url",
                  "profile_picture_url"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "type",
          "id",
          "reference_id",
          "title",
          "location",
          "posted_at",
          "reposted",
          "url",
          "promoted",
          "benefits",
          "easy_apply",
          "company"
        ]
      },
      "PeopleSearchRequest": {
        "type": "object",
        "description": "Unipile's classic people search. Ids come from `GET /linkedin/search/parameters`.",
        "properties": {
          "api": {
            "type": "string",
            "enum": [
              "classic"
            ],
            "default": "classic"
          },
          "category": {
            "type": "string",
            "const": "people"
          },
          "keywords": {
            "type": "string"
          },
          "industry": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "location": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "company": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "Current company ids: a company's employees."
          },
          "past_company": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "school": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "service": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "profile_language": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 2
            }
          },
          "network_distance": {
            "type": "array",
            "items": {
              "type": "integer",
              "enum": [
                1,
                2,
                3
              ]
            }
          },
          "connections_of": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Members' provider ids (or public identifiers: one read each)."
          },
          "followers_of": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Members' provider ids (or public identifiers: one read each)."
          },
          "open_to": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "proBono",
                "boardMember"
              ]
            }
          },
          "advanced_keywords": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "company": {
                "type": "string"
              },
              "school": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "category"
        ]
      },
      "PostSearchRequest": {
        "type": "object",
        "description": "Unipile's classic posts search (3 results by default, 49 at most).",
        "properties": {
          "api": {
            "type": "string",
            "enum": [
              "classic"
            ],
            "default": "classic"
          },
          "category": {
            "type": "string",
            "const": "posts"
          },
          "keywords": {
            "type": "string"
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "relevance",
              "date"
            ]
          },
          "date_posted": {
            "type": "string",
            "enum": [
              "past_day",
              "past_week",
              "past_month"
            ]
          },
          "content_type": {
            "type": "string",
            "enum": [
              "videos",
              "images",
              "live_videos",
              "collaborative_articles",
              "documents",
              "jobs"
            ]
          },
          "posted_by": {
            "type": "object",
            "properties": {
              "member": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "company": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
              },
              "me": {
                "type": "boolean"
              },
              "first_connections": {
                "type": "boolean"
              },
              "people_you_follow": {
                "type": "boolean"
              }
            }
          },
          "mentioning": {
            "type": "object",
            "properties": {
              "member": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "company": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
              }
            }
          },
          "author": {
            "type": "object",
            "properties": {
              "industry": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
              },
              "company": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
              },
              "keywords": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "category"
        ]
      },
      "JobSearchRequest": {
        "type": "object",
        "description": "Unipile's classic jobs search (25 a LinkedIn call, 50 at most a page). `benefits`, `commitments` and `minimum_salary` answer 501.",
        "properties": {
          "api": {
            "type": "string",
            "enum": [
              "classic"
            ],
            "default": "classic"
          },
          "category": {
            "type": "string",
            "const": "jobs"
          },
          "keywords": {
            "type": "string"
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "relevance",
              "date"
            ]
          },
          "date_posted": {
            "type": "number",
            "description": "Days since today."
          },
          "region": {
            "type": "string",
            "pattern": "^\\d+$",
            "description": "A location id (the search's own place)."
          },
          "location": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "location_within_area": {
            "type": "number",
            "description": "Miles."
          },
          "industry": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "role": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "company": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "LinkedIn ids (digits): `GET /linkedin/search/parameters` finds them."
          },
          "seniority": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "executive",
                "director",
                "mid_senior",
                "associate",
                "entry",
                "intern"
              ]
            }
          },
          "function": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z]+$"
            }
          },
          "job_type": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "full_time",
                "part_time",
                "contract",
                "temporary",
                "volunteer",
                "internship",
                "other"
              ]
            }
          },
          "presence": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "on_site",
                "hybrid",
                "remote"
              ]
            }
          },
          "easy_apply": {
            "type": "boolean"
          },
          "has_verifications": {
            "type": "boolean"
          },
          "under_10_applicants": {
            "type": "boolean"
          },
          "in_your_network": {
            "type": "boolean"
          },
          "fair_chance_employer": {
            "type": "boolean"
          }
        },
        "required": [
          "category"
        ]
      },
      "UrlSearchRequest": {
        "type": "object",
        "description": "A LinkedIn search page's address (people, content, companies or jobs): read as Unipile's body.",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "CursorSearchRequest": {
        "type": "object",
        "description": "The next page of a search, with its filters.",
        "properties": {
          "cursor": {
            "type": "string"
          }
        },
        "required": [
          "cursor"
        ]
      },
      "LinkedinSearchParameter": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "LinkedinSearchParameter"
          },
          "id": {
            "type": "string",
            "description": "What the search's filters take (digits, or a member's provider id for PEOPLE and CONNECTIONS)."
          },
          "title": {
            "type": "string"
          },
          "picture_url": {
            "type": "string"
          },
          "additional_data": {
            "type": "object",
            "properties": {
              "subtitle": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "object",
          "id",
          "title"
        ]
      },
      "LinkedinSearchParametersList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "LinkedinSearchParametersList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedinSearchParameter"
            }
          },
          "paging": {
            "type": "object",
            "properties": {
              "page_count": {
                "type": "integer"
              }
            },
            "required": [
              "page_count"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "paging"
        ]
      },
      "CompanyProfile": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "CompanyProfile"
          },
          "id": {
            "type": "string",
            "description": "The company's id (digits)."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "entity_urn": {
            "type": "string"
          },
          "public_identifier": {
            "type": "string"
          },
          "profile_url": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "followers_count": {
            "type": "integer"
          },
          "is_following": {
            "type": "boolean"
          },
          "is_employee": {
            "type": "boolean"
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "title"
              ]
            }
          },
          "messaging": {
            "type": "object",
            "properties": {
              "is_enabled": {
                "type": "boolean",
                "description": "Always `false`: LinkedIn's page answer names no messaging setting."
              },
              "id": {
                "type": "string"
              },
              "entity_urn": {
                "type": "string"
              }
            },
            "required": [
              "is_enabled"
            ]
          },
          "claimed": {
            "type": "boolean"
          },
          "viewer_permissions": {
            "type": "object",
            "description": "Each `true` for the page's admins, `false` for anyone else.",
            "properties": {
              "canMembersInviteToFollow": {
                "type": "boolean"
              },
              "canReadContentSuggestions": {
                "type": "boolean"
              },
              "canReadMessages": {
                "type": "boolean"
              },
              "canUpdateOrganizationProfile": {
                "type": "boolean"
              },
              "canCreateOrganicShare": {
                "type": "boolean"
              },
              "canReadAdminDashboard": {
                "type": "boolean"
              },
              "canReadOrganizationActivity": {
                "type": "boolean"
              },
              "canEditCurators": {
                "type": "boolean"
              },
              "canManageOrganizationalPageFollow": {
                "type": "boolean"
              },
              "canReadOrganizationFollowerAnalytics": {
                "type": "boolean"
              },
              "canInviteMemberToFollow": {
                "type": "boolean"
              },
              "canReadOrganizationLeadsAnalytics": {
                "type": "boolean"
              },
              "canEditPendingAdministrators": {
                "type": "boolean"
              },
              "canManageMessagingAccess": {
                "type": "boolean"
              },
              "canSeeEmployeeExperienceAsMember": {
                "type": "boolean"
              },
              "canEmployeesInviteToFollow": {
                "type": "boolean"
              },
              "canSeeOrganizationAdministrativePage": {
                "type": "boolean"
              },
              "canManageAdminRoles": {
                "type": "boolean"
              },
              "canEditOrganizationDetails": {
                "type": "boolean"
              },
              "canApproveContent": {
                "type": "boolean"
              },
              "canViewTeamPerformance": {
                "type": "boolean"
              },
              "canManageOrganizationSettings": {
                "type": "boolean"
              },
              "canAccessAdvancedAnalytics": {
                "type": "boolean"
              },
              "canModerateComments": {
                "type": "boolean"
              },
              "canCreateAds": {
                "type": "boolean"
              },
              "canManageAdBudgets": {
                "type": "boolean"
              },
              "canEditPageTheme": {
                "type": "boolean"
              },
              "canPublishNewsletters": {
                "type": "boolean"
              },
              "canEditCustomTabs": {
                "type": "boolean"
              },
              "canManageIntegrations": {
                "type": "boolean"
              },
              "canAssignRoles": {
                "type": "boolean"
              },
              "canApprovePendingMembers": {
                "type": "boolean"
              },
              "canEditCareerPageSettings": {
                "type": "boolean"
              },
              "canViewBillingInformation": {
                "type": "boolean"
              }
            }
          },
          "organization_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PUBLIC_COMPANY",
              "EDUCATIONAL",
              "SELF_EMPLOYED",
              "GOVERNMENT_AGENCY",
              "NON_PROFIT",
              "SELF_OWNED",
              "PRIVATELY_HELD",
              "PARTNERSHIP",
              null
            ]
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "is_headquarter": {
                  "type": "boolean"
                },
                "country": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "postalCode": {
                  "type": "string"
                },
                "street": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": {
                  "type": "string"
                },
                "area": {
                  "type": "string"
                }
              },
              "required": [
                "is_headquarter",
                "country",
                "city",
                "street"
              ]
            }
          },
          "logo": {
            "type": "string"
          },
          "industry": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "activities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The page's specialties."
          },
          "employee_count": {
            "type": "integer"
          },
          "employee_count_range": {
            "type": "object",
            "properties": {
              "from": {
                "type": "integer"
              },
              "to": {
                "type": "integer"
              }
            },
            "required": [
              "from",
              "to"
            ]
          },
          "website": {
            "type": "string"
          },
          "foundation_date": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "acquired_by": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "public_identifier": {
                "type": "string"
              },
              "profile_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "public_identifier",
              "profile_url"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "description",
          "entity_urn",
          "public_identifier",
          "profile_url",
          "hashtags",
          "messaging",
          "claimed",
          "viewer_permissions",
          "organization_type",
          "locations"
        ]
      },
      "RawDataRequest": {
        "type": "object",
        "description": "Unipile's raw route, reads only: `method` GET (any other answers 501), `request_url` one of LinkedIn's API addresses (`https://www.linkedin.com/voyager/api/…`, or the path).",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "request_url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ],
            "default": "GET"
          },
          "query_params": {
            "type": "object",
            "description": "Added to the address's query string."
          },
          "encoding": {
            "type": "boolean",
            "default": true,
            "description": "`false`: query_params are added as given (not URL-encoded)."
          },
          "headers": {
            "type": "object",
            "description": "Ignored: the account's own session headers are sent."
          },
          "body": {
            "type": "object",
            "description": "Ignored (reads only)."
          }
        },
        "required": [
          "account_id",
          "request_url"
        ]
      },
      "LinkedinRawData": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "LinkedinRawData"
          },
          "data": {
            "description": "LinkedIn's own answer, as it came."
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "MessageReactionRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "reaction": {
            "type": "string",
            "description": "A native emoji, e.g. 👍."
          }
        },
        "required": [
          "reaction"
        ]
      },
      "MessageReactionAdded": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessageReactionAdded"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "success"
        ]
      },
      "MessageReactionRemoved": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessageReactionRemoved"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "success"
        ]
      },
      "EditMessageRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "maxLength": 8000
          }
        },
        "required": [
          "text"
        ]
      },
      "MessagePatched": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "MessagePatched"
          }
        },
        "required": [
          "object"
        ]
      },
      "PatchChatRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "setReadStatus",
              "setMuteStatus",
              "setArchiveStatus",
              "setPinnedStatus",
              "addParticipant",
              "removeParticipant",
              "setLabel",
              "getInviteLink"
            ],
            "description": "LinkedIn has `setReadStatus` and `setMuteStatus`; the others (WhatsApp's and Telegram's) answer 422 `errors/not_supported_by_provider`."
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "value"
        ]
      },
      "ChatPatched": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatPatched"
          }
        },
        "required": [
          "object"
        ]
      },
      "ChatDeleted": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "ChatDeleted"
          }
        },
        "required": [
          "object"
        ]
      },
      "UserFollower": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserFollower"
          },
          "id": {
            "type": "string",
            "description": "The follower's provider id (`ACo…`)."
          },
          "urn": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "profile_url": {
            "type": "string",
            "description": "The profile link by provider id, as Unipile answers it."
          },
          "profile_picture_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "100 px."
          },
          "profile_picture_url_large": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "urn",
          "name",
          "headline",
          "profile_url",
          "profile_picture_url",
          "profile_picture_url_large"
        ]
      },
      "UserFollowersList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "UserFollowersList"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserFollower"
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "items",
          "cursor"
        ]
      }
    }
  }
}
