Files
Import file
Add a file to Wordsmith from a public URL.
POST
Downloads the file at a public URL and stores it in your private space. The response’s
id is the new file’s file_id.
The URL must be public https. Wordsmith refuses private and internal addresses. The file must be 100 MB or smaller, and the whole download, redirects included, must finish within 20 seconds. A refused download is a 400 that says why, without naming the address Wordsmith resolved.
Without file_name, the file takes the name in the server’s Content-Disposition header, or else the last segment of the URL.
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".
Body parameters
A public https URL to download. The file must be 100 MB or smaller and download within 20 seconds. At most 2,048 characters.
The name to store the file under. Defaults to the name the server sends, or the URL’s last segment. 1 to 255 characters.
Response
Returns201 with the new file.
The file’s sensitivity label from your organisation’s labelling system, such as Microsoft Purview:
provider, name (null when Wordsmith can’t name the label) and is_protected (the label encrypts the file). null when the file has no label.