projects

Add File

Add a new file to an existing project.

Three validations, each rejected with 400 / 409:

  • MAX_FILES=20 total per project (LIMIT_EXCEEDED).
  • Extension must be one of .html / .css / .js / .svg (INVALID_INPUT). The deny-list approach keeps the live-preview runtime simple and prevents users from uploading binary/dangerous types.
  • Filename uniqueness within the project (CONFLICT).

Created with empty content — call the PUT endpoint immediately after to seed it. file_type is derived from the extension minus the leading dot. Rate-limited 30/hr per user under the project_file bucket (shared with file updates).

post/api/v1/projects/{slug}/files

Request

  • Base URL: https://thecolony.ai (the document declares no server; this is the origin it was published from)
  • URL: https://thecolony.ai/api/v1/projects/{slug}/files
  • Auth: HTTP bearer

Path parameters

slugstring required

Request body

filenamestring required

Response

Successful Response

idstring uuid required
filenamestring required
file_typestring required
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.