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

# Refresh Social Selling media access

> Makes a media asset’s download URL durable: a LinkedIn URL that is still valid is copied to Enginy’s storage and the post points at the copy (`COPIED`); an expired one starts a LinkedIn re-read of the author’s posts (`POST_REFRESH_REQUESTED`, call again in a few minutes); a durable URL or an upload is re-verified (`ALREADY_DURABLE`). Access is re-checked on every call. Side effects: may store a copy of the file and update the post’s stored media URL.

    > **Required scope:** `SOCIAL_SELLING_WRITE`
    >
    > **Rate limit:** 30 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json post /v1/social-selling/media/{assetId}/refresh
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/social-selling/media/{assetId}/refresh:
    post:
      tags:
        - Social Selling
      summary: Refresh Social Selling media access
      description: >-
        Makes a media asset’s download URL durable: a LinkedIn URL that is still
        valid is copied to Enginy’s storage and the post points at the copy
        (`COPIED`); an expired one starts a LinkedIn re-read of the author’s
        posts (`POST_REFRESH_REQUESTED`, call again in a few minutes); a durable
        URL or an upload is re-verified (`ALREADY_DURABLE`). Access is
        re-checked on every call. Side effects: may store a copy of the file and
        update the post’s stored media URL.

            > **Required scope:** `SOCIAL_SELLING_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: >-
              Media asset id: `spm_<postId>_<position>` for a tracked post’s
              media (`spm_<postId>_r<position>` for the media of the post it
              reposts), `ssa_<uuid>` for an upload. Stable; never a URL.
            example: spm_50307_0
          required: true
          description: >-
            Media asset id: `spm_<postId>_<position>` for a tracked post’s media
            (`spm_<postId>_r<position>` for the media of the post it reposts),
            `ssa_<uuid>` for an upload. Stable; never a URL.
          name: assetId
          in: path
      responses:
        '200':
          description: The asset after the refresh, and what was done
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      asset:
                        type: object
                        properties:
                          assetId:
                            type: string
                          position:
                            type: number
                            description: 0-based order in the post (or draft).
                          origin:
                            type: string
                            enum:
                              - POST
                              - REPOSTED_POST
                              - UPLOAD
                          type:
                            type: string
                            enum:
                              - IMAGE
                              - VIDEO
                              - DOCUMENT
                              - ARTICLE
                              - POLL
                              - CELEBRATION
                              - REFERENCE
                          mimeType:
                            type:
                              - string
                              - 'null'
                          width:
                            type:
                              - number
                              - 'null'
                          height:
                            type:
                              - number
                              - 'null'
                          sizeBytes:
                            type:
                              - number
                              - 'null'
                          durationMs:
                            type:
                              - number
                              - 'null'
                          pageCount:
                            type:
                              - number
                              - 'null'
                          title:
                            type:
                              - string
                              - 'null'
                          description:
                            type:
                              - string
                              - 'null'
                          altText:
                            type:
                              - string
                              - 'null'
                          altTextSource:
                            type:
                              - string
                              - 'null'
                            enum:
                              - AUTHOR
                              - UPLOADER
                              - null
                            description: >-
                              Who wrote `altText`. Alt text is never generated
                              by Enginy.
                          linkUrl:
                            type:
                              - string
                              - 'null'
                            description: The link of an article or reference card.
                          pollOptions:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                          transcript:
                            type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - NOT_COLLECTED
                            required:
                              - status
                            description: >-
                              Video captions and transcripts are not collected
                              from LinkedIn.
                          access:
                            type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - AVAILABLE
                                  - EXPIRING
                                  - EXPIRED
                                  - UNAVAILABLE
                                  - PENDING_UPLOAD
                                  - NOT_DOWNLOADABLE
                                description: >-
                                  AVAILABLE: `downloadUrl` serves the file.
                                  EXPIRING: served by LinkedIn until `expiresAt`
                                  (refresh for a durable copy). EXPIRED /
                                  UNAVAILABLE: no working URL (`reason` says
                                  why; refresh). PENDING_UPLOAD: upload not
                                  completed. NOT_DOWNLOADABLE: no file (poll,
                                  link card).
                              downloadUrl:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  HTTPS URL of the original file. Any HTTP
                                  client can GET it without a login, cookies or
                                  headers. Null unless AVAILABLE or EXPIRING.
                              previewUrl:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  A smaller rendition to look at (the image
                                  itself; video/document thumbnail).
                              expiresAt:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  When `downloadUrl` stops working (null =
                                  durable).
                              durable:
                                type: boolean
                                description: >-
                                  True when `downloadUrl` is Enginy’s durable
                                  copy.
                              refreshable:
                                type: boolean
                                description: >-
                                  True when
                                  `refresh_social_selling_media_access` can
                                  improve it.
                              verifiedAt:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  When Enginy confirmed the URL serves the file
                                  (null = not probed).
                              reason:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - status
                              - downloadUrl
                              - previewUrl
                              - expiresAt
                              - durable
                              - refreshable
                              - verifiedAt
                              - reason
                          source:
                            type:
                              - object
                              - 'null'
                            properties:
                              trackedPostId:
                                type: number
                              position:
                                type: number
                              credit:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - trackedPostId
                              - position
                              - credit
                            description: >-
                              For a copy of a post’s media: where it came from
                              and its credit.
                        required:
                          - assetId
                          - position
                          - origin
                          - type
                          - mimeType
                          - width
                          - height
                          - sizeBytes
                          - durationMs
                          - pageCount
                          - title
                          - description
                          - altText
                          - altTextSource
                          - linkUrl
                          - pollOptions
                          - transcript
                          - access
                          - source
                      outcome:
                        type: string
                        enum:
                          - ALREADY_DURABLE
                          - COPIED
                          - POST_REFRESH_REQUESTED
                          - UNAVAILABLE
                        description: >-
                          ALREADY_DURABLE: nothing to do. COPIED: copied to
                          Enginy’s durable storage (the post now uses the copy).
                          POST_REFRESH_REQUESTED: LinkedIn’s URL had expired; a
                          re-read of the author’s posts started — call again in
                          a few minutes. UNAVAILABLE: nothing could be done.
                    required:
                      - asset
                      - outcome
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            The author’s identity cannot sync right now (it needs attention in
            Enginy)
        '403':
          description: >-
            Social Selling is not enabled for this workspace. Ask your workspace
            admin to enable the feature.
        '404':
          description: >-
            Asset not found in this workspace or outside the caller’s identity
            scope (also for a malformed id)
        '503':
          description: Media storage or LinkedIn synchronization unavailable right now
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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