---
title: "Get a signed URL to upload a visual"
description: "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 `PUT`s…"
canonical: "https://docs.printags.com/get-a-signed-url-to-upload-a-visual/"
last_updated: "2026-11-16"
---

# Get a signed URL to upload a visual

`POST /v2/accounts/{accountId}/files/uploads`

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 `PUT`s 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.

## Authentication

An API key as a Bearer token: `Authorization: Bearer <key>`. A `sk_test_` key creates and sees test orders only. Keys and test mode: [overview](/).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `accountId` | path | string | yes | 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`. |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fileName` | string | yes | Kept as the file's name (path parts removed) |
| `contentType` | string: `image/png`, `image/jpeg`, `application/pdf` | yes |  |

```json
{
  "fileName": "recto.png",
  "contentType": "image/png"
}
```

## Responses

| Status | Description |
| --- | --- |
| 201 | The upload URL |
| 400 | `fileName` or `contentType` missing (`MISSING_PARAMETERS`), or a type other than PNG, JPEG or PDF (`UNSUPPORTED_FILE_TYPE`) |
| 401 | Unauthorized, authentication required, or an OAuth access token unknown, expired or revoked (`INVALID_TOKEN`) |
| 403 | The 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`) |
| 500 | Internal server error |

### 201 response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | no |  |
| `upload` | [FileUpload](/schemas/fileupload/) | no |  |

```json
{
  "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"
  }
}
```

## Example

```bash
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"}'
```
