Files

The file library and what takes your storage.

Values for the examples

Type them once and every example on this page uses them. The API key stays on this page only and is never saved.

GET/v1/files

Lists the organization’s files, by kind, with their size.

ListOn success: 200.Permission: Read.

Query parameters

FieldTypeRequiredNotes
pageintegerNomin 1 · default 1
pageSizeintegerNomin 1 · max 100 · default 48
group"library" | "branding" | "shareImages" | "catalog" | "sharedFiles" | "approvals" | "messages" | "socialPosts" | "other"No
type"image" | "pdf" | "document" | "other"No
qstringNomax length 200
sort"newest" | "oldest" | "largest" | "smallest" | "name"Nodefault "newest"

Response

21 fields
FieldTypeAlways there
dataarray of objectYes
data[].bytesintegerYes
data[].contentTypestringYes
data[].createdAtstring (date-time)Yes
data[].deletablebooleanYes
data[].groupstringYes
data[].idstring | null (uuid)Yes
data[].keystringYes
data[].namestringYes
data[].ownerobject | nullYes
data[].owner.kindstringYes
data[].owner.purposestringYes
data[].updatedAtstring (date-time)Yes
data[].urlstring (uri)Yes
data[].usedInarray of objectYes
data[].usedIn[].idstring (uuid)Yes
data[].usedIn[].kindstringYes
data[].usedIn[].namestringYes
pageintegerYes
pageSizeintegerYes
totalintegerYes
Example
curl -X GET "https://api.firmado.app/v1/files" \
  -H "X-Api-Key: fmd_..."

Response (200), with sample values:

{
  "page": 1,
  "pageSize": 1,
  "total": 1,
  "data": [
    {
      "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "key": "…",
      "name": "Ana Lima",
      "group": "…",
      "contentType": "…",
      "bytes": 1,
      "url": "https://example.com",
      "deletable": true,
      "owner": {},
      "usedIn": [],
      "createdAt": "2026-11-21T14:00:00.000Z",
      "updatedAt": "2026-11-21T14:00:00.000Z"
    }
  ]
}

POST/v1/files

Uploads a file to the library.

CreateOn success: 201.Permission: Create.

Body: a multipart form, with the file in `file`

FieldTypeRequiredNotes
filestring (binary)Yes

Response

12 fields
FieldTypeAlways there
bytesintegerYes
contentTypestringYes
createdAtstring (date-time)Yes
deletablebooleanYes
groupstringYes
idstring (uuid)Yes
keystringYes
namestringYes
ownernull in the examplesYes
updatedAtstring (date-time)Yes
urlstring (uri)Yes
usedInarray of anyYes
Example
curl -X POST "https://api.firmado.app/v1/files" \
  -H "X-Api-Key: fmd_..." \
  -F "file=@./file.pdf"

Response (201), with sample values:

{
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "key": "…",
  "name": "Ana Lima",
  "group": "…",
  "contentType": "…",
  "bytes": 1,
  "url": "https://example.com",
  "deletable": true,
  "owner": null,
  "usedIn": [],
  "createdAt": "2026-11-21T14:00:00.000Z",
  "updatedAt": "2026-11-21T14:00:00.000Z"
}

GET/v1/files/{id}

Returns a file with where it is used.

Get oneOn success: 200.Permission: Read.

Path parameters

FieldTypeRequiredNotes
idstringYes

Response

15 fields
FieldTypeAlways there
bytesintegerYes
contentTypestringYes
createdAtstring (date-time)Yes
deletablebooleanYes
groupstringYes
idstring (uuid)Yes
keystringYes
namestringYes
ownernull in the examplesYes
updatedAtstring (date-time)Yes
urlstring (uri)Yes
usedInarray of objectYes
usedIn[].idstring (uuid)Yes
usedIn[].kindstringYes
usedIn[].namestringYes
Example
curl -X GET "https://api.firmado.app/v1/files/{id}" \
  -H "X-Api-Key: fmd_..."

Response (200), with sample values:

