---
updatedAt: 2026-02-17T11:08:27.000Z
---

Fetch the complete documentation index at: https://apidocs.hibob.com/llms.txt. Use this file to discover all available pages before exploring further.

# Document eSign completion webhook

Webhook sent when a document e-signing process is completed. The event will be sent at the end of the signing process. If the request has two signers and only one has signed, the event will not be sent until the second signer completes signing.

In the right panel, open **Examples** and select **Payload Example** to see a real payload.


# OpenAPI definition

```json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Docs API",
    "description": "Use Public API to access Documents in Bob",
    "license": {
      "name": "Proprietary",
      "url": "https://apidocs.hibob.com/docs/api-terms-of-use"
    },
    "contact": {
      "name": "Hi Bob, Inc."
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.hibob.com/v1",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.hibob.com/v1",
      "description": "Sandbox"
    }
  ],
  "x-readme": {
    "metrics-enabled": false
  },
  "tags": [
    {
      "name": "Documents",
      "description": "Operations for managing documents in Bob"
    },
    {
      "name": "Docs Webhooks",
      "description": "Webhook events for document-related operations"
    }
  ],
  "webhooks": {
    "documentsESignCompleted": {
      "post": {
        "operationId": "post_webhook_documents-eSign-completed",
        "tags": [
          "Docs Webhooks"
        ],
        "summary": "Document eSign completion webhook",
        "description": "Webhook sent when a document e-signing process is completed. The event will be sent at the end of the signing process. If the request has two signers and only one has signed, the event will not be sent until the second signer completes signing.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/reference/getting-started-webhooks#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentsESignCompletedEvent"
              },
              "example": {
                "companyId": 12345,
                "type": "documents.eSign.completed",
                "triggeredBy": "system",
                "triggeredAt": "2024-01-21T10:30:00Z",
                "version": "v2",
                "data": {
                  "documentId": 789,
                  "employeeId": "87726319283712973",
                  "downloadUrl": "https://app.hibob.com/api/docs/...",
                  "signedBy": "87726319283712973"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "paths": {
    "/docs/folders/metadata": {
      "get": {
        "operationId": "get_docs-folders-metadata",
        "tags": [
          "Documents"
        ],
        "summary": "Get list of folders with metadata",
        "description": "Use this endpoint to get the a list of available folders and their metadata, including the folder ID. Use the ID when uploading a file to a specific folder.",
        "responses": {
          "200": {
            "description": "List of folders was returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoldersMetadata"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "document"
      }
    },
    "/docs/people/{id}": {
      "get": {
        "operationId": "get_docs-people-id",
        "tags": [
          "Documents"
        ],
        "summary": "Download list of documents of an employee",
        "description": "Returns a list of documents and download links.<br />",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of the documents' names and download links.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDocumentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/shared": {
      "post": {
        "operationId": "post_docs-people-id-shared",
        "tags": [
          "Documents"
        ],
        "summary": "Upload file from a URL to a Shared Folder",
        "description": "Use this endpoint to upload a file from a specified URL directly into a shared folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details of the document to upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/docUploadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "document"
      }
    },
    "/docs/people/{id}/confidential": {
      "post": {
        "operationId": "post_docs-people-id-confidential",
        "tags": [
          "Documents"
        ],
        "summary": "Upload file from a URL to a Confidential Folder",
        "description": "Use this endpoint to upload a file from a specified URL directly into a confidential folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details of the document to upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/docUploadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "document"
      }
    },
    "/docs/people/{id}/custom/{folderId}": {
      "post": {
        "operationId": "post_docs-people-id-custom-folderid",
        "tags": [
          "Documents"
        ],
        "summary": "Upload File from a URL to a Custom Folder",
        "description": "Use this endpoint to upload a file from a specified URL directly into a specific custom folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "path",
            "description": "The ID of the custom folder. You can obtain the custom folder ID using the <a href=\"https://apidocs.hibob.com/reference/get_docs-folders-metadata\">get folders metadata</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Document to upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/docUploadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "document"
      }
    },
    "/docs/people/{id}/shared/upload": {
      "post": {
        "operationId": "post_docs-people-id-shared-upload",
        "tags": [
          "Documents"
        ],
        "summary": "Upload file to a Shared Folder",
        "description": "Use this endpoint to upload a file directly into a shared folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The content of the file to upload.",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/docID"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/confidential/upload": {
      "post": {
        "operationId": "post_docs-people-id-confidential-upload",
        "tags": [
          "Documents"
        ],
        "summary": "Upload File to a Confidential Folder",
        "description": "Use this endpoint to upload a file directly into a confidential folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The content of the file to upload.",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document ID.",
            "content": {}
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/folders/{folderId}/upload": {
      "post": {
        "operationId": "post_docs-people-id-folders-folderid-upload",
        "tags": [
          "Documents"
        ],
        "summary": "Upload File to a Custom Folder",
        "description": "Use this endpoint to upload a file directly into a custom folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to upload the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "path",
            "description": "The ID of the custom folder. You can obtain the custom folder ID using the  <a href=\"https://apidocs.hibob.com/reference/get_docs-folders-metadata\">get folders metadata</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The content of the file to upload.",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Uploaded document ID.",
            "content": {}
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/shared/{docId}": {
      "delete": {
        "operationId": "delete_docs-people-id-shared-docid",
        "tags": [
          "Documents"
        ],
        "summary": "Delete a Document from a Shared Folder",
        "description": "Use this endpoint to delete a specific document from a shared folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to remove the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "description": "The ID of the document you want to delete. You can obtain the employee's documents using the <a href=\"https://apidocs.hibob.com/reference/get_docs-people-id\">Download list of documents of an employee</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete success.",
            "content": {}
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/confidential/{docId}": {
      "delete": {
        "operationId": "delete_docs-people-id-confidential-docid",
        "tags": [
          "Documents"
        ],
        "summary": "Delete a Document from a Confidential Folder",
        "description": "Use this endpoint to delete a specific document from a confidential folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to remove the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "description": "The ID of the document you want to delete. You can obtain the employee's documents using the <a href=\"https://apidocs.hibob.com/reference/get_docs-people-id\">Download list of documents of an employee</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete success.",
            "content": {}
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/docs/people/{id}/folders/{folderId}/{docId}": {
      "delete": {
        "operationId": "delete_docs-people-id-folders-folderid-docid",
        "tags": [
          "Documents"
        ],
        "summary": "Delete a Document from a Custom Folder",
        "description": "Use this endpoint to delete a specific document from a custom folder of a specific employee in Bob. <br><br>Make sure you set the right permissions to the Service User in order to remove the file. See more details in <a href=\"https://help.hibob.com/hc/en-us/articles/4409792096273-Create-a-document-folder#h_01HDNE82T44QA6632JB9ZGPZ6G\">How to set up permissions for People's Docs </a>.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the Employee. You can obtain the employee ID from the employee data.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "description": "The ID of the document you want to delete. You can obtain the employee's documents using the <a href=\"https://apidocs.hibob.com/reference/get_docs-people-id\">Download list of documents of an employee</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "path",
            "description": "The ID of the custom folder the document is stored in. You can obtain the custom folder ID using the <a href=\"https://apidocs.hibob.com/reference/get_docs-people-id\">Download list of documents of an employee</a> endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete success.",
            "content": {}
          },
          "401": {
            "description": "Authentication failed. Check your service user credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The service user or token is missing the required permissions to access the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - see <a href=\"https://apidocs.hibob.com/reference/projects#rate-limiting\">Rate limits</a>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "EmployeeDocumentResponse": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmployeeDocumentWithDownloadLink"
            }
          }
        }
      },
      "EmployeeDocumentWithDownloadLink": {
        "type": "object",
        "properties": {
          "documentName": {
            "type": "string",
            "description": "The name of the document."
          },
          "downloadLink": {
            "type": "string",
            "description": "The name of the document."
          }
        }
      },
      "AddDocument": {
        "type": "object",
        "properties": {
          "documentName": {
            "type": "string",
            "description": "The name of the Document."
          },
          "documentUrl": {
            "type": "string",
            "description": "The URL pointing to the document to upload."
          },
          "tags": {
            "type": "array",
            "description": "A array of tags that you want to attach to the document in Bob.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "docID": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "The ID (docId) of the document that was created. Use this when you need to pass the docID to other endpoints."
          }
        }
      },
      "docUploadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "The ID (docId) of the document that was created. Use this when you need to pass the docID to other endpoints."
          },
          "employeeId": {
            "type": "string",
            "description": "The employee ID that the document was uploaded for."
          },
          "uploadedById": {
            "type": "string",
            "description": "The ID of the service user that performed the upload"
          },
          "name": {
            "type": "string",
            "description": "The name of the document."
          },
          "creationDate": {
            "type": "string",
            "description": "The timestamp for the upload."
          },
          "status": {
            "type": "string",
            "description": "The status of the document."
          },
          "tags": {
            "type": "array",
            "description": "Document tags in Bob are custom labels that you can assign to your documents to organize and filter them according to your own criteria.",
            "items": {
              "type": "string"
            }
          },
          "folderId": {
            "type": "number",
            "description": "The backend-id of the folder the document was uploaded to."
          },
          "mimeType": {
            "type": "string",
            "description": "The file type"
          },
          "fileId": {
            "type": "number",
            "description": "The backend-id of the updloaded file."
          },
          "documentName": {
            "type": "string",
            "description": "The name of the document."
          },
          "owner": {
            "type": "object",
            "description": "The employee who is the owner of the document.",
            "properties": {
              "id": {
                "type": "string"
              }
            }
          },
          "actionRequestDate": {
            "type": "string"
          },
          "actionCompleteDate": {
            "type": "string"
          }
        }
      },
      "FolderMetadata": {
        "type": "object",
        "properties": {
          "id": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "This is the ID of the folder. Use this ID when loading a file to the folder."
          },
          "name": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              }
            },
            "description": "The name of the folder as appears in Bob."
          },
          "folderType": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              }
            },
            "description": "The type of the folder. Predefined folder types can be either 'confidential' or 'shared' and if it's a folder defined by the user the type is 'custom'."
          }
        }
      },
      "FoldersMetadata": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FolderMetadata"
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique identifier of the error."
          },
          "error": {
            "type": "string",
            "description": "A human readable error message."
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "description": "Base webhook event structure",
        "properties": {
          "companyId": {
            "type": "integer",
            "format": "int64",
            "description": "The company ID"
          },
          "type": {
            "type": "string",
            "description": "The event type"
          },
          "triggeredBy": {
            "type": "string",
            "description": "Indicates who/what triggered the event. When set to \"system\", it means the event was triggered by an automated background process. \nCould also be an employee ID if triggered directly by a user action.\n"
          },
          "triggeredAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the event occurred"
          },
          "version": {
            "type": "string",
            "description": "The webhook version"
          },
          "data": {
            "type": "object",
            "description": "Contains the actual data and differs for each event type"
          }
        },
        "required": [
          "companyId",
          "type",
          "triggeredBy",
          "triggeredAt",
          "version",
          "data"
        ]
      },
      "DocumentsESignCompletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "documents.eSign.completed"
                ],
                "description": "This event is sent at the end of the document e-signing process. If the request has two signers and only one has signed, the event will not be sent until the second signer completes their signing."
              },
              "data": {
                "type": "object",
                "description": "Event payload. Schema is defined by the webhook-integrations service (ESignCompletedEventData).",
                "properties": {
                  "documentId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The backend ID of the document that was signed."
                  },
                  "employeeId": {
                    "type": "string",
                    "description": "The document owner — the employee whose document folder contains the signed document.\nRepresents the person the document was requested for (the target/recipient of the eSign request).\n"
                  },
                  "downloadUrl": {
                    "type": "string",
                    "description": "The download URL for the signed document."
                  },
                  "signedBy": {
                    "type": "string",
                    "description": "The last signer who completed the document — the person who added the final signature that triggered the completed event.\nMay be the employee, a manager, HR representative, or any other required signer.\n"
                  }
                },
                "required": [
                  "documentId",
                  "employeeId",
                  "downloadUrl",
                  "signedBy"
                ]
              }
            }
          }
        ]
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic"
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.0",
        "description": "OAuth 2.0 authentication using an Access Token is available for registered partners only.  Try It! does not support the full HiBob OAuth flow. You can follow <a href=\"https://apidocs.hibob.com/reference/oauth-20#testing-from-the-public-api-reference\" target=\"_blank\">these steps</a> to complete the OAuth 2.0 flow in Postman and then paste the token here."
      }
    }
  }
}
```