Skip to main content
POST
/
files
/
{id}
/
versions
Add a new version to a file
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/files/{id}/versions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "storage_key": "<string>",
  "notes": "<string>",
  "set_as_current": true
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "version_number": 123,
    "notes": "<string>",
    "is_current_version": true,
    "created_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Path Parameters

id
string
required

Parent print file ID

Body

application/json
storage_key
string
required

Tenant-scoped storage key of the uploaded version file. Extension must match the parent file.

Minimum string length: 1
notes
string

Free-form release notes (max 500 chars).

Maximum string length: 500
set_as_current
boolean
default:true

If true (default), promote this version to current and repoint the parent file at it.

Response

Version added

success
enum<boolean>
required
Available options:
true
data
object
required