Pixid VMS Pro API Documentation

POST /v2/attachments — User Guide

1. Overview

POST /v2/attachments uploads one file and links it to one owner as an Attachment. The request is multipart/form-data: the file plus a few form fields. One file per request; there is no batch form.

Who can call it Notes
Client Region Its own Candidates: Direct Candidates and Candidates submitted by its Vendors.
Parent Client Candidates of its Client Regions.
Vendor Candidates it submitted, in Client Regions it works with.

Only a Candidate's Resume/CV can be uploaded today: entityTypeCode 1 with attachmentTypeCode 1. Every other combination is refused (see section 4).

Status When
201 Created The file was stored and linked to the Candidate.
400 Bad Request A check failed, the request was not sent over HTTPS, or the upload could not be completed.
413 Payload Too Large The file is larger than the size limit (10 MB by default, set by the API configuration), or the whole request body is over 10 MB (refused before any check, with no JSON body).
500 Internal Server Error entityTypeCode 2 (Compliance Response) was sent.

2. Before you start

3. Request body

Form fields

Field Type Required Rules Where to get values
file file Yes Not empty, at most 10 MB by default. See File rules. Supplied by you
entityId integer Yes The owner's id. For a Candidate: a Candidate your Organization can reach (see section 4). GET /v2/candidates → candidateId
entityTypeCode integer Yes 1 Candidate. Values 2–15 exist but cannot be uploaded today. GET /v2/lookups/attachment-entity-types
attachmentTypeCode integer Yes 1 Resume/CV. Values 2–13 exist but cannot be uploaded for a Candidate today. GET /v2/lookups/attachment-type
attachmentUseTypeCode integer No 1 Generic (default), 2 Justification. Checked, but not stored for a Candidate Attachment. GET /v2/lookups/attachment-use-type
description text No Up to 40 characters. Stored with the Attachment. Supplied by you

File rules

Rule Detail
Extension and content type The file name's extension and the part's Content-Type must be one of the pairs below.
Content The first bytes must match the format of the extension. A .txt or .csv file must not start like a PDF, Office, ZIP, RTF, executable or gzip file.
File name Up to 100 characters, with an extension. No .., / or \; no control characters; none of ! % @ * ' $ < > #. The name before the extension must not be CON, PRN, AUX, NUL, COM1–COM4 or LPT1–LPT4.
Blocked extensions .sh, .exe, .msi, .msp, .com, .jar, .bat, .cmd, .vb, .vbs, .vbe, .asp, .aspx, .js, .htm, .html.
Extension Content-Type
.pdf application/pdf
.doc, .dot application/msword
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.xls application/vnd.ms-excel
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.txt text/plain
.csv text/plain or text/csv

The accepted content types and blocked extensions are set by the API configuration; the lists above are the defaults.

4. Rules that depend on your Organization or permissions

If ... Then ... What to change
your API Key belongs to a Client Region The Candidate must belong to your Client Region and be a Direct Candidate or submitted by one of your Vendors. Otherwise "Candidate validation failed. Ensure entity exists and belongs to the correct organization." Send a Candidate of your Client Region.
your API Key belongs to a Parent Client The Candidate must belong to one of your Client Regions. Otherwise the same message. Send a Candidate of one of your Client Regions.
your API Key belongs to a Vendor The Candidate must have been submitted by you, in a Client Region you work with. Otherwise the same message. Send one of your own Candidates.
your API Key belongs to a Vendor and entityTypeCode is 13 (Requisition) "Requisition attachments not allowed for Vendor requests." Vendors cannot add Requisition Attachments.
entityTypeCode is 1 and attachmentTypeCode is not 1 The upload is refused: "Attachment linking not implemented for the given entity and attachment type.", or "An error occurred while uploading the attachment." for 2 (Cover Letter). Send 1 (Resume/CV).
entityTypeCode is 4 (Engagement) or 13 (Requisition) and the owner is found "An error occurred while uploading the attachment." Not available yet.
entityTypeCode is 2 (Compliance Response) 500 Internal Server Error. Not available yet.
entityTypeCode is 3, 5–12, 14 or 15 "Validate Entity Type code failed, missing value." Not available yet.
your Organization is not found, inactive, or not a Client or Vendor 400 with the Organization message in message and statusCode 403 in the body. Check your API Key and Secret.

5. Error reference

Checks run in this order and stop at the first group that fails: form fields, HTTPS, file present and size, your Organization, file rules, entityTypeCode, attachmentTypeCode, attachmentUseTypeCode, description, file content, owner. A file-rule failure lists every broken file rule at once.

Form fields (400)

These come back in the standard validation error object, keyed by field name.

Message What it means How to fix
EntityTypeCode must be a positive integer. Missing or 0 or less. Send 1.
AttachmentTypeCode must be a positive integer. Missing or 0 or less. Send 1.
The field Description must be a string or array type with a maximum length of '40'. description is too long. Send 40 characters or fewer.

Request

Message What it means How to fix
HTTPS is required for file uploads. The request was sent over HTTP. Use HTTPS.
No file provided. No file part, or the file is empty. Send a file with content.
File is too large. (413) Larger than the size limit. Send a smaller file.
Organization not found. / Organization is not active. / Organization must be of type Client or Vendor. Your Organization cannot be used. statusCode is 403. Check your API Key and Secret.
The vendor organization {org} does not have an active relationships with any client organizations. Your Vendor works with no Client Region. statusCode is 403. Ask the Client Region to set up the relationship.

