Skip to main content
POST
Attaches a project document by sending the file itself as multipart/form-data. Use this when you have the file locally and do not want to host it or generate a pre-signed URL first. This is the same operation as Attach Project Document; only the way you supply the file differs. The document applies to this project only, together with the guidelines of the project’s folder.
Send the file in a form field named file. The file must be smaller than 50 MiB (52,428,800 bytes). Files at or above this limit return 413.

Authorizations

This endpoint requires API key authentication. Include your API key in the request header:
  • Header name: X-Api-Key
  • Header value: Your API key from the Ollang dashboard
  • Format: X-Api-Key: your-api-key-here
The examples read the key from the OLLANG_API_KEY environment variable; set it before running them. The project must belong to the API key’s account; other projects return 404. The API key user also needs write access, the same as for folder documents: the account owner, team-manager or order-creator role, or project manager of the project’s folder. Other keys, such as view-only users, receive a 403.

Path Parameters

string
required
The unique identifier of the project to attach the document to. Retrieve project IDs with Retrieve All Projects.

Body Parameters

Send the request as multipart/form-data.
file
required
The document to upload, smaller than 50 MiB (52,428,800 bytes).
string
required
The kind of project document. One of:
  • guideline — style and tone guidance
  • guideline_glossary — terminology list
  • character_list — character names and notes
string
Display name of the document. Defaults to the uploaded file’s own name. The file’s extension is appended when the name does not already end with it.
string
BCP-47 language tag of the document (e.g. en). Defaults to the project’s source language.

Response

Returns the created project document, identical to Attach Project Document.
string
Unique identifier of the project document. Pass this to Update Project Document or Remove Project Document.
string
Display name of the document.
string
One of guideline, guideline_glossary, or character_list.
string
A pre-signed download link for the stored copy Ollang created, valid for 12 hours.
number
Size of the stored document in bytes.
string
The language supplied with the request, or the project’s source language.
string
Identifier of the project the document is attached to.
string
When the document was attached, in ISO 8601 format.