# Workflow Run Event

POST

Sent when a workflow run finishes, fails or is cancelled.

## Authorizations

* **[bearerAuth](/docs/v2/rest-api#bearerauth)**
* **[oauth2](/docs/v2/rest-api#oauth2)**

## Request Bodyrequired

_WorkflowRunWebhookEvent_

Delivered when a workflow run reaches a terminal state.

object

**id**

required

_Id_

Unique event id, repeated in the webhook-id header.

string

**type**

required

_WebhookEventType_

Workflow\_run.succeeded, workflow\_run.failed or workflow\_run.cancelled.

string

Allowed values: inference.completed inference.failed inference.cancelled training.succeeded training.failed scoring\_run.completed scoring\_run.failed workflow\_run.succeeded workflow\_run.failed workflow\_run.cancelled

**created\_at**

required

_Created At_

When the event was raised (RFC 3339).

string

**data**

required

_GetWorkflowRunOutput_

Identical to the body of GET on the workflow run.

object

**run\_id**

required

_Run Id_

Unique identifier for this workflow run.

string format: uuid

**status**

required

_BlueprintRunStatus_

Current status: pending, running, success, failure, or cancelled.

string

Allowed values: pending running success failure cancelled

**poll\_interval\_seconds**

_Poll Interval Seconds_

Suggested polling interval in seconds. Present while PENDING or RUNNING.

integer

nullable

**steps**

_Steps_

Status of each step composing the workflow run.

Array<object>

default: 

_GetWorkflowRunStep_object

**name**

required

_Name_

The name of the workflow step

string

**status**

required

_BlueprintRunStatus_

The execution status of the step: pending, running, success, failure, or cancelled.

string

Allowed values: pending running success failure cancelled

**error**

_Error_

The error details if any

string

nullable

**error\_code**

_Error Code_

Machine-readable error code if the step failed.

string

nullable

**estimated\_price\_creative\_units**

_Estimated Price Creative Units_

Estimated Creative Units price. Present when available.

number

nullable

**completed\_at**

_Completed At_

Completion timestamp. Present only on SUCCESS.

string format: date-time

nullable

**actual\_price\_creative\_units**

_Actual Price Creative Units_

Actual Creative Units price charged. Present only on SUCCESS.

number

nullable

**outputs**

_Outputs_

Generated assets. Present only on SUCCESS.

Array<object>

nullable

_WorkflowRunAsset_object

**object\_id**

required

_Object Id_

Unique identifier of the generated object.

string format: uuid

**object\_type**

required

_LibraryObjectType_

Type of generated object: file or asset.

string

Allowed values: directory file asset style blueprint skill

**file\_id**

_File Id_

File ID — pass directly as input to forge or workflow runs without re-uploading.

string format: uuid

nullable

**url**

required

_Url_

Download URL for the asset.

string

**content\_type**

required

_Content Type_

MIME type, e.g. image/png or video/mp4.

string

**preview\_url**

_Preview Url_

Image preview URL.

string

nullable

**width**

_Width_

Width in pixels.

integer

nullable

**height**

_Height_

Height in pixels.

integer

nullable

**duration\_seconds**

_Duration Seconds_

Duration in seconds for video assets.

number

nullable

**file\_size\_bytes**

_File Size Bytes_

File size in bytes.

integer

nullable

**metadata**

Any of:

**FileMetadataView**

_FileMetadataView_

What an engine needs beyond the image to build a resource from a file. Each kind is null when absent.

object

**tile**

Any of:

**null**

_TileMetadataView_

Where a game tile’s sprite sits on its grid, in the sprite’s own pixels from its top-left corner.

object

**shape**

required

_TileShape_

The outline of one grid cell seen from straight above.

string

Allowed values: SQUARE HEXAGON

**orientation**

required

_TileOrientation_

How the cell is turned to the camera: DIAMOND or ALIGNED for a square, POINTY\_TOP or FLAT\_TOP for a hexagon.

string

Allowed values: DIAMOND ALIGNED POINTY\_TOP FLAT\_TOP

**elevation**

required

_Elevation_

Camera tilt in degrees above the ground plane; 90 is straight down.

number

**facing**

required

_Facing_

Quarter turn of the camera around the tile, in degrees clockwise seen from above: 0, 90, 180, or 270\. A hexagon is only drawn facing 0.

integer

**footprint\_width**

required

_Footprint Width_

Cells the footprint covers across (the base’s right-hand edge) at facing 0.

integer

**footprint\_depth**

required

_Footprint Depth_

Cells the footprint covers deep (the base’s left-hand edge) at facing 0.

integer

**height**

required

_Height_

Wall height in cell sides: 0 is a flat ground tile, 1 a cube on a square.

number

**tile\_width**

required

_Tile Width_

Width in pixels of one cell’s base outline in the sprite.

integer

**tile\_height**

required

_Tile Height_

Height in pixels of one cell’s base outline in the sprite.

integer

**anchor**

required

_TilePointView_

The point the tile is placed by: the bottom centre of the cell it stands on (the front cell of a footprint wider than one).

object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**cell\_center**

required

_TilePointView_

The centre of the anchor’s cell. Godot and Unity pin a tile here rather than at the anchor.

object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**base\_outline**

required

_Base Outline_

The footprint’s whole base outline, clockwise on screen from the anchor’s vertex or edge.

Array<object>

_TilePointView_object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**subject\_id**

_Subject Id_

What the tile shows. Every facing of one subject shares it, so a tileset can group them.

string format: uuid

nullable

**TileMetadataView**

null

**nine\_slice**

Any of:

**null**

_NineSliceMetadataView_

The insets a 9-slice draws a UI element by, in the image’s own pixels in from each edge.

The corners are drawn at their own size, the edges stretch along their length, and the centre stretches both ways.

object

**left**

required

_Left_

Pixels in from the left edge.

integer

**top**

required

_Top_

Pixels in from the top edge.

integer

**right**

required

_Right_

Pixels in from the right edge.

integer

**bottom**

required

_Bottom_

Pixels in from the bottom edge.

integer

**source**

required

_NineSliceSource_

DETECTED when measured off the pixels, USER when a person set the insets.

string

Allowed values: DETECTED USER

**NineSliceMetadataView**

null

**sprite\_sheet**

Any of:

**null**

_SpriteSheetMetadataView_

The frame grid a sprite sheet was packed on, in the sheet’s own pixels from its top-left corner.

Cells start `margin` pixels in from the sheet’s edges with `spacing` pixels between them.

object

**columns**

required

_Columns_

Cells across.

integer

**rows**

required

_Rows_

Cells down.

integer

**cell\_width**

required

_Cell Width_

Width of one cell in pixels.

integer

**cell\_height**

required

_Cell Height_

Height of one cell in pixels.

integer

**margin**

required

_Margin_

Pixels between the sheet’s edges and the outer cells.

integer

**spacing**

required

_Spacing_

Pixels between neighbouring cells.

integer

**frames**

required

_Frames_

The frames, in play order: left to right, then top to bottom, unless the list orders them otherwise.

Array<object>

_SpriteSheetFrameView_

One frame’s rect on the sheet, in the sheet’s own pixels from its top-left corner.

object

**index**

required

_Index_

The frame’s cell in reading order over the whole grid (left to right, then top to bottom). Cells that hold no frame are left out, so indexes can skip.

integer

**x**

required

_X_

The frame’s left edge on the sheet, in pixels.

integer

**y**

required

_Y_

The frame’s top edge on the sheet, in pixels.

integer

**w**

required

_W_

The frame’s width in pixels.

integer

**h**

required

_H_

The frame’s height in pixels.

integer

**anchor**

Any of:

**SpriteSheetMetadataView**

_TilePointView_object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**null**

null

**animations**

required

_Animations_

Named animations over the frames. When empty, play the sheet as one animation named `default` over every frame in `frames` order, at 12 fps, looping.

Array<object>

_SpriteSheetAnimationView_object

**name**

required

_Name_

The animation’s name.

string

**frames**

required

_Frames_

Frame indexes (`frames[].index`), in play order.

Array<integer>

**fps**

required

_Fps_

Frames per second.

number

**loop**

required

_Loop_

Whether the animation restarts after its last frame.

boolean

**TilePointView**

null

**null**

null

**error**

_Error_

Error message. Present only on FAILURE.

string

nullable

**error\_code**

_Error Code_

Machine-readable error code. Present only on FAILURE. Balance-related values: `BlueprintInsufficientBalanceError` (the workspace ran out of Creative Units — top up and resubmit), `BlueprintBalanceUnavailableError` (the balance could not be verified, retry later) and `BlueprintUsageLimitExceededError` (the member who started the run is past their usage limit: ask a workspace admin for more, or wait for it to reset).

string

nullable

**webhook**

Any of:

**WebhookStatusView**

_WebhookStatusView_

What a job’s `GET` reports about the callback attached to it.

The URL is echoed so a caller can tell which of its endpoints a run was aimed at; the rest is how the delivery went, which is the only place a failed delivery is visible.

object

**url**

required

_Url_

The callback URL this run was submitted with.

string

**status**

required

_WebhookDeliveryStatus_

Pending until a delivery settles, then delivered or failed.

string

Allowed values: pending delivered failed

**attempts**

required

_Attempts_

How many delivery attempts have been made.

integer

**last\_attempt\_at**

_Last Attempt At_

When the last attempt was made.

string format: date-time

nullable

**last\_response\_status**

_Last Response Status_

HTTP status the receiver returned on the last attempt, if it responded.

integer

nullable

**last\_error**

_Last Error_

Why the last attempt did not succeed. Null once delivered.

string

nullable

**null**

null

**metadata**

_Metadata_

Whatever you sent as webhook.metadata.

object

**_key_**

additional properties

string

## Responses

### 200

Successful Response

##### Examplegenerated

```json
example
```

### 422

Validation Error

_HTTPValidationError_object

**detail**

_Detail_

Array<object>

_ValidationError_object

**loc**

required

_Location_

Array

**msg**

required

_Message_

string

**type**

required

_Error Type_

string

**input**

_Input_

**ctx**

_Context_object

##### Examplegenerated

```json
{
  "detail": [
    {
      "loc": [
        "example"
      ],
      "msg": "example",
      "type": "example",
      "input": "example",
      "ctx": {}
    }
  ]
}
```
