An attachment represents a successfully uploaded file that may or may not be associated with an candidate.
Relationships:
Candidate to Attachment is 1-Many
Create an attachment
POSThttps://endorsed.ai/api/v1/attachments
Creates a new attachment through a file upload and returns the attachment's UUID id. Parameters are shown as a Body but are accepted as FormData for Content-Type of multipart/form-data and request body for Content-Type of application/json.
Headers
Name
Type
Description
Authorization*
string
Authorization header containing the Bearer Access Token from the /auth/tokens endpoint. Example: Bearer <ACCESS_TOKEN>
Content-Type
string
Only supports multipart/form-data and application/json. Defaults to multipart/form-data if not set
Request Body
Name
Type
Description
candidate_id
string
The Candidate UUID from the /candidates entity resource. Field can be left optional for the rare case of attachments NOT directly associated with an candidate id; empty should ONLY be used in rare cases such as lookalike search.
remote_id*
string
The
id
of the attachment from the originating system
type*
string
Type of the attachment: Only currently supports about, resume, role_preferences, and work_experiences.
file
file
The file (binary format) to be uploaded. Required if Content-Type header is multipart/form-data; else should not be set.
public_file_url
string
The publicly accessible file url for Endorsed to download the file from. Required if Content-Type header is application/json; else should not be set.
{
"is_error": true,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"issues": [
{
"message": "An unexpected error occurred on our end. Please try again later, and if the problem persists, contact our support team"
}
]
}
}
{
"is_error": true,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"issues": [
{
"message": "An unexpected error occurred on our end. Please try again later, and if the problem persists, contact our support team"
}
]
}
}
Examples:
curl -X GET "${BASE_URL}/api/v1/attachments/remote.remote-id_from-originating-system" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"
curl -X GET "${BASE_URL}/api/v1/attachments/44e40fec-6144-4c86-b71a-857fb1c2c625" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"
Update or Upsert an attachment
PUThttps://endorsed.ai/api/v1/attachments/{id}
Updates or Upserts a new attachment through a file upload and returns the attachment's UUID id or remote id. Remote ids MUST be structured by remote.<id>.
Parameters are shown as a Body but are accepted as FormData for Content-Type of multipart/form-data and request body for Content-Type of application/json.
Path Parameters
Name
Type
Description
id*
string
UUID id or Remote Id of the Attachment. Remote ids MUST be structured by remote.<id>.
Headers
Name
Type
Description
Authorization*
string
Authorization header containing the Bearer Access Token from the /auth/tokens endpoint. Example: Bearer <ACCESS_TOKEN>
Content-Type
string
Only supports multipart/form-data and application/json. Defaults to multipart/form-data if not set
Request Body
Name
Type
Description
candidate_id
string
The Candidate UUID from the /candidates entity resource. Field can be left optional for the rare case of attachments NOT directly associated with an candidate id; empty should ONLY be used in rare cases such as lookalike search.
remote_id*
string
The
id
of the attachment from the originating system
type*
string
Type of the attachment: Only currently supports about, resume, role_preferences, and work_experiences.
file
file
The file (binary format) to be uploaded. Required if Content-Type header is multipart/form-data; else should not be set.
public_file_url
string
The publicly accessible file url for Endorsed to download the file from. Required if Content-Type header is application/json; else should not be set.
{
"is_error": true,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"issues": [
{
"message": "An unexpected error occurred on our end. Please try again later, and if the problem persists, contact our support team"
}
]
}
}
{
"is_error": true,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"issues": [
{
"message": "An unexpected error occurred on our end. Please try again later, and if the problem persists, contact our support team"
}
]
}
}