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

# POST /uploads/{id}/capability

> Get upload instructions. Use the returned URL, method and headers to send the original file as a binary body, without your Platform API key. Instructions expire 15 minutes after the upload was reserved. Required permissions: library.upload. Use Postman or your backend. Keep your API key private; do not enter it in this public documentation page.

Required permissions: `library.upload`.

Returns temporary upload instructions for an existing upload session: `data.method` is **PUT**, `data.url` is the destination, and `data.headers` contains the headers to copy.

Create a separate **PUT** request in Postman using the complete returned URL. Select **Authorization → No Auth** and **Body → binary**, copy the returned headers, and select your original file. Do not send the file to this capability endpoint and do not send your Platform API key to the PUT URL.

See the [full Postman upload steps](https://docs.layarva.com/developers/platform-library.md#step-3-upload-the-file-using-put).

Send an [Idempotency-Key](https://docs.layarva.com/developers/platform-request-keys.md). This endpoint gives fresh upload instructions; calling it again does not extend the upload session's original 15-minute deadline.

> [!NOTE]
>
> Use your Platform API key in Postman or your backend. Keep it private; do not enter it in this public page. Your workspace permissions and plan limits apply.

See the [quickstart](https://docs.layarva.com/developers/platform-quickstart.md) for request examples. Required fields and responses are listed below.


## OpenAPI

````yaml api/platform-workspace.openapi.json POST /uploads/{id}/capability
openapi: 3.1.0
info:
  title: Layarva Platform / Workspace API
  version: 1.1.0
  description: >-
    Manage Library, Playlists, Channels, Locations, Edges, Screens and
    Schedules. Use a Platform key, not a Widget key. See
    https://docs.layarva.com/developers/platform-quickstart. Upload supported
    files, export eligible offline packages and receive signed Platform
    webhooks. Permissions, plan limits and publishing rules apply. If a request
    returns 503, stop that workflow and contact support with its requestId.
servers:
  - url: https://api.layarva.com/api/platform/v1/workspaces/{workspaceId}
    variables:
      workspaceId:
        default: workspace_example
security:
  - PlatformBearer: []
paths:
  /uploads/{id}/capability:
    post:
      tags:
        - uploads
      summary: POST /uploads/{id}/capability
      description: >-
        Get upload instructions. Use the returned URL, method and headers to
        send the original file as a binary body, without your Platform API key.
        Instructions expire 15 minutes after the upload was reserved. Required
        permissions: library.upload. Use Postman or your backend. Keep your API
        key private; do not enter it in this public documentation page.
      operationId: post__uploads_id_capability
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Id'
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9._:-]{1,128}$
          description: >-
            An operation ID, not your API key. Generate a UUID for each new
            change and reuse it when retrying the same request. See
            https://docs.layarva.com/developers/platform-request-keys for
            Postman, PowerShell and Node.js examples. Upload instructions are
            refreshed when requested again.
      requestBody:
        required: true
        description: >-
          Send application/json using the fields below. JSON requests must be no
          larger than 64 KiB.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Empty'
      responses:
        '200':
          description: Safe live-authorized result
          headers:
            X-Request-Id:
              schema:
                type: string
            Cache-Control:
              schema:
                const: private, no-store
            X-RateLimit-Limit:
              schema:
                type: string
            X-RateLimit-Remaining:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UploadCapability'
                required:
                  - data
                additionalProperties: false
        default:
          description: >-
            Error with code, message and requestId. Follow Retry-After when
            present. Contact support with the requestId if the problem
            continues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: string
components:
  schemas:
    Id:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: string
      pattern: ^[A-Za-z0-9_-]{1,100}$
    Empty:
      type: object
      properties: {}
      additionalProperties: false
    UploadCapability:
      type: object
      properties:
        method:
          const: PUT
        url:
          type: string
          format: uri
        headers:
          type: object
          additionalProperties:
            type: string
        expiresAt:
          type: string
          format: date-time
      required:
        - method
        - url
        - headers
        - expiresAt
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
          required:
            - code
            - message
            - requestId
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    PlatformBearer:
      type: http
      scheme: bearer
      bearerFormat: lv_platform_<43 base64url characters>
      description: >-
        Platform API key for one workspace. Create it in Settings with an expiry
        date or Never expire. Keep it private; use it from Postman or your
        backend, not browser code. Widget keys are not accepted.

````

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