Begin a file upload
Get a resumable upload URL for an attached file. Upload directly to storage, then call attachment_commit.
/api/v1/jobs/{job_id}/attachment-uploadsStart the upload once
This creates a fresh resumable upload URL. Do not retry it automatically. Transfer bytes directly to the returned URL, then commit the returned handle. The origin must be in the upload allowlist.
Request
Examples use sample IDs and upload handles. Replace them with values returned for your assigned work before making a call.
curl -X POST 'https://talent.radioworkflow.com/api/v1/jobs/4501/attachment-uploads' \
-H "Authorization: Bearer $TALENT_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"file_name":"notes.pdf","size":1024,"origin":"https://talent.radioworkflow.com"}'Request fields
All requests use a bearer API key. Send body fields as application/json.
job_idpathRequiredstring
Pattern: ^[1-9][0-9]{0,9}$
file_namebodyRequiredstring
Min length: 1 · Max length: 255 · Pattern: ^[^/\\\u0000-\u001f\u007f]+$
sizebodyRequiredinteger
Min: 1 · Max: 9007199254740991
originbodyRequiredstring
Min length: 1 · Max length: 200
Complete request schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"job_id": {
"type": "string",
"pattern": "^[1-9][0-9]{0,9}$"
},
"file_name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$"
},
"size": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"origin": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"job_id",
"file_name",
"size",
"origin"
],
"additionalProperties": false
}Response
HTTP 200 returns a JSON object. Read ok before using its fields. IDs are decimal strings, instants are Unix seconds, and a missing value is null.
- ok
- true
- api_version
- "1"
- upload
- object
Complete response schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"const": true
},
"api_version": {
"type": "string",
"const": "1"
},
"upload": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"upload_url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"chunk_size": {
"type": "number",
"const": 8388608
},
"expires_at": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"handle",
"upload_url",
"content_type",
"chunk_size",
"expires_at"
],
"additionalProperties": false
}
},
"required": [
"ok",
"api_version",
"upload"
],
"additionalProperties": false
}