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

# Create a Social Selling media upload

> Starts a media upload for a draft: answers an `assetId` and a presigned `upload.url`. PUT the file there with exactly `upload.headers` (the signature covers the size and type), then call `complete_a_social_selling_media_upload`. Images (JPEG, PNG, GIF, WebP; up to 8 MB, 20 per post), one video (MP4, MOV, …; 3 s to 15 min, up to 5 GB) or one document (PDF, DOC(X), PPT(X); up to 100 MB). To reuse a post’s media, attach its `spm_` asset id to a draft directly instead.

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



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json post /v1/social-selling/media/uploads
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/uploads:
    post:
      tags:
        - Social Selling
      summary: Create a Social Selling media upload
      description: >-
        Starts a media upload for a draft: answers an `assetId` and a presigned
        `upload.url`. PUT the file there with exactly `upload.headers` (the
        signature covers the size and type), then call
        `complete_a_social_selling_media_upload`. Images (JPEG, PNG, GIF, WebP;
        up to 8 MB, 20 per post), one video (MP4, MOV, …; 3 s to 15 min, up to 5
        GB) or one document (PDF, DOC(X), PPT(X); up to 100 MB). To reuse a
        post’s media, attach its `spm_` asset id to a draft directly instead.

            > **Required scope:** `SOCIAL_SELLING_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - IMAGE
                    - VIDEO
                    - DOCUMENT
                mimeType:
                  type: string
                  minLength: 1
                  example: image/png
                fileName:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Its extension must match `mimeType`.
                  example: london-map.png
                sizeBytes:
                  type: integer
                  exclusiveMinimum: 0
                  description: Exact size of the file you will PUT.
                altText:
                  type: string
                  maxLength: 4086
                  description: Image alt text shown on LinkedIn.
                title:
                  type: string
                  minLength: 1
                  maxLength: 58
                  description: >-
                    Document title shown on LinkedIn (required to attach a
                    document).
                credit:
                  type: string
                  maxLength: 200
                  description: Credit kept with the asset.
              required:
                - type
                - mimeType
                - fileName
                - sizeBytes
      responses:
        '201':
          description: The pending asset and its presigned upload
          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
                      upload:
                        type: object
                        properties:
                          method:
                            type: string
                            enum:
                              - PUT
                          url:
                            type: string
                            description: Presigned; valid 60 minutes.
                          headers:
                            type: object
                            additionalProperties:
                              type: string
                            description: Send exactly these headers with the PUT.
                          expiresAt:
                            type: string
                        required:
                          - method
                          - url
                          - headers
                          - expiresAt
                    required:
                      - asset
                      - upload
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            Unsupported type, extension/MIME mismatch or file too large
            (`INVALID_UPLOAD`)
        '403':
          description: >-
            Social Selling is not enabled for this workspace. Ask your workspace
            admin to enable the feature.
        '503':
          description: Media storage is not configured
      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.