> ## 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.

# Publish to LinkedIn

> Publish to LinkedIn.



## OpenAPI

````yaml POST /ai/social/linkedin/publish
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/publish:
    post:
      tags:
        - AI
      summary: Publish a text post to the connected LinkedIn account
      description: >-
        Requires an active LinkedIn connection for the tenant. Posts a UGC share
        with `lifecycleState: PUBLISHED` and no media. `visibility` defaults to
        PUBLIC. Upstream LinkedIn failures are surfaced as 502.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - text
              properties:
                text:
                  type: string
                  minLength: 10
                  maxLength: 3000
                  description: Post body
                  example: >-
                    New article: what intermittent fasting actually does to your
                    metabolism.
                visibility:
                  type: string
                  description: Who can see the post
                  enum:
                    - PUBLIC
                    - CONNECTIONS
                  default: PUBLIC
            examples:
              Basic:
                value:
                  text: >-
                    New article: what intermittent fasting actually does to your
                    metabolism.
                  visibility: PUBLIC
      responses:
        '200':
          description: OK (published)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Published to LinkedIn
                data:
                  provider: linkedin
                  postId: urn:li:share:7123456789
                  status: 201
        '401':
          description: Unauthorized
        '403':
          description: Forbidden (role not allowed)
        '404':
          description: LinkedIn connection not found for tenant
        '406':
          description: Validation failed, or the LinkedIn connection is incomplete
        '500':
          description: Failed to publish to LinkedIn
        '502':
          description: LinkedIn API returned an error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````