---
title: "Create agency upload"
method: POST
path: "/create_agency_upload"
---

# Create agency upload

`POST /create_agency_upload`

## Request

- Base URL: `https://api-integration-v2-qd6wo466iq-uc.a.run.app`
- URL: `https://api-integration-v2-qd6wo466iq-uc.a.run.app/create_agency_upload`
- Auth: HTTP bearer

Signs a 15-minute, size-limited upload form for an API integration with persistent agency storage. Call this from your server after checking which app member owns the file. POST multipart/form-data to uploadUrl with every uploadFields entry followed by the file field. Uploads are limited to 20 MiB. Pass resource as a sandboxFiles path when starting a completion.

## Request body

- object
  - `apiIntegrationId` string, required
  - `folder` string, required: Canonical folder below /app/mnt/, chosen by your server for the app member.
  - `filename` string, required: A nonblank filename without directory separators or control characters.
  - `contentType` string, required
  - `sizeBytes` integer, required: Number of file bytes to upload.

## Response `200`

Upload destination reserved.

- object
  - `resource` string, required: Persistent /app/mnt/ file path for sandboxFiles.
  - `uploadUrl` string, uri, required: Short-lived signed POST destination. Keep it on your server.
  - `uploadFields` object, required: Form fields to include unchanged before the file field.

## Other responses

- `400`: Invalid path or persistent storage is unavailable.
- `401`: Missing or invalid platform API key.
- `403`: The API key does not own this integration.
- `404`: Integration or agency not found.

## Changes

- **2026-11-03** `d9ab31b0307f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agency-swarm/apis/agencii-platform-api/changes/create_agency_upload/post.md)

---

[API](https://skmtc.dev/agency-swarm/apis/agencii-platform-api.md) - [All operations](https://skmtc.dev/agency-swarm/apis/agencii-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agency-swarm/apis/agencii-platform-api/revisions/d9ab31b0307f?raw)
