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

# Edit an asset, or review what was proposed

> Also its rights (replaced whole), provenance (`origin`, `parentAssetId`, `generator`, `prompt`), and `supersededBy`: the asset that replaces it, which /api/v1/check then names. `status` moves it through its lifecycle: draft, proposed (in review), active (approved), archived, rejected. Submitting or reworking a draft takes write; any other move takes write with the approve ability.

Scope: `write`.



## OpenAPI

````yaml /openapi.json patch /api/v1/assets/{id}
openapi: 3.1.0
info:
  title: artbucket
  version: '1'
  description: >-
    Agent-first asset management. The web UI is built on this API and nothing
    else, beside signing in at /api/auth. Send `Authorization: Bearer <key>`: a
    key works in one workspace with one scope, and scopes are a ladder: read <
    propose < write < admin. People signed in to the app carry a session cookie
    instead, and their scope is what their grants add up to: on the
    organization, the workspace, or single collections and assets. A scope shown
    as needed on the workspace is also enough on the one collection or asset a
    route acts on. Agents (MCP at POST /api/v1/mcp) usually get `propose`: what
    they add waits for a human.
servers:
  - url: http://localhost:3000
security:
  - bearer: []
  - session: []
  - {}
paths:
  /api/v1/assets/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Asset id
        schema:
          type: string
    patch:
      summary: Edit an asset, or review what was proposed
      description: >-
        Also its rights (replaced whole), provenance (`origin`, `parentAssetId`,
        `generator`, `prompt`), and `supersededBy`: the asset that replaces it,
        which /api/v1/check then names. `status` moves it through its lifecycle:
        draft, proposed (in review), active (approved), archived, rejected.
        Submitting or reworking a draft takes write; any other move takes write
        with the approve ability.


        Scope: `write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tags:
                  description: Replaces the whole set
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    maxLength: 64
                fields:
                  description: Merges; null clears one unless it is required
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                title:
                  anyOf:
                    - type: string
                      maxLength: 2000
                    - type: 'null'
                description:
                  anyOf:
                    - type: string
                      maxLength: 2000
                    - type: 'null'
                creator:
                  anyOf:
                    - type: string
                      maxLength: 2000
                    - type: 'null'
                copyright:
                  anyOf:
                    - type: string
                      maxLength: 2000
                    - type: 'null'
                status:
                  description: >-
                    "proposed" submits a draft for review; "active" approves it;
                    "rejected" turns it down and keeps it, with `reviewNote`;
                    "archived" retires it, and /a/{id} answers 410. Anything but
                    submitting or reworking a draft takes approve
                  type: string
                  enum:
                    - draft
                    - proposed
                    - active
                    - archived
                    - rejected
                reviewNote:
                  description: Why it was rejected, for whoever proposed it
                  anyOf:
                    - type: string
                      maxLength: 2000
                    - type: 'null'
                proposedTags:
                  description: Replaces the pending suggestions; [] dismisses them all
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    maxLength: 64
                rights:
                  description: Replaces them whole; null clears
                  anyOf:
                    - type: object
                      properties:
                        license:
                          description: >-
                            e.g. "Royalty-free", "CC BY 4.0", "Getty,
                            rights-managed"
                          anyOf:
                            - type: string
                              maxLength: 200
                            - type: 'null'
                        territories:
                          description: >-
                            Countries it may run in (ISO 3166-1 alpha-2); empty:
                            anywhere
                          maxItems: 250
                          type: array
                          items:
                            type: string
                            pattern: ^[A-Z]{2}$
                        channels:
                          description: >-
                            What it may be used for, e.g. web, print,
                            paid-social; empty: anything
                          maxItems: 50
                          type: array
                          items:
                            type: string
                            pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
                        embargo:
                          description: Not to be used before this day
                          anyOf:
                            - type: string
                              format: date
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                            - type: 'null'
                        expires:
                          anyOf:
                            - type: string
                              format: date
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                            - type: 'null'
                          description: The last day it may be used
                        modelRelease:
                          anyOf:
                            - type: string
                              enum:
                                - released
                                - missing
                                - not-needed
                            - type: 'null'
                      additionalProperties: false
                    - type: 'null'
                origin:
                  description: Defaults to what its Content Credentials say, if any
                  anyOf:
                    - type: string
                      enum:
                        - shot
                        - licensed
                        - generated
                    - type: 'null'
                parentAssetId:
                  description: >-
                    The asset it was made from: the photo an edit started from,
                    a model's input
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    - type: 'null'
                generator:
                  description: The tool or model that made it, e.g. "gpt-image 2.0"
                  anyOf:
                    - type: string
                      maxLength: 200
                    - type: 'null'
                prompt:
                  description: 'For a generated asset: what it was asked for'
                  anyOf:
                    - type: string
                      maxLength: 10000
                    - type: 'null'
                supersededBy:
                  description: >-
                    The asset that replaces this one; /api/v1/check then refuses
                    it and names that
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    - type: 'null'
                private:
                  description: >-
                    Only people with a grant on it, or on a collection it is in,
                    and admins see it
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          description: The updated asset
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      workspaceId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      sha256:
                        type: string
                      filename:
                        type: string
                      mime:
                        type: string
                      size:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      width:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                      height:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                      probe:
                        anyOf:
                          - type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          - type: 'null'
                      metadata:
                        anyOf:
                          - type: object
                            properties:
                              title:
                                type: string
                              description:
                                type: string
                              keywords:
                                type: array
                                items:
                                  type: string
                              creator:
                                type: string
                              copyright:
                                type: string
                              capturedAt:
                                type: string
                              camera:
                                type: string
                              lens:
                                type: string
                              gps:
                                type: object
                                properties:
                                  lat:
                                    type: number
                                  lon:
                                    type: number
                                required:
                                  - lat
                                  - lon
                                additionalProperties: false
                            additionalProperties: false
                          - type: 'null'
                      tags:
                        type: array
                        items:
                          type: string
                      fields:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type:
                            - string
                            - number
                            - boolean
                        description: The asset's own values
                      inherited:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type:
                            - string
                            - number
                            - boolean
                        description: Values inherited from its collections; own values win
                      status:
                        type: string
                        enum:
                          - draft
                          - proposed
                          - active
                          - archived
                          - rejected
                        description: >-
                          draft, proposed (in review), active (approved),
                          archived or rejected
                      state:
                        type: string
                        enum:
                          - draft
                          - proposed
                          - active
                          - expired
                          - archived
                          - rejected
                          - deleted
                        description: >-
                          The status; expired for an approved asset past its
                          last day of use; deleted, until restored or purged
                      deletedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                          - type: 'null'
                        description: >-
                          When it was deleted: restorable for 30 days, then
                          purged
                      stackId:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                        description: >-
                          Versions of one thing share a stack; null when it has
                          one version
                      version:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                        description: Its number in the stack
                      current:
                        type: boolean
                        description: >-
                          Its stack's current approved version: the others are
                          superseded by it
                      proposedBy:
                        description: >-
                          For a proposal: who made it, a person's or an API
                          key's name
                        type:
                          - string
                          - 'null'
                      reviewNote:
                        description: Why a person rejected it
                        type:
                          - string
                          - 'null'
                      proposedTags:
                        type: array
                        items:
                          type: string
                      rights:
                        anyOf:
                          - type: object
                            properties:
                              license:
                                type:
                                  - string
                                  - 'null'
                              territories:
                                type: array
                                items:
                                  type: string
                                description: 'ISO 3166-1 alpha-2; empty: anywhere'
                              channels:
                                type: array
                                items:
                                  type: string
                                description: 'empty: any use'
                              embargo:
                                anyOf:
                                  - type: string
                                    format: date
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                  - type: 'null'
                                description: Not before this day
                              expires:
                                anyOf:
                                  - type: string
                                    format: date
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                  - type: 'null'
                                description: The last day it may be used
                              modelRelease:
                                anyOf:
                                  - type: string
                                    enum:
                                      - released
                                      - missing
                                      - not-needed
                                  - type: 'null'
                            required:
                              - license
                              - territories
                              - channels
                              - embargo
                              - expires
                              - modelRelease
                            additionalProperties: false
                          - type: 'null'
                      origin:
                        anyOf:
                          - type: string
                            enum:
                              - shot
                              - licensed
                              - generated
                          - type: 'null'
                      parentAssetId:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      generator:
                        type:
                          - string
                          - 'null'
                      prompt:
                        type:
                          - string
                          - 'null'
                      c2pa:
                        anyOf:
                          - type: object
                            properties:
                              manifests:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              generator:
                                description: The app that signed it
                                type:
                                  - string
                                  - 'null'
                              title:
                                type:
                                  - string
                                  - 'null'
                              signedBy:
                                description: >-
                                  The signing certificate's organization, as the
                                  file claims it; not verified
                                type:
                                  - string
                                  - 'null'
                              actions:
                                type: array
                                items:
                                  type: string
                              digitalSourceType:
                                description: >-
                                  IPTC: digitalCapture,
                                  trainedAlgorithmicMedia...
                                type:
                                  - string
                                  - 'null'
                              softwareAgent:
                                description: The tool the actions name, often the model
                                type:
                                  - string
                                  - 'null'
                              ingredients:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                            required:
                              - manifests
                              - generator
                              - title
                              - signedBy
                              - actions
                              - digitalSourceType
                              - softwareAgent
                              - ingredients
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          Content Credentials read from the file; the original
                          keeps the signed manifest
                      supersededBy:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                        description: The asset that replaces this one
                      private:
                        type: boolean
                        description: >-
                          Its own flag; it is private too when every collection
                          it is in is
                      collections:
                        type: array
                        items:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      createdAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                      updatedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    required:
                      - id
                      - workspaceId
                      - sha256
                      - filename
                      - mime
                      - size
                      - width
                      - height
                      - probe
                      - metadata
                      - tags
                      - fields
                      - inherited
                      - status
                      - state
                      - deletedAt
                      - stackId
                      - version
                      - current
                      - proposedBy
                      - reviewNote
                      - proposedTags
                      - rights
                      - origin
                      - parentAssetId
                      - generator
                      - prompt
                      - c2pa
                      - supersededBy
                      - private
                      - collections
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        default:
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'An API key: ab_...'
    session:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Signed in, at /api/auth

````