Skip to main content
GET
Retrieve an attachment

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_ Test keys use ark_test_ent_. Both are issued per entity via Settings > Developers > API Keys.

Path Parameters

id
string<uuid>
required

Response

Attachment

A file attached to a parent resource via parent_type + parent_id. The two-step upload flow (POST /attachments/upload-url then POST /attachments) persists bytes in S3 and the row in public.attachments. s3_bucket and s3_key are operator-internal; clients fetch the file by minting a fresh presigned URL via POST /attachments/{id}/download-url. Soft-delete clears deleted_at but does NOT delete the S3 object; an out-of-band sweeper sets s3_deleted_at once bytes are purged. Scope: attachments:read / attachments:write / attachments:delete.

id
string<uuid>
read-only
object
string
Example:

"attachment"

entity_id
string<uuid>
read-only
parent_type
string

Parent resource family (order, account, ap_bill, etc.). 1..30 chars.

parent_id
string<uuid>
filename
string

Operator-supplied file name. 1..255 chars.

mime_type
string

Content type at upload time. 1..100 chars.

size_bytes
integer<int64>

File size at upload time in bytes.

s3_bucket
string
read-only

Operator-internal; clients should never need this.

s3_key
string
read-only

Operator-internal; clients should never need this.

s3_etag
string | null
read-only
checksum_sha256
string | null
read-only

SHA-256 of the bytes if supplied at upload time.

uploaded_by_user_id
string<uuid> | null
read-only
uploaded_via
enum<string>
default:web

Origin of the upload. Set automatically; not caller-writable.

Available options:
web,
api,
portal,
migration
is_public
boolean
default:false

If true, exposes via tokenized portal URL.

expires_at
string<date-time> | null

Optional auto-expiry; the sweeper soft-deletes past this date.

external_source
string | null

Migration provenance (versa, bubble).

external_id
string | null
metadata
object

Free-form caller metadata. Default {}.

deleted_at
string<date-time> | null
read-only
s3_deleted_at
string<date-time> | null
read-only

Set once the sweeper purges S3 bytes.

created_at
string<date-time>
read-only