Skip to content

Files

8 calls. Every request needs the Authorization header: see the overview.

GET /files/by-checksum/{checksum}

The file with this content checksum, or null.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
checksumstringyes

Response: IngestedFileSummary (200)

curl -X GET "https://api.maitento.com/files/by-checksum/<checksum>" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /files/by-id/{id}

Deletes a file (Tenant.Admin).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/files/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /files/by-id/{id}

The file’s original bytes, content type and file name.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
partitionIduuid

Response: binary (200)

curl -X GET "https://api.maitento.com/files/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
PATCH /files/by-id/{id}

Replaces a file’s content (the same content is a no-op). Never retried.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: IngestedFile (200)

curl -X PATCH "https://api.maitento.com/files/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH" \
-F "file=@handbook.pdf"
GET /files/by-id/{id}/details

The file record (with its extracted text). Throws NotFoundError when there is none.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
partitionIduuid

Response: IngestedFile (200)

curl -X GET "https://api.maitento.com/files/by-id/<id>/details" \
-H "Authorization: $MAITENTO_AUTH"
GET /files/by-id/{id}/text

The file’s extracted text.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
partitionIduuid

Response: FileTextResponse (200)

curl -X GET "https://api.maitento.com/files/by-id/<id>/text" \
-H "Authorization: $MAITENTO_AUTH"
PUT /files/embeddings/search

Semantic search over a partition’s files.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Request body: EmbeddedVectorSearchRequest

FieldTypeRequiredDescription
querystringyesWhat to search for, in plain words.
partitionIduuidyesThe partition (knowledge base) to search.

Response: EmbeddingsSearchResult[] (200)

curl -X PUT "https://api.maitento.com/files/embeddings/search" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"query":"...","partitionId":"..."}'
PUT /files/partitions/{partitionId}

Uploads a file into a partition. Text extraction runs inside the call (it can take minutes: the default timeout is 6 minutes); chunking and embedding continue afterwards (ingested-file-updated, isVectorGenerated). The same bytes in the same partition are de-duplicated. Never retried.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
partitionIduuidyes

Response: IngestedFile (200)

curl -X PUT "https://api.maitento.com/files/partitions/<partitionId>" \
-H "Authorization: $MAITENTO_AUTH" \
-F "file=@handbook.pdf"