v1

latestOpenAPI 3.0.0Apache 2.02026-07-267057121.5 KB

Add a new file to a silo entry without an explicit UUID. The file data can be provided inline as base64 encoded data, or omitted to create a placeholder. When data is not provided, you must provide sha256, size, and mime fields, and the response will include a url field that can be used to stream/upload the file contents directly via a PUT request to that URL. For non-enrolled users, only the format and attachment categories are allowed.

post/silo/v1/entries/{entry_id}/files

Path parameters

entry_idstring required

UUID of the silo entry.

UUID of the silo entry.

Request body

categorystring

Category of the file.

datastring byte

Base64 encoded binary data. Optional - if not provided, sha256, size, and mime are required.

descstring

Description of the file.

embeddableboolean

When true, this file may be embedded inside other files, like PDFs. Default is false.

keystring

Key used to identify the file in the entry.

metaobject

Any additional meta data about the file.

mimestring

MIME type of the file. Required when data is not provided.

namestring required

Name of the file.

privateboolean

When true, this file is private and can only be accessed by the owner. Default is false.

sha256string

SHA256 hex hash of the file. Required when data is not provided.

sizeinteger

Size of the file in bytes. Required when data is not provided.

Example request

{
  "category": "format",
  "desc": "Invoice for January 2021.",
  "embeddable": true,
  "key": "pdf",
  "mime": "application/pdf",
  "name": "invoice.pdf",
  "private": true,
  "sha256": "27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28",
  "size": 12345
}

Response

OK

categorystring

Category of the file.

created_atstring

The date and time this file was created.

descstring

Description of the file.

embeddableboolean

When true, the file can be embedded inside another file, like a PDF.

entry_idstring

The UUID of the entry this file belongs to.

hashstring

SHA256 hash of the file.

idstring

The UUID that identifies the file in the entry.

keystring

Key used to identify the file by the service or app that generated it.

metaobject

Any additional meta data about the file.

mimestring

MIME type of the file.

namestring

Name of the file.

privateboolean

When true, the file will not have a public link.

sizeinteger

Size of the file in bytes.

storedboolean

When true, indicates that the file's contents have been uploaded successfully.

urlstring

URL where the file's contents can be downloaded.

Example response

{
  "category": "version",
  "created_at": "2018-01-01T00:00:00.000Z",
  "desc": "Invoice for January 2021.",
  "embeddable": true,
  "entry_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
  "hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
  "key": "pdf",
  "mime": "application/pdf",
  "name": "invoice.pdf",
  "previous": [
    {
      "created_at": "2018-01-01T00:00:00.000Z"
    }
  ],
  "size": 12345,
  "stored": true
}