Files
Complete Upload
Turn an uploaded file into a Wordsmith file with a file_id.
POST
Preview. This endpoint is available to organisations in the Wordsmith MCP and files pilot. Other organisations receive
403 mcp_not_enabled. See the preview overview.id is the file’s file_id, which the other files endpoints and Attach Files take.
An upload takes three calls:
- Call Upload URL. It returns
upload_urlandjob_id. PUTthe file’s bytes toupload_url, with aContent-Typeheader equal to thecontent_typeyou sent.- Call this endpoint with the
job_idasupload_id.
409 upload_completion_in_progress; retry it.
If Wordsmith has not received the bytes yet, the response is 400 upload_not_received and the upload stays open. PUT the bytes, then complete again.
An upload is used once. After you complete it, attach the file by its file_id, not the job_id. A job_id already used as an upload_job_id attachment cannot be completed.
Authentication
Send an API key, or an OAuth access token with thefiles:write scope, as a bearer token in the Authorization header. A token without the scope gets 403 with "error": "insufficient_scope".
Path parameters
string (uuid)
required
The
job_id that Upload URL returned.Response
Returns200 with the file.
string (uuid)
The file’s id: the
file_id other endpoints take.string | null
The file’s name.
string | null
The file’s MIME type.
integer | null
Size in bytes.
string | null
When the file was created. ISO 8601 UTC.