> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harvestapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Message

> Send LinkedIn message to the specified profile. 

This endpoint works only with custom accounts. Please check the [Using Custom Accounts](/guides/custom-accounts) guide for more details on how to set up and use custom accounts.


## OpenAPI

````yaml POST /linkedin/send-message
openapi: 3.0.1
info:
  title: HarvestAPI LinkedIn API reference
  description: HarvestAPI LinkedIn API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.harvestapi.io
security:
  - ApiKeyAuthHeader: []
paths:
  /linkedin/send-message:
    post:
      summary: Send LinkedIn message
      description: 'Send LinkedIn message to the specified profile. '
      parameters:
        - name: recipientProfile
          in: query
          description: >-
            LinkedIn profile URL to which the message will be sent. For example,
            'https://www.linkedin.com/in/john-doe-123456789/'
          schema:
            type: string
            format: url
        - name: message
          in: query
          description: Message text to send.
          schema:
            type: string
        - name: cookie
          in: query
          required: true
          description: >-
            LinkedIn cookies. Please check
            https://docs.harvestapi.io/guides/custom-accounts for more details
            on how to get and use the cookies.
          schema:
            type: string
        - name: proxy
          in: query
          description: >-
            Proxy to use for this request. More details -
            https://docs.harvestapi.io/guides/custom-accounts
          schema:
            type: string
        - name: userAgent
          in: query
          description: >-
            User-Agent to use for this request. More details -
            https://docs.harvestapi.io/guides/custom-accounts
          schema:
            type: string
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  element:
                    type: object
                    properties:
                      originToken:
                        type: string
                      body:
                        type: object
                        properties:
                          attributes:
                            type: array
                            items: {}
                          text:
                            type: string
                      backendUrn:
                        type: string
                      conversationUrn:
                        type: string
                      deliveredAt:
                        type: integer
                      renderContentUnions:
                        type: array
                        items: {}
                      renderContentFallbackText:
                        type: string
                        nullable: true
                      entityUrn:
                        type: string
                      backendConversationUrn:
                        type: string
                      senderUrn:
                        type: string
                  status:
                    type: string
                  error:
                    type: string
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuthHeader:
      type: apiKey
      in: header
      name: X-API-Key

````