Skip to main content
POST
/
api
/
file
curl --request POST \
  --url https://api.harmonyforstaffing.com/api/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/resume.pdf' \
  --form 'fileName=resume.pdf' \
  --form 'contentType=application/pdf' \
  --form 'candidateId=456' \
  --form 'type=resume' \
  --form 'description=Updated resume March 2024'
{
  "id": 999,
  "url": "https://storage.harmonyforstaffing.com/files/resume-123.pdf",
  "fileName": "resume-123.pdf",
  "contentType": "application/pdf",
  "size": 1048576,
  "candidateId": 456,
  "type": "resume",
  "description": "Updated resume March 2024",
  "createdAt": "2024-03-19T18:30:00Z"
}
Upload a file attachment associated with a candidate, job, or job submission. Supports both multipart form-data and base64 encoded files.

Body Parameters

file
file
The file to upload (when using multipart/form-data)
base64Content
string
Base64 encoded file content (when not using multipart/form-data)
fileName
string
required
Name of the file including extension
contentType
string
required
MIME type of the file (e.g., “application/pdf”, “image/jpeg”)
candidateId
number
ID of the associated candidate (if applicable)
type
string
required
Type of file being uploaded (e.g., “resume”, “certification”, “contract”)
description
string
Optional description of the file

Response

id
number
The unique identifier for the uploaded file
url
string
URL where the file can be accessed
createdAt
string
Timestamp of when the file was uploaded
curl --request POST \
  --url https://api.harmonyforstaffing.com/api/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/resume.pdf' \
  --form 'fileName=resume.pdf' \
  --form 'contentType=application/pdf' \
  --form 'candidateId=456' \
  --form 'type=resume' \
  --form 'description=Updated resume March 2024'
{
  "id": 999,
  "url": "https://storage.harmonyforstaffing.com/files/resume-123.pdf",
  "fileName": "resume-123.pdf",
  "contentType": "application/pdf",
  "size": 1048576,
  "candidateId": 456,
  "type": "resume",
  "description": "Updated resume March 2024",
  "createdAt": "2024-03-19T18:30:00Z"
}