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

# Connect LinkedIn Account

> Connect LinkedIn Account.



## OpenAPI

````yaml PUT /ai/social/linkedin/connect
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /ai/social/linkedin/connect:
    put:
      tags:
        - AI
      summary: Connect or replace the tenant's LinkedIn account
      description: >-
        Upserts the LinkedIn connection. The access token is encrypted at rest
        and masked in the response. Re-calling this endpoint replaces the stored
        credentials and marks the connection active.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - accessToken
                - authorUrn
              properties:
                accessToken:
                  type: string
                  minLength: 20
                  description: LinkedIn OAuth access token
                authorUrn:
                  type: string
                  description: Author URN the posts are published as
                  pattern: ^urn:li:(person|organization):.+$
                  example: urn:li:organization:123456
            examples:
              Organization Page:
                value:
                  accessToken: AQVqA1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8
                  authorUrn: urn:li:organization:123456
      responses:
        '200':
          description: OK (connected)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: LinkedIn connected
                data:
                  tenantId: '{{objectId}}'
                  provider: linkedin
                  isActive: true
                  config:
                    accessToken: AQVq...P6Q7R8
                    authorUrn: urn:li:organization:123456
                  updatedBy: '{{objectId}}'
                  updatedAt: '2025-10-01T12:00:00.000Z'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden (role not allowed)
        '406':
          description: Validation failed (token too short or malformed authorUrn)
        '500':
          description: Failed to store the connection
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````