Fichiers

La bibliothèque de fichiers et ce qui occupe votre stockage.

Valeurs des exemples

Saisissez-les une fois : tous les exemples de cette page les utilisent. La clé d’API reste sur cette page et n’est jamais enregistrée.

GET/v1/files

Liste les fichiers de l’organisation, par type, avec leur taille.

ListerEn cas de succès : 200.Permission : Lire.

Paramètres de requête

ChampTypeObligatoireNotes
pageintegerNonmin 1 · default 1
pageSizeintegerNonmin 1 · max 100 · default 48
group"library" | "branding" | "shareImages" | "catalog" | "sharedFiles" | "approvals" | "messages" | "socialPosts" | "other"Non
type"image" | "pdf" | "document" | "other"Non
qstringNonmax length 200
sort"newest" | "oldest" | "largest" | "smallest" | "name"Nondefault "newest"

Réponse

21 champs
ChampTypeToujours présent
dataarray of objectOui
data[].bytesintegerOui
data[].contentTypestringOui
data[].createdAtstring (date-time)Oui
data[].deletablebooleanOui
data[].groupstringOui
data[].idstring | null (uuid)Oui
data[].keystringOui
data[].namestringOui
data[].ownerobject | nullOui
data[].owner.kindstringOui
data[].owner.purposestringOui
data[].updatedAtstring (date-time)Oui
data[].urlstring (uri)Oui
data[].usedInarray of objectOui
data[].usedIn[].idstring (uuid)Oui
data[].usedIn[].kindstringOui
data[].usedIn[].namestringOui
pageintegerOui
pageSizeintegerOui
totalintegerOui
Exemple
curl -X GET "https://api.firmado.app/v1/files" \
  -H "X-Api-Key: fmd_..."

Réponse (200), avec des valeurs d’exemple :

{
  "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

Envoie un fichier dans la bibliothèque.

CréerEn cas de succès : 201.Permission : Créer.

Corps : un formulaire multipart, avec le fichier dans `file`

ChampTypeObligatoireNotes
filestring (binary)Oui

Réponse

12 champs
ChampTypeToujours présent
bytesintegerOui
contentTypestringOui
createdAtstring (date-time)Oui
deletablebooleanOui
groupstringOui
idstring (uuid)Oui
keystringOui
namestringOui
ownernull dans les exemplesOui
updatedAtstring (date-time)Oui
urlstring (uri)Oui
usedInarray of anyOui
Exemple
curl -X POST "https://api.firmado.app/v1/files" \
  -H "X-Api-Key: fmd_..." \
  -F "file=@./file.pdf"

Réponse (201), avec des valeurs d’exemple :

{
  "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}

Renvoie un fichier avec les endroits où il est utilisé.

Voir unEn cas de succès : 200.Permission : Lire.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui

Réponse

15 champs
ChampTypeToujours présent
bytesintegerOui
contentTypestringOui
createdAtstring (date-time)Oui
deletablebooleanOui
groupstringOui
idstring (uuid)Oui
keystringOui
namestringOui
ownernull dans les exemplesOui
updatedAtstring (date-time)Oui
urlstring (uri)Oui
usedInarray of objectOui
usedIn[].idstring (uuid)Oui
usedIn[].kindstringOui
usedIn[].namestringOui
Exemple
curl -X GET "https://api.firmado.app/v1/files/{id}" \
  -H "X-Api-Key: fmd_..."

Réponse (200), avec des valeurs d’exemple :

{
  "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}

Renomme un fichier de la bibliothèque.

ModifierEn cas de succès : 200.Permission : Modifier.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui

Corps

ChampTypeObligatoireNotes
namestringOuimin length 1 · max length 200

Réponse

12 champs
ChampTypeToujours présent
bytesintegerOui
contentTypestringOui
createdAtstring (date-time)Oui
deletablebooleanOui
groupstringOui
idstring (uuid)Oui
keystringOui
namestringOui
ownernull dans les exemplesOui
updatedAtstring (date-time)Oui
urlstring (uri)Oui
usedInarray of anyOui
Exemple
curl -X PATCH "https://api.firmado.app/v1/files/{id}" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana Lima"
}'

Réponse (200), avec des valeurs d’exemple :

{
  "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

Supprime un ou plusieurs fichiers de la bibliothèque.

Supprimer/deleteEn cas de succès : 200.Permission : Supprimer.

Corps

ChampTypeObligatoireNotes
idsarray of string (uuid)Ouimin items 1 · max items 100

Réponse

2 champs
ChampTypeToujours présent
deletedintegerOui
freedBytesintegerOui
Exemple
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"
  ]
}'

Réponse (200), avec des valeurs d’exemple :

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

GET/v1/files/summary

Le stockage utilisé par rapport à l’offre, par type de fichier.

Lire/summaryEn cas de succès : 200.Permission : Lire.

Réponse

31 champs
ChampTypeToujours présent
groupsobjectOui
groups.approvalsobjectOui
groups.approvals.bytesintegerOui
groups.approvals.filesintegerOui
groups.brandingobjectOui
groups.branding.bytesintegerOui
groups.branding.filesintegerOui
groups.catalogobjectOui
groups.catalog.bytesintegerOui
groups.catalog.filesintegerOui
groups.libraryobjectOui
groups.library.bytesintegerOui
groups.library.filesintegerOui
groups.messagesobjectOui
groups.messages.bytesintegerOui
groups.messages.filesintegerOui
groups.otherobjectOui
groups.other.bytesintegerOui
groups.other.filesintegerOui
groups.shareImagesobjectOui
groups.shareImages.bytesintegerOui
groups.shareImages.filesintegerOui
groups.sharedFilesobjectOui
groups.sharedFiles.bytesintegerOui
groups.sharedFiles.filesintegerOui
groups.socialPostsobjectOui
groups.socialPosts.bytesintegerOui
groups.socialPosts.filesintegerOui
limitintegerOui
maxUploadBytesintegerOui
usedintegerOui
Exemple
curl -X GET "https://api.firmado.app/v1/files/summary" \
  -H "X-Api-Key: fmd_..."

Réponse (200), avec des valeurs d’exemple :

{
  "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
}

Événements de webhook

Les changements de cette fonctionnalité que les webhooks peuvent envoyer.

  • file.uploadedCréer
  • file.updatedModifier
  • file.deletedSupprimer