CumulusDocs
Open Studio
On this page

Get a recording URL

Check recording availability and obtain a short-lived playback URL when it is ready.

Operation ID: runs.recording.

Request

GET /api/v1/runs/{run_id}/recording

  • TypeScript SDK: client.runs.recording (path arguments use path).
  • MCP tool: sdk_client_call with operationId: "runs.recording" (path arguments use input.path). Legacy alias: runs_recording. Connect to your authenticated /mcp endpoint with an API key for the same environment.
  • Minimum API key role: viewer.
  • Idempotency: No idempotency header required.

Read resource IDs from earlier responses and use a key for the same environment.

Request example

Set each path variable to an ID returned by an earlier API request.

Set CUMULUS_BASE_URL to your workspace API URL and CUMULUS_API_KEY to a key for that environment. Example values are synthetic.

cURL

curl
curl --fail-with-body -sS "${CUMULUS_BASE_URL%/}/api/v1/runs/${RUN_ID}/recording" \
  -H "Authorization: Bearer $CUMULUS_API_KEY"

TypeScript

typescript
import { Cumulus } from "@cumulus/sdk";

const baseUrl = process.env.CUMULUS_BASE_URL;
const apiKey = process.env.CUMULUS_API_KEY;
if (!baseUrl || !apiKey) throw new Error("Set CUMULUS_BASE_URL and CUMULUS_API_KEY");
const client = new Cumulus({ baseUrl, apiKey });

const response = await client.runs.recording({
  "path": {
    "run_id": "<run_id>"
  }
});

Input schema

Path, query and header parameters

run_id

path parameter · Required.

Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.

JSON request body

This operation has no JSON request body.

Complete OpenAPI schema
OpenAPI JSON
{
  "parameters": [
    {
      "name": "run_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
      }
    }
  ],
  "requestBody": null
}

Responses

HTTP 200

Get a short-lived recording URL

application/json

FieldType or valuesRequiredDescription and limits
run_idstring (uuid)RequiredRun identifier returned when the run was admitted. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
state"pending" · "recording" · "processing" · "ready" · "partial" · "failed" · "not_required" · "expired"Required—
urlstring (uri) or nullRequiredLink to play or share the recording: a signed URL, or the agent's unsigned public link when it opted out of signed URLs
url_expires_atstring (date-time) or nullRequiredpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
media_urlstring (uri) or nullRequiredDirect signed URL of the recording bytes, for your own clients to read the audio (for example to draw a waveform): valid for at most five minutes and pinned to the recorded version. Do not share it; read runs.recording again for a fresh one when it expires
media_url_expires_atstring (date-time) or nullRequiredWhen media_url stops working pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
contentobject or nullRequired—
content · combined section 1object—Fields for this schema branch.
content.artifact_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
content.sha256stringRequired in a non-null parentpattern: ^[a-f0-9]{64}$.
content.byte_sizeintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
content.media_typestringRequired in a non-null parentminLength: 1. maxLength: 128.
content.expires_atstring (date-time) or nullRequired in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.

Error responses

HTTPDescription
4XXTyped error (ApiError)
5XXTyped error (ApiError)

Errors use the shared error envelope. Inspect error.code, retryable, outcome and details before retrying.

Complete OpenAPI schema
OpenAPI JSON
{
  "200": {
    "description": "Get a short-lived recording URL",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunsRecordingResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

Referenced schemas

Expand the complete OpenAPI definitions for integrations that generate their own clients.

Complete OpenAPI schema
OpenAPI JSON
{
  "components": {
    "schemas": {
      "RunsRecordingResponse200": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "recording",
              "processing",
              "ready",
              "partial",
              "failed",
              "not_required",
              "expired"
            ]
          },
          "url": {
            "nullable": true,
            "description": "Link to play or share the recording: a signed URL, or the agent's unsigned public link when it opted out of signed URLs",
            "type": "string",
            "format": "uri"
          },
          "url_expires_at": {
            "nullable": true,
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "media_url": {
            "nullable": true,
            "description": "Direct signed URL of the recording bytes, for your own clients to read the audio (for example to draw a waveform): valid for at most five minutes and pinned to the recorded version. Do not share it; read runs.recording again for a fresh one when it expires",
            "type": "string",
            "format": "uri"
          },
          "media_url_expires_at": {
            "nullable": true,
            "description": "When media_url stops working",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "content": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ContentRef"
              }
            ]
          }
        },
        "required": [
          "run_id",
          "state",
          "url",
          "url_expires_at",
          "media_url",
          "media_url_expires_at",
          "content"
        ],
        "additionalProperties": false
      },
      "ContentRef": {
        "type": "object",
        "properties": {
          "artifact_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "media_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expires_at": {
            "nullable": true,
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "artifact_id",
          "sha256",
          "byte_size",
          "media_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}

Errors and recovery

See API error handling and Troubleshooting.

Content version f180b449Customer SDKMarkdown source
Get a recording URL · Cumulus developer docs