Presign service object upload
POSThttps://api.instacloud.com/projects/{projectId}/services/{serviceId}/objects/upload
Token scope: account · org · project — read-only tokens refused (not a GET).
Presign a short-lived upload straight to a storage service's bucket. Gated — storage.write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
branch | query | string | no | Branch name (defaults to the project's default branch) |
projectId | path | string | yes | |
serviceId | path | string | yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | full object key to write, overwriting any object already there |
contentType | string | yes | MIME type of the file; the policy pins it, so the upload must send the same one |
size | integer | yes | file size in bytes; over the cap is refused before anything is signed |
Responses
200
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | POST the multipart form here — straight to the provider, not through this API |
fields | object | yes | policy form fields; send them verbatim BEFORE the file part |
expiresAt | string | yes | 5 minutes out — an upload takes longer than a download click |
202
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
status | "approval_required" | no | |
approvalId | string | no | |
action | string | no | the gated action, or a comma-joined compound set — prefer `actions` |
actions | string[] | no | every capability this approval covers |
message | string | no | |
url | string | no | the console page where a project admin reviews this request |
nextActions | object[] | no | |
nextActions.op | string | yes | Neutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface. |
nextActions.reason | string | yes | Natural-language, human/LLM-facing "why do this now". |
nextActions.args | object | no | Suggested, flat named arguments; "<placeholder>"s where a value is unknown. |
nextActions.gated | boolean | no | True if the action passes a governance gate. |
400
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |