Skip to main content
POST
/
company
/
documents
Create Company Document
curl --request POST \
  --url https://api.roostedhr.com/api/1_12/company/documents \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "file": "aSDinaTvuI8gbWludGxpZnk=",
  "name": "<string>"
}
'
{
  "id": 123,
  "name": "Weekly Payroll",
  "file_name": "Weekly_Payroll_2023",
  "location": "https://schedulehead-files.nyc3.digitaloceanspaces.com/Weekly_Payroll_2023.pdf",
  "date_added": "Dec 12th",
  "type": "application/pdf",
  "deleted": 0,
  "date_deleted": null
}
The request body should be sent as application/json with the file content as a binary string. All four fields (name, file, type, file_name) are required.

Authorizations

X-API-KEY
string
header
required

Body

application/json

Company Document Body

file
string<byte>
required

Base64-encoded file content

name
string

Document name (optional, defaults to 'document.{extension}')

Response

Created

id
integer

Unique document identifier

name
string

Display name of the document

file_name
string

Original file name

location
string

URL to the stored document file

date_added
string

Date the document was uploaded

type
string

MIME type of the document (e.g. application/pdf, image/png)

deleted
integer

Soft-delete flag (0 = active, 1 = deleted)

date_deleted
string<date-time> | null

Timestamp when the document was soft-deleted, or null if active