VocalDocscontracts 1.65.0

Issue a URL of a job's result file

POST /v1/jobs/{job_id}/result-url

PropertyValue
Operationcreate_job_result_url
GroupJobs
Scopejobs:read
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited platform.job.result_url (mutation)
Released in1.52.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers a URL of the result file of a succeeded job, valid for 5 minutes (a target); the file is kept 7 days (a target). A job with no result file, or not succeeded, is 409 job_result_not_available. The issuance writes an Audit event, a content read when the file holds content (1.52.0). The api also requires the permission JOB_TYPE_PERMISSIONS names for the job type (webhooks:write for webhook.replay); a job the caller lacks it for is not_found to it and absent from its list.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the jobs:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/jobs/job_.../result-url" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Parameters

NameInTypeRequiredDescription
job_idpathJobIdyesThe id of an asynchronous job: job_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Responses

StatusContent typeShapeError codes
200application/jsonJobResultUrl
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopejob_result_not_available, idempotency_in_progress, idempotency_key_reused
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is JobResultUrl.

FieldTypeRequiredDescription
expires_atTimestampyes
object"job_result_url"yes
urlstring (uri)yesA URL of the result file, valid for 5 minutes (a target).