Skip to main content
POST
Attach a downloadable file

Authorizations

Authorization
string
header
required

Bearer credential for the public API: a live COPE API key (ck_live_*; keys issued earlier as cope_sk_live_* keep working). Dashboard sign-in tokens are not accepted.

Headers

Idempotency-Key
string

Optional. At most 255 characters of valid UTF-8 with no NUL byte. When sent, a retry that carries the same key and the same body returns the original response instead of performing the write a second time, and the same key with a different body is refused with 409 idempotency_conflict. Keys are remembered for 24 hours. A returned original response carries the header Idempotent-Replayed: true. Without the header the write is performed every time it is sent.

Maximum string length: 255

Path Parameters

product_id
string
required

product_id public identifier.

Pattern: ^prod_[A-Za-z0-9]{8,32}$
Example:

"prod_A1b2C3d4"

Body

application/json
upload_token
string
required

Token returned by the upload session, after the bytes have been uploaded.

access_pending
boolean

Grants buyers access to this file while their payment is still pending.

access_trial
boolean

Grants buyers access to this file during a trial period.

filename
string

Overrides the file name stored with the upload.

Response

Successful response

data
object
required