http
POST /projects/{project_reference}/uploadsCreate a pending upload at a project path and return the signed URL and headers for the PUT request that sends the bytes. Requires project.uploads.write.
Servers
JSON
1[2 {3 "url": "https://api.veryfront.com"4 }5]Authentication
JSON
1[2 {3 "bearerAuth": []4 },5 {6 "apiKeyAuth": []7 }8]JSON
1{2 "bearerAuth": {3 "type": "http",4 "scheme": "bearer",5 "bearerFormat": "JWT or API Key",6 "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."7 },8 "apiKeyAuth": {9 "type": "apiKey",10 "in": "header",11 "name": "X-API-Key",12 "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."13 }14}Parameters
| Name | Location | Required | Description |
|---|---|---|---|
| project_reference | path | Yes | Project slug, UUID, or domain that identifies the project. |
Parameter contracts
JSON
1[2 {3 "schema": {4 "$ref": "#/components/schemas/ProjectReference"5 },6 "required": true,7 "description": "Project slug, UUID, or domain that identifies the project.",8 "name": "project_reference",9 "in": "path"10 }11]Request body
JSON
1{2 "content": {3 "application/json": {4 "schema": {5 "type": "object",6 "properties": {7 "path": {8 "type": "string",9 "description": "Project-relative path where the upload is stored."10 },11 "file_path": {12 "type": "string",13 "description": "Another spelling of path. Send one of the two."14 },15 "content_type": {16 "type": "string",17 "description": "MIME type of the file"18 },19 "size_bytes": {20 "type": "integer",21 "exclusiveMinimum": 0,22 "maximum": 9007199254740991,23 "description": "File size in bytes (required for quota tracking)."24 },25 "size": {26 "type": "integer",27 "exclusiveMinimum": 0,28 "maximum": 9007199254740991,29 "description": "Another spelling of size_bytes. Send one of the two."30 }31 }32 }33 }34 }35}Responses
201
Signed upload URL created.
JSON
1{2 "description": "Signed upload URL created.",3 "content": {4 "application/json": {5 "schema": {6 "type": "object",7 "properties": {8 "upload_url": {9 "type": "string",10 "description": "Temporary cloud-storage URL for the upload PUT request."11 },12 "path": {13 "type": "string",14 "description": "Project-relative path of the upload."15 },16 "status": {17 "type": "string",18 "enum": [19 "pending"20 ],21 "description": "Always pending until the bytes are stored."22 },23 "file_upload_url": {24 "type": "string",25 "description": "The same URL as upload_url."26 },27 "file_path": {28 "type": "string",29 "description": "Legacy upload reference with the project ID prefix."30 },31 "upload_id": {32 "type": "string",33 "description": "UUID of the pending upload record."34 },35 "required_headers": {36 "type": "object",37 "additionalProperties": {38 "type": "string"39 },40 "description": "Headers that must be included in the PUT request to the upload URL",41 "example": {42 "Content-Type": "image/png",43 "x-goog-content-length-range": "0,1048576"44 }45 }46 },47 "required": [48 "upload_url",49 "path",50 "status",51 "file_upload_url",52 "file_path",53 "upload_id",54 "required_headers"55 ]56 }57 }58 }59}400
Bad request
JSON
1{2 "description": "Bad request",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}401
Unauthorized
JSON
1{2 "description": "Unauthorized",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}402
Payment required
JSON
1{2 "description": "Payment required",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/QuotaProblem"7 }8 }9 }10}403
Forbidden
JSON
1{2 "description": "Forbidden",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}404
Not found
JSON
1{2 "description": "Not found",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}409
An upload was created at the same path concurrently
JSON
1{2 "description": "An upload was created at the same path concurrently",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}500
Server error
JSON
1{2 "description": "Server error",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}Referenced contracts
components/parameters/ProjectReference
JSON
1{2 "schema": {3 "$ref": "#/components/schemas/ProjectReference"4 },5 "required": true,6 "description": "Project slug, UUID, or domain that identifies the project.",7 "name": "project_reference",8 "in": "path"9}components/schemas/ProjectReference
JSON
1{2 "type": "string"3}components/schemas/Problem
JSON
1{2 "type": "object",3 "properties": {4 "cause": {5 "type": "string",6 "enum": [7 "schedule_concurrency_forbidden",8 "schedule_fire_in_progress",9 "schedule_run_limit_reached"10 ],11 "description": "Schedule admission refusal."12 },13 "idempotency": {14 "type": "object",15 "properties": {16 "state": {17 "type": "string",18 "enum": [19 "in_progress",20 "payload_mismatch",21 "outcome_unknown"22 ]23 },24 "operation": {25 "type": "string",26 "minLength": 127 },28 "retryable": {29 "type": "boolean"30 },31 "retry_after_seconds": {32 "type": [33 "integer",34 "null"35 ],36 "minimum": 037 },38 "expires_at": {39 "type": [40 "string",41 "null"42 ]43 },44 "recovery": {45 "type": "object",46 "properties": {47 "available": {48 "type": "boolean"49 },50 "description": {51 "type": "string"52 },53 "resource_url": {54 "type": "string"55 }56 },57 "required": [58 "available",59 "description"60 ]61 }62 },63 "required": [64 "state",65 "operation",66 "retryable",67 "retry_after_seconds",68 "expires_at"69 ],70 "description": "Replay status, retry timing, and recovery lookup."71 },72 "type": {73 "type": "string",74 "description": "URI reference identifying the problem type",75 "example": "https://api.veryfront.com/errors/validation-failed"76 },77 "title": {78 "type": "string",79 "description": "Short human-readable summary of the problem",80 "example": "Validation Failed"81 },82 "status": {83 "type": "integer",84 "minimum": 100,85 "maximum": 599,86 "description": "HTTP status code",87 "example": 40088 },89 "code": {90 "type": "string",91 "description": "Stable machine-readable error code",92 "example": "RUN_INVALID_INPUT"93 },94 "detail": {95 "type": "string",96 "description": "Human-readable explanation specific to this occurrence",97 "example": "The 'email' field must be a valid email address"98 },99 "instance": {100 "type": "string",101 "description": "URI reference identifying the specific occurrence",102 "example": "/projects/my-project/members"103 },104 "slug": {105 "type": "string",106 "description": "Stable identifier for the problem type",107 "example": "validation-failed"108 },109 "category": {110 "type": "string",111 "enum": [112 "AUTH",113 "RESOURCE",114 "VALIDATION",115 "DATABASE",116 "SUBSCRIPTION",117 "INTEGRATION",118 "INTERNAL"119 ],120 "description": "API error category",121 "example": "VALIDATION"122 },123 "suggestion": {124 "type": "string",125 "description": "Suggested action to resolve the problem",126 "example": "Check the request body and query parameters against the API documentation."127 },128 "errors": {129 "type": "array",130 "items": {131 "type": "object",132 "properties": {133 "field": {134 "type": "string",135 "description": "Field path that caused the error",136 "example": "email"137 },138 "message": {139 "type": "string",140 "description": "Error message for this field",141 "example": "Invalid email format"142 },143 "code": {144 "type": "string",145 "description": "Error code for this field",146 "example": "INVALID_FORMAT"147 }148 },149 "required": [150 "field",151 "message"152 ]153 },154 "description": "Detailed field-level errors for validation failures"155 }156 },157 "required": [158 "type",159 "title",160 "status"161 ]162}components/schemas/QuotaProblem
JSON
1{2 "allOf": [3 {4 "$ref": "#/components/schemas/Problem"5 },6 {7 "type": "object",8 "properties": {9 "used": {10 "type": "number",11 "description": "Current resource usage in the unit defined by the operation"12 },13 "limit": {14 "type": "number",15 "description": "Configured resource limit in the unit defined by the operation"16 },17 "requested": {18 "type": "number",19 "description": "Additional resource amount requested by the operation"20 }21 },22 "required": [23 "used",24 "limit",25 "requested"26 ]27 }28 ]29}Operation contract
JSON
1{2 "operationId": "createUpload",3 "tags": [4 "projects/Uploads/Project Uploads"5 ],6 "summary": "Create upload",7 "description": "Create a pending upload at a project path and return the signed URL and headers for the PUT request that sends the bytes. Requires project.uploads.write.",8 "parameters": [9 {10 "$ref": "#/components/parameters/ProjectReference"11 }12 ],13 "requestBody": {14 "content": {15 "application/json": {16 "schema": {17 "type": "object",18 "properties": {19 "path": {20 "type": "string",21 "description": "Project-relative path where the upload is stored."22 },23 "file_path": {24 "type": "string",25 "description": "Another spelling of path. Send one of the two."26 },27 "content_type": {28 "type": "string",29 "description": "MIME type of the file"30 },31 "size_bytes": {32 "type": "integer",33 "exclusiveMinimum": 0,34 "maximum": 9007199254740991,35 "description": "File size in bytes (required for quota tracking)."36 },37 "size": {38 "type": "integer",39 "exclusiveMinimum": 0,40 "maximum": 9007199254740991,41 "description": "Another spelling of size_bytes. Send one of the two."42 }43 }44 }45 }46 }47 },48 "responses": {49 "201": {50 "description": "Signed upload URL created.",51 "content": {52 "application/json": {53 "schema": {54 "type": "object",55 "properties": {56 "upload_url": {57 "type": "string",58 "description": "Temporary cloud-storage URL for the upload PUT request."59 },60 "path": {61 "type": "string",62 "description": "Project-relative path of the upload."63 },64 "status": {65 "type": "string",66 "enum": [67 "pending"68 ],69 "description": "Always pending until the bytes are stored."70 },71 "file_upload_url": {72 "type": "string",73 "description": "The same URL as upload_url."74 },75 "file_path": {76 "type": "string",77 "description": "Legacy upload reference with the project ID prefix."78 },79 "upload_id": {80 "type": "string",81 "description": "UUID of the pending upload record."82 },83 "required_headers": {84 "type": "object",85 "additionalProperties": {86 "type": "string"87 },88 "description": "Headers that must be included in the PUT request to the upload URL",89 "example": {90 "Content-Type": "image/png",91 "x-goog-content-length-range": "0,1048576"92 }93 }94 },95 "required": [96 "upload_url",97 "path",98 "status",99 "file_upload_url",100 "file_path",101 "upload_id",102 "required_headers"103 ]104 }105 }106 }107 },108 "400": {109 "description": "Bad request",110 "content": {111 "application/problem+json": {112 "schema": {113 "$ref": "#/components/schemas/Problem"114 }115 }116 }117 },118 "401": {119 "description": "Unauthorized",120 "content": {121 "application/problem+json": {122 "schema": {123 "$ref": "#/components/schemas/Problem"124 }125 }126 }127 },128 "402": {129 "description": "Payment required",130 "content": {131 "application/problem+json": {132 "schema": {133 "$ref": "#/components/schemas/QuotaProblem"134 }135 }136 }137 },138 "403": {139 "description": "Forbidden",140 "content": {141 "application/problem+json": {142 "schema": {143 "$ref": "#/components/schemas/Problem"144 }145 }146 }147 },148 "404": {149 "description": "Not found",150 "content": {151 "application/problem+json": {152 "schema": {153 "$ref": "#/components/schemas/Problem"154 }155 }156 }157 },158 "409": {159 "description": "An upload was created at the same path concurrently",160 "content": {161 "application/problem+json": {162 "schema": {163 "$ref": "#/components/schemas/Problem"164 }165 }166 }167 },168 "500": {169 "description": "Server error",170 "content": {171 "application/problem+json": {172 "schema": {173 "$ref": "#/components/schemas/Problem"174 }175 }176 }177 }178 },179 "x-documentation-source-tag": "Project Uploads",180 "x-canonical-documentation": {181 "domain": "projects",182 "resource": "Uploads",183 "subgroup": "Project Uploads",184 "name": "Create upload",185 "description": "Create a pending upload at a project path and return the signed URL and headers for the PUT request that sends the bytes. Requires project.uploads.write.",186 "operationId": "createUpload"187 },188 "x-mint": {189 "href": "/cloud/rest/api-reference/projects-uploads-project-uploads/create-upload"190 }191}