POST
/
unified
/
ats
/
applications
/
{id}
/
documents
/
upload
curl --request POST \
  --url https://api.stackone.com/unified/ats/applications/{id}/documents/upload \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '{
  "name": "weather-forecast",
  "file_format": {
    "value": "pdf",
    "source_value": "abc"
  },
  "content": "VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE",
  "category_id": "6530",
  "path": "/path/to/file",
  "category": {
    "value": "reports, resumes",
    "source_value": "550e8400-e29b-41d4-a716-446655440000, CUSTOM_CATEGORY_NAME"
  },
  "confidential": {
    "value": "true",
    "source_value": "public"
  }
}'
{
  "statusCode": 201,
  "message": "Employee created successfully",
  "timestamp": "2021-01-01T01:01:01.000Z",
  "provider_errors": [
    {
      "status": 400,
      "url": "https://api.someprovider.com/v1/endpoint",
      "raw": {
        "error": "Bad Request",
        "message": "The supplied data is invalid"
      },
      "headers": {
        "date": "Tue, 02 Apr 2024 13:52:01 GMT",
        "content-type": "application/json; charset=utf-8",
        "transfer-encoding": "chunked",
        "connection": "close"
      }
    }
  ],
  "unified_warnings": [
    {
      "message": "The provided field type is not supported in the current model."
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Path Parameters

id
string
required

Body

application/json
name
string | null

The filename of the file to upload

Example:

"weather-forecast"

file_format
object

The file format of the file

content
string | null

The base64 encoded content of the file to upload

Example:

"VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE"

category_id
string | null

The categoryId of the documents

Example:

"6530"

path
string | null

The path for the file to be uploaded to

Example:

"/path/to/file"

category
object

The category object for associating uploaded files. If both an ID and a name are provided, the ID takes precedence.

confidential
object

The confidentiality level of the file to be uploaded

Response

201
application/json
The document related to the application with the given identifier was uploaded.
statusCode
number | null
Example:

201

message
string | null
Example:

"Employee created successfully"

timestamp
string | null
Example:

"2021-01-01T01:01:01.000Z"

provider_errors
object[] | null
Example:
[
  {
    "status": 400,
    "url": "https://api.someprovider.com/v1/endpoint",
    "raw": {
      "error": "Bad Request",
      "message": "The supplied data is invalid"
    },
    "headers": {
      "date": "Tue, 02 Apr 2024 13:52:01 GMT",
      "content-type": "application/json; charset=utf-8",
      "transfer-encoding": "chunked",
      "connection": "close"
    }
  }
]
unified_warnings
object[] | null
Example:
[
  {
    "message": "The provided field type is not supported in the current model."
  }
]