Rename a run, or change its labels

Updates a run's mutable metadata. Send `name`, `labels`, or both; a

PATCH /api/v1/runs/{runId}

Updates a run’s mutable metadata. Send name, labels, or both; a request carrying neither is a 400 rather than a silent no-op.

name replaces. labels merge — a null label value removes that key, and anything not mentioned is left alone. They differ because a name is a single value while labels are a set: requiring a full resend to change one label is how the other nineteen get dropped.

This is deliberately not the same as PATCH /flows/{flowId}/sessions/{sessionId}/config, which replaces. That endpoint handles credentials, where a half-applied change is dangerous.

Returns the resulting name and the complete merged label set, so you never have to guess what the run now holds.

Authentication

Requires a project API key — see Authentication.

Parameters

NameInTypeRequiredDescription
runIdpathstringrequiredUUID of the run.

Request body

FieldTypeRequiredDescription
namestringoptionalHuman-readable name, shown in the dashboard. Without one a run is displayed by its trigger — “API Run”, “Chat Session”.
labelsobjectoptional

Responses

StatusDescription
200The run’s resulting metadata.
400Request body or query parameters failed validation.
404Resource not found or not accessible to this project.

Tag: Runs