Skip to main content
POST
AddProjectFile
Questions or issues? Contact us at api-support@manus.ai.
Auth:
  • API Key: Full access.
  • Standard OAuth client: Requires manage_all_tasks. create_project alone is not sufficient.
  • Trusted client: Full access.
The user must own the project or be a project member with edit permission.

Upload flow

  1. Call file.upload with the file’s name, then PUT the file bytes to the returned upload_url.
  2. After the PUT completes, call project.addFile with project_id and the returned file.id. Pass filename only if you want to override the display name stored in the project.
The uploaded bytes are copied into persistent project storage so the file remains available in all tasks under the project after the 48-hour file.upload expiration window. The source file_id is not consumed: it expires on its normal schedule, and deleting it with file.delete does not affect the project file.

Limits and rules

  • File size and type: Inherits file.upload limits (up to 512 MB; executable and script extensions are prohibited). Any overridden filename must be 1–255 characters, include an allowed file extension, and must not contain path separators (/, \), ?, #, or control characters.
  • Project resource limit: Each project holds at most 199 resources in total (files and web links combined). Exceeding the cap returns 429 resource_exhausted.
  • Web links: This endpoint attaches files only; managing project web links is not supported via OpenAPI.

Errors

Headers

x-manus-api-key
string

API key for direct authentication. Provide either this or Authorization, not both. See Authentication.

Authorization
string

OAuth2 access token in Bearer {token} format. An OAuth client requires the manage_all_tasks scope unless it is a Trusted team client or Trusted public client; create_project alone is not sufficient. Provide either this or x-manus-api-key, not both. See the Open App guide.

Example:

"Bearer {access_token}"

Body

application/json
project_id
string
required

The unique identifier of the target project. Use project.list to get project IDs.

Required string length: 1 - 65
file_id
string
required

ID of a file uploaded with file.upload. The file must belong to the authenticated user and have status uploaded.

Required string length: 1 - 64
filename
string

Optional display filename override (1–255 characters). Must include an allowed file extension and cannot contain /, \, ?, #, or control characters. Defaults to the filename used in file.upload.

Required string length: 1 - 255

Response

Project file added successfully.

ok
boolean
required

Whether the request was successful.

Example:

true

request_id
string
required

Unique identifier for this API request.

file
object
required

The project file created by this request.