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

# Delete Asset

> Delete an asset. You cannot delete an asset that a draft or post uses.



## OpenAPI

````yaml https://api.openpmm.com/v1/openapi.json delete /workspaces/{workspace_id}/assets/{asset_id}
openapi: 3.1.0
info:
  title: OpenPMM API
  version: 1.0.0
  description: >-
    Use one API to create and manage social posts. The signup operation does not
    need an API key. Other operations use an account API key. Workspace
    endpoints also use a workspace ID. Publishing requires explicit
    confirmation.
servers:
  - url: https://api.openpmm.com/v1
    description: Production API
security:
  - bearerAuth: []
tags:
  - name: Signup
    description: Create access to OpenPMM and the first workspace.
  - name: CLI Authorization
    description: Authorize the OpenPMM CLI through a browser sign-in.
  - name: Posts
    description: Create and manage posts.
  - name: Analytics
    description: Read and refresh current post analytics.
  - name: Assets
    description: Upload and manage media files.
  - name: Destinations
    description: Connect and manage social accounts.
  - name: Account
    description: Get account details and list available workspaces.
  - name: Billing
    description: Manage the account subscription and payment details.
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Feedback
    description: Send product feedback to OpenPMM.
  - name: Team
    description: Manage account members and invitations.
  - name: Slack Notifications
    description: Configure Slack notifications.
  - name: Webhooks
    description: Configure signed post status events.
