For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
      • GETList jobs
      • POSTCreate a job
      • GETGet a job
      • PATCHUpdate a job
      • DELDelete a job
      • POSTExecute a job
      • GETGet a job's execution plan
      • PUTReplace a job's plan
      • PATCHUpdate a job's plan
      • POSTAcknowledge a job
      • POSTAcknowledge a job outcome
      • POSTComplete a job
      • POSTFail a job
      • POSTCancel a job
      • POSTRetry a failed job
      • POSTPreview a mutation
      • POSTSplit a job
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceJobs

Fail a job

POST
https://api.x.flatfile.com/v1/jobs/:jobId/fail
POST
/v1/jobs/:jobId/fail
$curl -X POST https://api.x.flatfile.com/v1/jobs/us_jb_YOUR_ID/fail \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "outcome": {
> "acknowledge": true,
> "buttonText": "Acknowledge",
> "next": {
> "type": "id",
> "id": "us_jb_YOUR_ID"
> },
> "heading": "Failed",
> "message": "Job failed"
> },
> "info": "Job was failed"
>}'
200Example0
1{
2 "data": {
3 "createdAt": "2023-10-30T20:04:28.556Z",
4 "createdBy": "us_usr_YOUR_ID",
5 "id": "us_jb_YOUR_ID",
6 "operation": "submitAction",
7 "source": "us_wb_YOUR_ID",
8 "type": "workbook",
9 "updatedAt": "2023-10-30T20:04:32.075Z",
10 "config": {},
11 "destination": "us_wb_YOUR_ID",
12 "environmentId": "us_env_YOUR_ID",
13 "fileId": "us_fl_YOUR_ID",
14 "finishedAt": "2023-10-30T20:04:32.074Z",
15 "info": "Starting job to submit action to webhook.site",
16 "input": {},
17 "managed": true,
18 "mode": "foreground",
19 "outcome": {
20 "message": "Data was successfully submitted to Webhook.site. Go check it out at https://example.site/example."
21 },
22 "progress": 100,
23 "spaceId": "us_sp_YOUR_ID",
24 "startedAt": "2023-10-30T20:04:29.453Z",
25 "status": "complete",
26 "subject": {
27 "type": "resource",
28 "id": "us_wb_YOUR_ID"
29 },
30 "trigger": "immediate"
31 }
32}
Fail a job and return the job
Was this page helpful?
Previous

Cancel a job

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

jobIdstringRequired
ID of job to return

Headers

X-Disable-Hooks"true"Required

Request

This endpoint expects an optional object.
outcomeobjectOptional
Outcome summary of a job
infostringOptional

Response

This endpoint returns an object.
dataobject
A single unit of work that will execute asynchronously