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

# Link Entities to Resource

> Link or unlink library entities to a source doc (Google Doc, Notion page, Linear doc, website page). Links are the substrate of resource drift: a linked doc is checked against its entities' state, and material divergence becomes a reviewable doc-update suggestion (see /resource/check-drift). Use this to curate which docs back which entities — e.g. after uploading a new case study, link it to the personas, use cases, and proof points it supports.



## OpenAPI

````yaml post /api/v2/resource/link-entities
openapi: 3.0.0
info:
  version: 5.4.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/resource/link-entities:
    post:
      tags:
        - Resource
      summary: Link Entities to Resource
      description: >-
        Link or unlink library entities to a source doc (Google Doc, Notion
        page, Linear doc, website page). Links are the substrate of resource
        drift: a linked doc is checked against its entities' state, and material
        divergence becomes a reviewable doc-update suggestion (see
        /resource/check-drift). Use this to curate which docs back which
        entities — e.g. after uploading a new case study, link it to the
        personas, use cases, and proof points it supports.
      operationId: linkEntities
      requestBody:
        description: Resource, link direction, and the entity oIds to apply
        content:
          application/json:
            schema:
              type: object
              properties:
                resourceOId:
                  type: string
                  minLength: 1
                  description: The resource (doc) oId to link entities to or unlink from
                  example: rs_1234567890
                linkType:
                  type: string
                  enum:
                    - add
                    - remove
                  description: Use add to link entities, remove to unlink entities
                entityOIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 100
                  description: >-
                    Library entity oIds to link/unlink — any mix of personas
                    (pe_), use cases (uu_), references (re_), competitors (cp_),
                    proof points (pp_), segments (sg_), objections (oj_), and
                    other library types
              required:
                - resourceOId
                - linkType
                - entityOIds
      responses:
        '200':
          description: Counts of links created/removed plus any skipped oIds
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  success:
                    type: boolean
                  resourceOId:
                    type: string
                  linkType:
                    type: string
                    enum:
                      - add
                      - remove
                  linked:
                    type: number
                    description: >-
                      Links created or restored (add) — already-active links are
                      idempotent and do not increment this count
                  removed:
                    type: number
                    description: Links removed (remove)
                  skipped:
                    type: array
                    items:
                      type: string
                    description: >-
                      Entity oIds that were malformed, unsupported, missing,
                      deleted, or outside this workspace
                  message:
                    type: string
                required:
                  - _metadata
                  - success
                  - resourceOId
                  - linkType
                  - linked
                  - removed
                  - skipped
                  - message
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````