File (message is File validation failed.; the reasons are in errors)

Message What it means How to fix
File has no extension. The file name has no extension. Add the extension.
File extension '{extension}' is not permitted. A blocked extension. Send an accepted file type.
File Content-Type header is missing. The file part has no Content-Type. Set it.
Content type '{contentType}' is not permitted. Not an accepted content type. See File rules.
Content type '{contentType}' does not match the expected type for extension '{extension}'. Possible file spoofing attempt. Extension and content type are not a listed pair. Send a matching pair.
File name is empty. No file name. Send a file name.
File name contains path traversal characters. The name contains .., / or \. Rename the file.
File name '{name}' uses a reserved Windows device name. For example CON.pdf. Rename the file.
File name contains null bytes or control characters. Control characters in the name. Rename the file.
File name contains prohibited characters: {characters}. One of ! % @ * ' $ < > #. Rename the file.
File name '{name}' exceeds the maximum length of 100 characters. Name too long. Shorten it.
File size {size} bytes exceeds the maximum allowed {max} bytes. Larger than the size limit. Send a smaller file.
EntityTypeCode '{code}' is not a supported attachment target. Supported values: {values}. Not 1–15. Send 1.
AttachmentTypeCode '{code}' is not a valid attachment type. Not 1–13. Send 1.
AttachmentUseTypeCode '{code}' is not a valid use type. Not 1 or 2. Send 1, 2, or leave it out.
File content for extension '{extension}' matches a disallowed binary format. Possible file spoofing attempt. A .txt or .csv file holds binary content. Send a real text file.
File content does not match the expected format for extension '{extension}'. Possible file spoofing attempt. The content is not the format the extension claims. Send the real file, or correct the extension.

Owner (message is Entity validation failed.; the reason is in errors)

Message What it means How to fix
Candidate validation failed. Ensure entity exists and belongs to the correct organization. The Candidate does not exist or your Organization cannot reach it. See section 4.
Requisition attachments not allowed for Vendor requests. A Vendor sent entityTypeCode 13. Do not send it.
Requisition validation failed. Ensure entity exists and belongs to the correct organization. The Requisition does not exist or is not yours. Check entityId.
Engagement validation failed. Ensure the engagement exists. The Engagement does not exist or your Organization cannot reach it. Check entityId.
Validate Entity Type code failed, missing value. Uploads are not available for this entityTypeCode. Send 1.

Saving

Message What it means How to fix
File failed virus scan and was rejected. The file failed the virus scan. Send a clean file.
Failed to save attachment record. The Attachment could not be saved. Send it again; contact support if it repeats.
Failed to save attachment file to resume root. The file could not be stored. Send it again; contact support if it repeats.
Failed to link attachment to Candidate record. The file could not be linked to the Candidate. Send it again; contact support if it repeats.
Attachment linking not implemented for the given entity and attachment type. See section 4. Send attachmentTypeCode 1.
An error occurred while uploading the attachment. The combination is not available yet, or an unexpected fault. statusCode is 500. See section 4; otherwise contact support.

6. Examples

Upload a Candidate's Resume/CV

POST /v2/attachments
Content-Type: multipart/form-data; boundary=----b

------b
Content-Disposition: form-data; name="file"; filename="jane-doe-cv.pdf"
Content-Type: application/pdf

<file bytes>
------b
Content-Disposition: form-data; name="entityId"

1001
------b
Content-Disposition: form-data; name="entityTypeCode"

1
------b
Content-Disposition: form-data; name="attachmentTypeCode"

1
------b
Content-Disposition: form-data; name="description"

Resume, March 2026
------b--

With curl:

curl -X POST "https://{host}/v2/attachments" \
  -F "file=@jane-doe-cv.pdf;type=application/pdf" \
  -F "entityId=1001" -F "entityTypeCode=1" -F "attachmentTypeCode=1" \
  -F "description=Resume, March 2026"

201 Created:

{
  "success": true,
  "message": "Attachment uploaded successfully.",
  "statusCode": 201,
  "errors": null,
  "data": {
    "attachmentId": 5001,
    "originalFileName": "jane-doe-cv.pdf",
    "fileSizeBytes": 48213,
    "uploadedAt": "2026-03-02T14:05:11Z"
  }
}

File rules broken

A file named cv#1.exe sent as application/octet-stream:

400 Bad Request:

{
  "success": false,
  "message": "File validation failed.",
  "statusCode": null,
  "errors": [
    "File extension '.exe' is not permitted.",
    "Content type 'application/octet-stream' is not permitted.",
    "File name contains prohibited characters: #."
  ],
  "data": null
}

Candidate not reachable

400 Bad Request:

{
  "success": false,
  "message": "Entity validation failed.",
  "statusCode": null,
  "errors": [
    "Candidate validation failed. Ensure entity exists and belongs to the correct organization."
  ],
  "data": null
}

7. Differences by request

Case Difference
Client Region vs Parent Client vs Vendor Only which Candidates can be reached; see section 4.
Single vs batch One file per request; send several requests for several files.
Upload vs GET description is stored but not returned by GET /v2/attachments/{entityId}.
Replacing a file Each upload adds a new Attachment; it never replaces an earlier one. There is no update or delete operation.
API v2 · Last updated 2026-11-25