Printago API

Uploading Files

Model files never travel through the API itself. You ask for a short-lived signed URL, upload the bytes straight to storage, then create the part from the uploaded path.

1. Request Signed Upload URLs

Call POST /v1/storage/signed-upload-urls with the names of the files you are about to upload (one URL per file, several at once if you like). The key needs the part.create permission.

Request
POST /v1/storage/signed-upload-urls
authorization: ApiKey YOUR_API_KEY
x-printago-storeid: YOUR_STORE_ID
content-type: application/json

{
  "filenames": [
    "benchy.stl"
  ]
}
Response — 201
{
  "signedUrls": [
    {
      "path": "uploads:YOUR_STORE_ID/clx1abc2def3ghi4jkl5mno6/benchy.stl",
      "uploadUrl": "https://storage.googleapis.com/…/benchy.stl?X-Goog-Algorithm=GOOG4-RSA-SHA256&…",
      "method": "PUT"
    }
  ]
}

Each entry gives you an uploadUrl to send the file to, the HTTP method to use (always PUT against Printago's cloud), and a path — keep it, you need it in step 3. Upload URLs expire after 5 minutes, so request them right before uploading.

2. Upload the File

Send the raw file bytes to uploadUrl with the returned method. The URL carries its own signature: do not send your Printago authorization or x-printago-storeid headers to it. Any Content-Type is accepted.

curl
curl -X PUT --upload-file benchy.stl \
  -H "Content-Type: application/octet-stream" \
  "$UPLOAD_URL"

A 200 means the file is stored. Uploading again to the same URL (while it is still valid) just replaces the file.

3. Create the Part

Pass the path from step 1 in fileUris when you call POST /v1/parts. Printago moves the file out of the temporary upload area into your store's permanent storage as part of creating the part.

Request
POST /v1/parts
authorization: ApiKey YOUR_API_KEY
x-printago-storeid: YOUR_STORE_ID
content-type: application/json

{
  "name": "Benchy",
  "type": "stl",
  "description": "",
  "fileUris": [
    "uploads:YOUR_STORE_ID/clx1abc2def3ghi4jkl5mno6/benchy.stl"
  ],
  "parameters": [],
  "printTags": {},
  "overriddenProcessProfileId": null
}

type must match the file: stl, 3mf, step, gcode, gcode3mf, scad, cadquery or build123d. By default the call waits until the file has been processed (metadata, plates, thumbnails) and returns a ready part; add ?async=true to return straight away and poll the part until its processingStatus clears.

Tips

  • For a 3MF, POST /v1/parts/extract-3mf-metadata reads plates and materials from an uploaded uploads: path without creating a part.
  • The uploads: path is only for creating a part. To download a stored file later, request a signed download URL with POST /v1/storage/signed-urls.
  • Getting signed URLs and re-uploading are safe to retry; creating the part is not — see Retry Safely.