Import a folder
const url = 'https://shareout.site/v1/workspaces/example/file-imports/sources';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"google_drive","ref":"example","name":"example","targetFolderId":"example","convert":true,"dailySync":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/workspaces/example/file-imports/sources \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "google_drive", "ref": "example", "name": "example", "targetFolderId": "example", "convert": true, "dailySync": false }'Creates the import and starts its first run. The picked folder becomes a ShareOut folder inside targetFolderId (or at the top level), mirroring subfolders. Files take the target folder’s visibility (private → private, public → link-shareable, otherwise team); converted pages are never public. At most 10 folders per workspace can sync daily.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Workspace ID or slug.
Request Bodyrequired
Section titled “Request Bodyrequired”object
A selectable ref from browse.
Turn Word/Excel/PDF/Markdown/CSV (and slides
Responses
Section titled “Responses”Created and started
object
object
False after the connection was revoked.
object
object
STORAGE_QUOTA_EXCEEDED, CONNECTION_REVOKED, RATE_LIMITED, WALK_LIMIT (warning on a done run), NOT_ALLOWED, SOURCE_DELETED, STALLED, FAILED.
Files that failed, were skipped, or imported with a warning (up to 200).
object
object
object
STORAGE_QUOTA_EXCEEDED, CONNECTION_REVOKED, RATE_LIMITED, WALK_LIMIT (warning on a done run), NOT_ALLOWED, SOURCE_DELETED, STALLED, FAILED.
Files that failed, were skipped, or imported with a warning (up to 200).
object
Example
{ "source": { "provider": "google_drive", "lastRun": { "status": "queued", "trigger": "manual" } }, "run": { "status": "queued", "trigger": "manual" }}Invalid request
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Access denied
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Slug taken or version conflict
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}