Skip to main content
POST
Publish file as artifact

Restrictions

Usage

  • Any account member who can see the file may publish it. Republishing a file whose path already has a live artifact replaces that artifact and requires can_edit on it.
  • Allowed file types: HTML/Markdown, images, PDF, text/data/code files, and zip/tar archives, matched by extension. Other types, files over 16 MiB, and files no longer retrievable (runner offline or file expired) fail with InvalidParameter.
  • Publishing is an upsert keyed by the source session and workspace path: republishing replaces the title and bytes under a fresh file_id and keeps the artifact_id, which makes an existing public snapshot stale until synced. Republishing a removed artifact restores it with the same artifact_id, with sharing off.
  • A new artifact takes its creator and personal/team scope from the source session (its owner and team); move it afterwards with /safari/artifact/gallery/update if needed.
  • Every call is recorded in the account audit log.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Publish a session-produced file to the artifact gallery.

file_id
string
required

Presented-file ID (pf_ prefix) of a file produced in a session, as shown on the file card in chat.

title
string
required

Gallery display title. Trimmed; must be non-empty.

Response

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

Result of publishing a file to the gallery.