Project files
A project has files: what the planner's Dateien tab lists, and what the customer sees of it in Mein Bereich. They are a place of their own, apart from the documents of an offer: a file can be internal, and the customer can upload files too.
You list and download all of them, and you add, change and remove your team's. An offer request has files as well, the photos the customer sent for instance; those can be read.
Reading needs the read:documents scope and read:projects, for an offer request
read:offers instead. Writing needs read:documents and write:projects.
Listing
curl https://ejgemvrnkezmnhucjdvx.supabase.co/functions/v1/api/v1/projects/41/files -H "Authorization: Bearer mds_live_your_key"
{
"data": [
{
"id": "5f0c2a1e-7b1d-4c6e-9a55-2f6d1f3b8c10",
"name": "Netzzusage.pdf",
"category": "DOCUMENT",
"note": null,
"visibleToCustomer": false,
"uploadedBy": { "kind": "TEAM", "name": "Katrin Wolf" },
"phase": "PROJECT",
"fileName": "Netzzusage.pdf",
"contentType": "application/pdf",
"sizeBytes": 482113,
"createdAt": "2026-11-30T09:14:03.512+00:00",
"downloadUrl": "https://…/storage/v1/object/sign/documents/…?token=…&download=Netzzusage.pdf",
"downloadUrlExpiresAt": "2026-11-30T11:00:00.000Z"
}
],
"categories": [
{ "code": "METER_CABINET", "description": "Zählerschrank mit offener Tür", "accepts": "image" },
{ "code": "DOCUMENT", "description": null, "accepts": "image_or_pdf" },
{ "code": "OTHER", "description": null, "accepts": "image_or_pdf" }
]
}
The newest file comes first.
- Download a file with a plain
GETon itsdownloadUrl— no API key needed, and the file comes withfileNameas its name. The link works for one hour. Don't store it, since anyone with the link gets the file; list the files again for fresh links. It isnullwhen the file is missing. uploadedBy.kindsays whose file it is:TEAMyour team's,CUSTOMERthe customer's own. A file an API key stored hasAPI · <name of the key>as its uploader. The customer is told that it is your team's.visibleToCustomersays whether the customer sees the file in Mein Bereich. Their own files always are.phaseisREQUESTfor a file that came with the offer request the project was made from.categoriesare the ones a file of your company can have: the photo types you ask your customers for (Einstellungen → Anfragen),DOCUMENTandOTHER.
Listing the files marks nothing as seen: a file your team has not looked at stays new in the planner.
One file alone, for instance for a fresh link, is
GET /v1/projects/{id}/files/{fileId}. The files of an offer request are
GET /v1/offer-requests/{id}/files, in the same form.
Adding a file
Send a form (multipart/form-data) with the file in file:
curl https://ejgemvrnkezmnhucjdvx.supabase.co/functions/v1/api/v1/projects/41/files -H "Authorization: Bearer mds_live_your_key" -F "file=@netzzusage.pdf" -F "name=Netzzusage.pdf" -F "visibleToCustomer=true"
The answer is the new file, as in the list above.
- The file is a PDF, JPEG, PNG, WebP or HEIC of at most 20 MiB. Its type is told from its content, not from its name.
name(at most 200 characters) is optional; without it the file keeps its own.categoryisDOCUMENTwhen you leave it out. The photo types take pictures only.note(at most 1000 characters) is a short description. The customer sees it with the file.visibleToCustomeristrueorfalse, the default. An internal file is seen by your team only.
Every call stores a file, the same file twice as well. When a call ends without an
answer (a timeout, a 5xx), look into the list before you send the file again.
Send files one after another; many at the same moment are told to wait (429).
Changing and removing
| Call | What it does |
|---|---|
PATCH /v1/projects/{id}/files/{fileId} | Shows the file to the customer or hides it, changes its category or its note. |
DELETE /v1/projects/{id}/files/{fileId} | Removes the file, also from Mein Bereich. This cannot be undone. |
Both work on your team's files of the project, whoever stored them. The
customer's own files can be read, but not changed or removed
(409 customer_file): changing one would mark it as seen, and only a person should
decide to remove a customer's file. The files your team added to the offer
request are changed in the planner.
What the customer notices
A file that becomes visible appears in Mein Bereich at once, marked as new and listed under the news there, and the project's history in the planner names your API key. No mail is sent. Hiding the file takes it out again.
Errors
| Status | Error | What to do |
|---|---|---|
400 | validation_error | The body is no form, the file is missing or empty, or a field is not valid, for instance a category your company does not have; the message names it. |
404 | not_found | The project, the offer request or the file does not exist in your company, or the file is your team's of the offer request. |
409 | customer_file | The file is the customer's own. |
413 | file_too_large | The file has more than 20 MiB. |
415 | file_type_not_allowed | Send a PDF, JPEG, PNG, WebP or HEIC, and no PDF for a photo type. |
429 | rate_limited | The key has stored 1000 files within the hour, or 20 files are being stored in the project at the same moment. Wait the seconds in Retry-After. |