Files

Get a signed URL to upload a visual

POST/v2/accounts/{accountId}/files/uploadsTry it

Gives a time-limited URL a browser can send a visual to directly (uploadFileToSignedUrl), without your credentials: ask for it from your server, hand uploadUrl to the page, and the page PUTs the file there. PNG, JPEG or PDF, 25 MB at most. The URL is valid 15 minutes, for one file, on this account and in the key's mode. The file it yields is the one POST /v2/accounts/{accountId}/files would store.

Request

Authorization

Bearer token

Send your API key in the Authorization header: Authorization: Bearer sk_test_…. A sk_test_ key creates and sees test orders only. Keys and test mode.

Path parameters
  • accountIdstringrequired
    Unique identifier of the account, or the alias @me for the account authenticated by the token. An API key or an OAuth token acts on its own account only: another account's id is refused with 403 ACCOUNT_ACCESS_DENIED.
Body application/json
  • fileNamestringrequired
    Kept as the file's name (path parts removed)
  • contentTypestring: image/png, image/jpeg, application/pdfrequired

Responses

201The upload URL
400fileName or contentType missing (MISSING_PARAMETERS), or a type other than PNG, JPEG or PDF (UNSUPPORTED_FILE_TYPE)

Type: Error

401Unauthorized, authentication required, or an OAuth access token unknown, expired or revoked (INVALID_TOKEN)

Type: Error

403The API key is inactive or revoked (INACTIVE_API_KEY), or the path names another account (ACCOUNT_ACCESS_DENIED); with an OAuth access token: a token of scope mcp (INSUFFICIENT_SCOPE), a path naming another account or a person no longer a member of it (ACCOUNT_ACCESS_DENIED), a real token on the sandbox host (SANDBOX_REQUIRES_TEST_KEY)

Type: Error

500Internal server error

Type: Error

Request
curl -X POST "https://api.printags.com/v2/accounts/@me/files/uploads" \
  -H "Authorization: Bearer $PRINTAGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"recto.png","contentType":"image/png"}'
Response 201
{
  "success": true,
  "upload": {
    "uploadUrl": "https://api.printags.com/v2/uploads/eyJhIjoiN2IxZTJhNGMifQ.c2lnbmF0dXJl",
    "method": "PUT",
    "contentType": "image/png",
    "maxBytes": 26214400,
    "expiresAt": "2026-11-10T13:15:00.000Z"
  }
}