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

# Create Tracked Link

> Create a tracked link: a link to an asset made for one named person, so the sender is told when it is opened (by default a Slack DM to the caller; notifyTargets replaces that default, so include slackDm with your own email to keep the DM; notifyOn picks first view only or off). Anyone holding the link can view the asset with no sign-in, and a forwarded link reports the new reader's views as the link's. Views are logged on the asset's deal unless opportunityOId names another.



## OpenAPI

````yaml post /api/v2/asset/tracked-links/create
openapi: 3.0.0
info:
  version: 7.2.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/asset/tracked-links/create:
    post:
      tags:
        - Asset
      summary: Create Tracked Link
      description: >-
        Create a tracked link: a link to an asset made for one named person, so
        the sender is told when it is opened (by default a Slack DM to the
        caller; notifyTargets replaces that default, so include slackDm with
        your own email to keep the DM; notifyOn picks first view only or off).
        Anyone holding the link can view the asset with no sign-in, and a
        forwarded link reports the new reader's views as the link's. Views are
        logged on the asset's deal unless opportunityOId names another.
      operationId: createTrackedLink
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                assetId:
                  type: string
                  minLength: 1
                  description: >-
                    UUID of the asset to link to. e.g.
                    '4f1e2a90-8b3d-4c21-9e07-2a1b3c4d5e6f'
                recipientName:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    Who the link is for, as the sender would say it. Shown to
                    the workspace, never to the viewer. e.g. 'Mary Chen, Acme'
                opportunityOId:
                  type: string
                  nullable: true
                  minLength: 1
                  description: >-
                    Deal whose timeline records the link's views. Defaults to
                    the asset's own deal. e.g. 'crmo_abc123'
                notifyOn:
                  type: string
                  enum:
                    - first_view
                    - every_view
                    - 'off'
                  default: every_view
                  description: >-
                    When the sender is told: 'every_view' (a same-visitor reload
                    within 30 minutes counts once), 'first_view', or 'off'
                    (views are still counted). e.g. 'every_view'
                notifyTargets:
                  type: object
                  nullable: true
                  properties:
                    slack:
                      type: object
                      nullable: true
                      properties:
                        channel:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                            name:
                              type: string
                              minLength: 1
                          required:
                            - id
                            - name
                      default: null
                      required:
                        - channel
                    slackDm:
                      type: object
                      nullable: true
                      properties:
                        recipients:
                          type: array
                          items:
                            type: string
                            maxLength: 254
                            format: email
                          minItems: 1
                          maxItems: 20
                      default: null
                      required:
                        - recipients
                    email:
                      type: object
                      nullable: true
                      properties:
                        recipients:
                          type: array
                          items:
                            type: string
                            maxLength: 254
                            format: email
                          minItems: 1
                          maxItems: 20
                      default: null
                      required:
                        - recipients
                  description: >-
                    Where views are announced: { slack: { channel: { id, name }
                    }, slackDm: { recipients: [email] }, email: { recipients:
                    [email] } }, each optional. Omitted = a Slack DM to the
                    caller.
                expiresInDays:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 3650
                  description: >-
                    Days until the link stops opening; null or omitted = never.
                    e.g. 90
              required:
                - assetId
                - recipientName
      responses:
        '200':
          description: Tracked link created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: object
                    properties:
                      oId:
                        type: string
                      assetId:
                        type: string
                      shareUuid:
                        type: string
                      url:
                        type: string
                        nullable: true
                      recipientName:
                        type: string
                      opportunity:
                        type: object
                        nullable: true
                        properties:
                          oId:
                            type: string
                          name:
                            type: string
                        required:
                          - oId
                          - name
                      notifyOn:
                        type: string
                        enum:
                          - first_view
                          - every_view
                          - 'off'
                      notifyTargets:
                        type: object
                        properties:
                          slack:
                            type: object
                            nullable: true
                            properties:
                              channel:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 1
                                  name:
                                    type: string
                                    minLength: 1
                                required:
                                  - id
                                  - name
                            default: null
                            required:
                              - channel
                          slackDm:
                            type: object
                            nullable: true
                            properties:
                              recipients:
                                type: array
                                items:
                                  type: string
                                  maxLength: 254
                                  format: email
                                minItems: 1
                                maxItems: 20
                            default: null
                            required:
                              - recipients
                          email:
                            type: object
                            nullable: true
                            properties:
                              recipients:
                                type: array
                                items:
                                  type: string
                                  maxLength: 254
                                  format: email
                                minItems: 1
                                maxItems: 20
                            default: null
                            required:
                              - recipients
                      viewCount:
                        type: number
                      firstViewedAt:
                        type: string
                        nullable: true
                      lastViewedAt:
                        type: string
                        nullable: true
                      createdBy:
                        type: object
                        nullable: true
                        properties:
                          oId:
                            type: string
                          name:
                            type: string
                        required:
                          - oId
                          - name
                      createdAt:
                        type: string
                    required:
                      - oId
                      - assetId
                      - shareUuid
                      - url
                      - recipientName
                      - opportunity
                      - notifyOn
                      - notifyTargets
                      - viewCount
                      - firstViewedAt
                      - lastViewedAt
                      - createdBy
                      - createdAt
                required:
                  - _metadata
                  - data
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                required:
                  - _metadata
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.