http
POST /projects/{project_reference}/external-files/{provider}/{file_id}/importImport external file.
Servers
JSON
[ { "url": "https://api.veryfront.com" }]Authentication
JSON
[ { "bearerAuth": [] }, { "apiKeyAuth": [] }]JSON
{ "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT or API Key", "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header." }, "apiKeyAuth": { "type": "apiKey", "in": "header", "name": "X-API-Key", "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens." }}Parameters
Parameter contracts
JSON
[ { "schema": { "$ref": "#/components/schemas/ProjectReference" }, "required": true, "description": "Project slug, UUID, or domain that identifies the project.", "name": "project_reference", "in": "path" }, { "schema": { "type": "string", "enum": [ "onedrive", "sharepoint", "drive" ], "description": "External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)." }, "required": true, "name": "provider", "in": "path" }, { "schema": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found." }, "required": true, "name": "file_id", "in": "path" }, { "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^\\S+$", "description": "Key of 1-128 characters without whitespace. A retry with the same key and request within 24 hours returns the first result instead of creating another item; the same key with a different request returns 409 conflict." }, "required": false, "name": "idempotency-key", "in": "header" }]Request body
JSON
{ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportExternalFileRequest" } } }}Responses
200
The created upload and its source.
JSON
{ "description": "The created upload and its source.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalFileImport" } } }}400
Bad request
JSON
{ "description": "Bad request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}401
Unauthorized
JSON
{ "description": "Unauthorized", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}402
Payment required
JSON
{ "description": "Payment required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}403
Forbidden
JSON
{ "description": "Forbidden", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}404
Not found
JSON
{ "description": "Not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}409
Conflict
JSON
{ "description": "Conflict", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}413
Payload too large
JSON
{ "description": "Payload too large", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}428
Precondition required
JSON
{ "description": "Precondition required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}429
Rate limit exceeded
JSON
{ "description": "Rate limit exceeded", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}500
Server error
JSON
{ "description": "Server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}503
Service unavailable
JSON
{ "description": "Service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } }}Referenced contracts
components/parameters/ProjectReference
JSON
{ "schema": { "$ref": "#/components/schemas/ProjectReference" }, "required": true, "description": "Project slug, UUID, or domain that identifies the project.", "name": "project_reference", "in": "path"}components/schemas/ProjectReference
JSON
{ "type": "string"}components/schemas/ImportExternalFileRequest
JSON
{ "type": "object", "properties": { "folder_path": { "type": "string", "minLength": 1, "description": "Destination folder inside project Uploads, relative (no leading `/`). The Uploads root when omitted." }, "timestamp_prefix": { "type": "boolean", "description": "Prefix the stored name with a timestamp to avoid a name conflict. Defaults to false." }, "visibility": { "type": "string", "enum": [ "project", "public", "private" ], "description": "Visibility of the new upload: `project`, `public` or `private`. Omitted, the upload inherits the destination's visibility. Setting it needs upload admin access on the destination, and `public` a paid plan; a refusal imports nothing." } }}components/schemas/ExternalFileImport
JSON
{ "type": "object", "properties": { "upload": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Upload ID." }, "project_id": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Project that owns the upload." }, "path": { "type": "string", "description": "Upload path inside the project Uploads." }, "name": { "type": "string", "description": "Stored provider file name. Google Docs and Slides export as PDF; Sheets export as XLSX, retaining the exported extension." }, "mime_type": { "type": "string", "minLength": 1, "description": "Stored content type." }, "size_bytes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Stored size in bytes." }, "visibility": { "type": "string", "enum": [ "project", "public", "private" ], "description": "Effective visibility of the upload: the explicit visibility sent with the import, else inherited from the destination path." } }, "required": [ "id", "project_id", "path", "name", "mime_type", "size_bytes", "visibility" ] }, "source": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "onedrive", "sharepoint", "drive" ] }, "file_id": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Provider item ID that was imported." } }, "required": [ "provider", "file_id" ] } }, "required": [ "upload", "source" ]}components/schemas/ExternalFileProblem
JSON
{ "allOf": [ { "$ref": "#/components/schemas/Problem" }, { "type": "object", "properties": { "code": { "type": "string", "enum": [ "invalid_input", "unauthenticated", "not_found", "forbidden", "conflict", "limit_exceeded", "not_ready", "internal" ], "description": "Stable error code." }, "reason": { "type": "string", "enum": [ "provider_connection_required", "personal_connection_required", "provider_unavailable", "provider_rate_limited", "file_too_large", "content_too_large", "storage_quota_exceeded" ], "description": "Why the error happened, where a code has more than one cause." }, "provider": { "type": "string", "enum": [ "onedrive", "sharepoint", "drive" ], "description": "Provider of the request." }, "connect_url": { "type": "string", "format": "uri", "description": "With not_ready: URL that starts connecting your own provider account. A hint, not a redirect." }, "retry_after_seconds": { "type": "integer", "minimum": 0, "description": "Seconds to wait before retrying." }, "size_bytes": { "type": "integer", "minimum": 0, "description": "Size of the file that hit a limit." }, "limit_bytes": { "type": "integer", "minimum": 0, "description": "Byte limit that was exceeded." }, "limit_chars": { "type": "integer", "minimum": 0, "description": "Character limit that was exceeded." } }, "required": [ "code" ] } ]}components/schemas/Problem
JSON
{ "type": "object", "properties": { "cause": { "type": "string", "enum": [ "schedule_concurrency_forbidden", "schedule_fire_in_progress", "schedule_run_limit_reached" ], "description": "Schedule admission refusal." }, "idempotency": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "in_progress", "payload_mismatch", "outcome_unknown" ] }, "operation": { "type": "string", "minLength": 1 }, "retryable": { "type": "boolean" }, "retry_after_seconds": { "type": [ "integer", "null" ], "minimum": 0 }, "expires_at": { "type": [ "string", "null" ] }, "recovery": { "type": "object", "properties": { "available": { "type": "boolean" }, "description": { "type": "string" }, "resource_url": { "type": "string" } }, "required": [ "available", "description" ] } }, "required": [ "state", "operation", "retryable", "retry_after_seconds", "expires_at" ], "description": "Replay status, retry timing, and recovery lookup." }, "type": { "type": "string", "description": "URI reference identifying the problem type", "example": "https://api.veryfront.com/errors/validation-failed" }, "title": { "type": "string", "description": "Short human-readable summary of the problem", "example": "Validation Failed" }, "status": { "type": "integer", "minimum": 100, "maximum": 599, "description": "HTTP status code", "example": 400 }, "code": { "type": "string", "description": "Stable machine-readable error code", "example": "RUN_INVALID_INPUT" }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence", "example": "The 'email' field must be a valid email address" }, "instance": { "type": "string", "description": "URI reference identifying the specific occurrence", "example": "/projects/my-project/members" }, "slug": { "type": "string", "description": "Stable identifier for the problem type", "example": "validation-failed" }, "category": { "type": "string", "enum": [ "AUTH", "RESOURCE", "VALIDATION", "DATABASE", "SUBSCRIPTION", "INTEGRATION", "INTERNAL" ], "description": "API error category", "example": "VALIDATION" }, "suggestion": { "type": "string", "description": "Suggested action to resolve the problem", "example": "Check the request body and query parameters against the API documentation." }, "errors": { "type": "array", "items": { "type": "object", "properties": { "field": { "type": "string", "description": "Field path that caused the error", "example": "email" }, "message": { "type": "string", "description": "Error message for this field", "example": "Invalid email format" }, "code": { "type": "string", "description": "Error code for this field", "example": "INVALID_FORMAT" } }, "required": [ "field", "message" ] }, "description": "Detailed field-level errors for validation failures" } }, "required": [ "type", "title", "status" ]}Operation contract
JSON
{ "operationId": "importExternalFile", "tags": [ "integrations/External storage/External Files" ], "summary": "Import external file", "description": "Import external file.", "parameters": [ { "$ref": "#/components/parameters/ProjectReference" }, { "schema": { "type": "string", "enum": [ "onedrive", "sharepoint", "drive" ], "description": "External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)." }, "required": true, "name": "provider", "in": "path" }, { "schema": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found." }, "required": true, "name": "file_id", "in": "path" }, { "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^\\S+$", "description": "Key of 1-128 characters without whitespace. A retry with the same key and request within 24 hours returns the first result instead of creating another item; the same key with a different request returns 409 conflict." }, "required": false, "name": "idempotency-key", "in": "header" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportExternalFileRequest" } } } }, "responses": { "200": { "description": "The created upload and its source.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalFileImport" } } } }, "400": { "description": "Bad request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "401": { "description": "Unauthorized", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "402": { "description": "Payment required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "403": { "description": "Forbidden", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "404": { "description": "Not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "409": { "description": "Conflict", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "413": { "description": "Payload too large", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "428": { "description": "Precondition required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "429": { "description": "Rate limit exceeded", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "500": { "description": "Server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } }, "503": { "description": "Service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ExternalFileProblem" } } } } }, "x-documentation-source-tag": "External Files", "x-canonical-documentation": { "domain": "integrations", "resource": "External storage", "subgroup": "External Files", "name": "Import external file", "description": "Import external file.", "operationId": "importExternalFile" }, "x-mint": { "href": "/cloud/rest/api-reference/integrations-external-storage-external-files/import-external-file" }}