paths:
  /workspaces/{workspace_id}/assets/{asset_id}:
    delete:
      tags:
        - Assets
      summary: Delete Asset
      description: Delete an asset. You cannot delete an asset that a draft or post uses.
      operationId: deleteAsset
      parameters:
        - name: workspace_id
          in: path
          required: true
          description: Unique workspace ID.
          schema:
            type: string
            example: ws_01JABCDEF
        - name: asset_id
          in: path
          required: true
          description: Unique asset ID.
          schema:
            type: string
            example: ast_01JABCDEF
        - $ref: '#/components/parameters/OpenPMMRequestId'
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: The deleted asset.
          headers:
            OpenPMM-Request-Id:
              $ref: '#/components/headers/OpenPMMRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    OpenPMMRequestId:
      name: OpenPMM-Request-Id
      in: header
      required: false
      description: >-
        Optional request ID. OpenPMM returns this value when it is valid.
        Otherwise, OpenPMM creates a request ID.
      schema:
        type: string
        maxLength: 128
      example: req_01JABCDEF
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        A unique key for this operation. Use the same key when you retry the
        same request. Different input with the same key returns `409`.
      schema:
        type: string
        minLength: 1
        maxLength: 200
      example: 01J4Z3Y6K2M8V7C1N5Q9R0T4XA
  headers:
    OpenPMMRequestId:
      description: Stable identifier for this request.
      schema:
        type: string
    WWWAuthenticate:
      description: Bearer authentication challenge.
      schema:
        type: string
      example: Bearer realm="openpmm"
    RetryAfter:
      description: Number of seconds to wait before you retry the request.
      schema:
        type: integer
        minimum: 1
  schemas:
    Asset:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          example: ast_01JABCDEF
          description: Unique asset ID.
        object:
          type: string
          const: asset
        type:
          type: string
          enum:
            - card
            - video
            - poster
          description: Generic asset type. `video` does not select a provider placement.
        label:
          type: string
          example: Launch artwork
        dimensions:
          type: string
          example: 1200x675
        width:
          anyOf:
            - type: integer
              minimum: 1
              example: 1200
            - type: 'null'
        height:
          anyOf:
            - type: integer
              minimum: 1
              example: 675
            - type: 'null'
        duration_sec:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
        format:
          anyOf:
            - type: string
              example: x-landscape
            - type: 'null'
        byte_size:
          anyOf:
            - type: integer
              minimum: 0
              example: 248312
            - type: 'null'
        content_type:
          anyOf:
            - type: string
              example: image/webp
            - type: 'null'
        status:
          type: string
          enum:
            - pending_upload
            - ready
        checksum:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                algorithm:
                  type: string
                  enum:
                    - md5
                    - crc32c
                    - crc64nvme
                value:
                  type: string
              required:
                - algorithm
                - value
            - type: 'null'
        inspected_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
        retention:
          type: object
          additionalProperties: false
          properties:
            policy:
              type: string
              const: workspace_managed
            reusable:
              type: boolean
              const: true
          required:
            - policy
            - reusable
        created_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
        download_url:
          type: string
          format: uri
          writeOnly: false
        download_url_expires_at:
          type: string
          format: date-time
          example: '2026-08-09T12:00:00.000Z'
      required:
        - id
        - object
        - type
        - label
        - dimensions
        - width
        - height
        - duration_sec
        - format
        - byte_size
        - content_type
        - status
        - checksum
        - inspected_at
        - retention
        - created_at
    Problem:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
          example: Request failed
        status:
          type: integer
          minimum: 400
          maximum: 599
        detail:
          type: string
        instance:
          type: string
          format: uri
        code:
          type: string
          example: public_invalid_request
        category:
          type: string
          enum:
            - authentication
            - authorization
            - billing
            - conflict
            - internal
            - not_found
            - provider
            - rate_limit
            - validation
        request_id:
          type: string
          example: req_01JABCDEF
        retryable:
          type: boolean
        retry:
          type: object
          additionalProperties: false
          properties:
            safety:
              type: string
              enum:
                - safe
                - not_retryable
            after:
              anyOf:
                - type: integer
                  minimum: 0
                - type: 'null'
          required:
            - safety
            - after
        user_action:
          type: string
          enum:
            - check_request
            - contact_support
            - inspect_resource
            - reauthorize
            - retry
            - wait
        reason:
          type: string
          enum:
            - velocity
            - backlog
            - account-paused
        retry_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
        provider_requests_started:
          type: boolean
          const: false
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ProblemError'
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - category
        - request_id
        - retryable
        - retry
        - user_action
        - errors
      description: RFC 9457 problem details with stable OpenPMM fields.
      example:
        type: https://www.openpmm.com/docs/reference/errors#public_invalid_request
        title: Invalid request
        status: 400
        detail: The request body does not match the public contract.
        instance: urn:openpmm:request:req_01JABCDEF
        code: public_invalid_request
        category: validation
        request_id: req_01JABCDEF
        retryable: false
        retry:
          safety: not_retryable
          after: null
        user_action: check_request
        errors:
          - pointer: /posts/0/destination_id
            code: custom
            detail: Publishing an entry requires a destination.
    ProblemError:
      type: object
      additionalProperties: false
      properties:
        pointer:
          type: string
          example: /posts/0/destination_id
          description: JSON Pointer to the invalid request member.
        post_id:
          type: string
          example: send_01JABCDEF
          description: Unique Post ID.
        code:
          type: string
          example: custom
        detail:
          type: string
          example: Publishing requires a destination.
        channel:
          type: string
          enum:
            - bluesky
            - facebook
            - instagram
            - threads
            - mastodon
            - x
            - linkedin
            - tiktok
            - youtube
          example: x
        destination_id:
          anyOf:
            - type: string
              example: dest_01JABCDEF
              description: Unique destination ID.
            - type: 'null'
        destination_label:
          type: string
        asset_id:
          anyOf:
            - type: string
              example: ast_01JABCDEF
              description: Unique asset ID.
            - type: 'null'
        property:
          type: string
        media_kind:
          type: string
          enum:
            - image
            - video
        actual:
          anyOf:
            - $ref: '#/components/schemas/MediaMeasure'
            - type: 'null'
        required:
          $ref: '#/components/schemas/MediaRequirementSummary'
        allowed_actions:
          type: array
          items:
            type: string
            enum:
              - replace_asset
              - remove_destination
              - retry
        retryable:
          type: boolean
      required:
        - code
        - detail
    MediaMeasure:
      oneOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: number
            value:
              type: number
            unit:
              type: string
          required:
            - kind
            - value
            - unit
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: text
            value:
              type: string
          required:
            - kind
            - value
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: boolean
            value:
              type: boolean
          required:
            - kind
            - value
    MediaRequirementSummary:
      oneOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: range
            min:
              anyOf:
                - type: number
                - type: 'null'
            max:
              anyOf:
                - type: number
                - type: 'null'
            unit:
              type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - min
            - max
            - unit
            - owner
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: allowed
            allowed:
              type: array
              items:
                type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - allowed
            - owner
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: expected
            expected:
              type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - expected
            - owner
  responses:
    Unauthenticated:
      description: Bearer authentication is missing or invalid.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
        WWW-Authenticate:
          $ref: '#/components/headers/WWWAuthenticate'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: The credential lacks the operation’s required scope.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: >-
        The resource does not exist, or the API credential cannot use its
        workspace.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Conflict:
      description: >-
        The request conflicts with the current state. This error also occurs
        when different input uses an existing idempotency key or when OpenPMM
        cannot determine the result of an earlier request.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            idempotency_outcome_unknown:
              summary: The result of an earlier request is unknown
              value:
                type: >-
                  https://www.openpmm.com/docs/reference/errors#public_idempotency_outcome_unknown
                title: Mutation outcome unknown
                status: 409
                detail: >-
                  The earlier request outcome is unknown. Inspect the affected
                  resource before you create new work.
                instance: urn:openpmm:request:req_01JABCDEF
                code: public_idempotency_outcome_unknown
                category: conflict
                request_id: req_01JABCDEF
                retryable: false
                retry:
                  safety: not_retryable
                  after: null
                user_action: inspect_resource
                errors: []
            post_group_channel_conflict:
              summary: The group already contains the requested channel
              value:
                type: >-
                  https://www.openpmm.com/docs/reference/errors#public_post_group_channel_conflict
                title: Request conflict
                status: 409
                detail: >-
                  This group already contains a draft Post for one or more
                  requested channels. Update or publish the existing draft
                  before you create another one.
                instance: urn:openpmm:request:req_01JABCDEF
                code: public_post_group_channel_conflict
                category: conflict
                request_id: req_01JABCDEF
                retryable: false
                retry:
                  safety: not_retryable
                  after: null
                user_action: check_request
                errors: []
    RateLimited:
      description: The request exceeded the rate limit.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
        text/html:
          schema:
            type: string
    InternalError:
      description: OpenPMM could not complete the request because of an internal error.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: OpenPMM API key
      description: 'Send an account API key in the `Authorization: Bearer <key>` header.'

````