{
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "key": "…",
  "name": "Ana Lima",
  "group": "…",
  "contentType": "…",
  "bytes": 1,
  "url": "https://example.com",
  "deletable": true,
  "owner": null,
  "usedIn": [
    {
      "kind": "…",
      "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "name": "Ana Lima"
    }
  ],
  "createdAt": "2026-11-21T14:00:00.000Z",
  "updatedAt": "2026-11-21T14:00:00.000Z"
}

PATCH/v1/files/{id}

Renames a library file.

UpdateOn success: 200.Permission: Update.

Path parameters

FieldTypeRequiredNotes
idstringYes

Body

FieldTypeRequiredNotes
namestringYesmin length 1 · max length 200

Response

12 fields
FieldTypeAlways there
bytesintegerYes
contentTypestringYes
createdAtstring (date-time)Yes
deletablebooleanYes
groupstringYes
idstring (uuid)Yes
keystringYes
namestringYes
ownernull in the examplesYes
updatedAtstring (date-time)Yes
urlstring (uri)Yes
usedInarray of anyYes
Example
curl -X PATCH "https://api.firmado.app/v1/files/{id}" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana Lima"
}'

Response (200), with sample values:

{
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "key": "…",
  "name": "Ana Lima",
  "group": "…",
  "contentType": "…",
  "bytes": 1,
  "url": "https://example.com",
  "deletable": true,
  "owner": null,
  "usedIn": [],
  "createdAt": "2026-11-21T14:00:00.000Z",
  "updatedAt": "2026-11-21T14:00:00.000Z"
}

POST/v1/files/delete

Deletes one or more library files.

Delete/deleteOn success: 200.Permission: Delete.

Body

FieldTypeRequiredNotes
idsarray of string (uuid)Yesmin items 1 · max items 100

Response

2 fields
FieldTypeAlways there
deletedintegerYes
freedBytesintegerYes
Example
curl -X POST "https://api.firmado.app/v1/files/delete" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
  ]
}'

Response (200), with sample values:

{
  "deleted": 1,
  "freedBytes": 1
}

GET/v1/files/summary

Storage used against the plan, by kind of file.

Read/summaryOn success: 200.Permission: Read.

Response

31 fields
FieldTypeAlways there
groupsobjectYes
groups.approvalsobjectYes
groups.approvals.bytesintegerYes
groups.approvals.filesintegerYes
groups.brandingobjectYes
groups.branding.bytesintegerYes
groups.branding.filesintegerYes
groups.catalogobjectYes
groups.catalog.bytesintegerYes
groups.catalog.filesintegerYes
groups.libraryobjectYes
groups.library.bytesintegerYes
groups.library.filesintegerYes
groups.messagesobjectYes
groups.messages.bytesintegerYes
groups.messages.filesintegerYes
groups.otherobjectYes
groups.other.bytesintegerYes
groups.other.filesintegerYes
groups.shareImagesobjectYes
groups.shareImages.bytesintegerYes
groups.shareImages.filesintegerYes
groups.sharedFilesobjectYes
groups.sharedFiles.bytesintegerYes
groups.sharedFiles.filesintegerYes
groups.socialPostsobjectYes
groups.socialPosts.bytesintegerYes
groups.socialPosts.filesintegerYes
limitintegerYes
maxUploadBytesintegerYes
usedintegerYes
Example
curl -X GET "https://api.firmado.app/v1/files/summary" \
  -H "X-Api-Key: fmd_..."

Response (200), with sample values:

{
  "used": 1,
  "limit": 1,
  "groups": {
    "library": {
      "files": 1,
      "bytes": 1
    },
    "branding": {
      "files": 1,
      "bytes": 1
    },
    "shareImages": {
      "files": 1,
      "bytes": 1
    },
    "catalog": {
      "files": 1,
      "bytes": 1
    },
    "sharedFiles": {
      "files": 1,
      "bytes": 1
    },
    "approvals": {
      "files": 1,
      "bytes": 1
    },
    "messages": {
      "files": 1,
      "bytes": 1
    },
    "socialPosts": {
      "files": 1,
      "bytes": 1
    },
    "other": {
      "files": 1,
      "bytes": 1
    }
  },
  "maxUploadBytes": 1
}

Webhook events

Changes of this feature that webhooks can send.

  • file.uploadedCreate
  • file.updatedUpdate
  • file.deletedDelete