Create Employee File
POST /services/api/v1/employee_files
Creates a new employee file.
Request Body
- Example
- Schema
{
"file_url": "https://onboard.org/uploads/file.txt",
"employee_file_category_id": "A96ey16n",
"date": "01/01/2025",
"name": "name.txt",
"employee_id": "1AayjkI2"
}
Attribute | Type | Required | Description |
---|---|---|---|
file_url | string | true | A URL pointing to a publicly accessible file. |
employee_file_category_id | string | true | Employee file category id |
date | string | false | Creation date of the file. |
name | string | false | The name of the file. |
employee_id | string | true | Employee id |
Response
The created employee file.
- Example
- Schema
{
"id": "ez82OOYg",
"employee_id": "A96eZlzn",
"employee_file_category_id": "A96ey16n",
"date": "2025-01-01",
"display_name": "name.txt",
"name": "name.txt",
"file_url": "http://onboard.org/file.txt",
"file_name": "file.txt",
"file_size": 4,
"file_content_type": "text/plain",
"created_at": "2025-05-13T10:24:00.300Z",
"updated_at": "2025-05-13T10:24:00.300Z"
}
Attribute | Type | Description |
---|---|---|
id | string | Employee file id. |
created_at | timestamp | Creation timestamp. |
updated_at | timestamp | Last update timestamp. |
employee_file_category_id | string | Id of the employee file category the file is in. Null when file is not assigned to any category. |
date | string | Creation date of the file. |
name | string | Customizable name of the file. |
file_url | string | Temporary url to the file. |
file_name | string | Name of the file. |
file_size | int | Size of the file in bytes. |
file_content_type | string | Content Type of the file. |
Unprocessable Entity. Example:
{
"file": [
"could not download file: 403 \"Forbidden\"",
"Dieses Feld ist verpflichtend."
]
}