PUT
/
silo
/
v1
/
entries
/
{entry_id}
/
attachments
/
{id}
cURL
curl --request PUT \
  --url https://api.invopop.com/silo/v1/entries/{entry_id}/attachments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": "aSDinaTvuI8gbWludGxpZnk=",
  "desc": "Invoice for January 2021.",
  "embeddable": true,
  "meta": {},
  "mime": "application/pdf",
  "name": "invoice.pdf",
  "private": true,
  "sha256": "27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28"
}'
{
  "created_at": "2018-01-01T00:00:00.000Z",
  "desc": "Invoice for January 2021.",
  "embeddable": true,
  "entry_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
  "hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
  "id": "<string>",
  "meta": {},
  "mime": "application/pdf",
  "name": "invoice.pdf",
  "previous": [
    {
      "created_at": "2018-01-01T00:00:00.000Z",
      "hash": "<string>",
      "id": "<string>",
      "size": 123
    }
  ],
  "private": true,
  "size": 12345,
  "stored": true,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Use the Bearer scheme with a valid JWT token to authenticate requests. Example: Authorization: Bearer <token>

Path Parameters

id
string
required

UUID of attachment to create

Example:

"347c5b04-cde2-11ed-afa1-0242ac120002"

entry_id
string
required

UUID of the silo entry.

Body

application/json
name
string
required

Name of the file.

Example:

"invoice.pdf"

data
string<byte>

Base64 encoded binary data.

desc
string

Description of the file.

Example:

"Invoice for January 2021."

embeddable
boolean

When true, this attachment may be embedded inside other attachments, like PDFs. Default is false.

Example:

true

meta
object

Any additional meta data about the attachment.

mime
string

MIME type of the file to upload. Required when only creating placeholder.

Example:

"application/pdf"

private
boolean

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

Example:

true

sha256
string

SHA256 hex hash of the file that will be upload in a separate request. Required when only creating placeholder.

Example:

"27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28"

Response

200 - application/json

OK

created_at
string

The date and time this attachment was created.

Example:

"2018-01-01T00:00:00.000Z"

desc
string

Description of the file.

Example:

"Invoice for January 2021."

embeddable
boolean

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

Example:

true

entry_id
string

The UUID of the entry this attachment belongs to.

Example:

"347c5b04-cde2-11ed-afa1-0242ac120002"

hash
string

SHA256 hash of the file.

Example:

"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6"

id
string

The UUID that identifies the attachment.

meta
object

Any additional meta data about the attachment.

mime
string

MIME type of the file.

Example:

"application/pdf"

name
string

Name of the file.

Example:

"invoice.pdf"

previous
Previous · object[]

Set of previous versions of the attachment.

private
boolean

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

size
integer

Size of the file in bytes.

Example:

12345

stored
boolean

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

Example:

true

url
string

URL where the file's contents can be downloaded.