Skip to content

Delete a live session's files

DELETE
/v1/live/channels/{id}/sessions/{session_id}
curl --request DELETE \
--url https://api.iomza.com/v1/live/channels/example/sessions/example \
--header 'Authorization: Bearer <token>'

Deletes the session’s video in the background, within minutes (it is deleted after 24 hours anyway); if it is the channel’s latest session, the playback URLs stop playing it. The session stays in the history, with deleted_at. A session on air can’t be deleted: stop the channel first.

id
required
string
session_id
required
string

The session.

Media typeapplication/json

One session of a channel: from an encoder connecting to it leaving.

object
id
required
string
object
required
string
Allowed value: live_session
channel_id
required
string
started_at
required
string format: date-time
ended_at
required

null while live.

string | null format: date-time
end_reason
required
Any of:

Why a session ended, as customers see it.

string
Allowed values: disconnect limit stopped blocked error
duration_seconds
required

Its length, in seconds; null while live.

number | null
has_audio
required

Whether the signal has audio; null until known, in the first minute. Sessions from before it was reported answer null too.

boolean | null
ingest_protocol
required
Any of:

How an encoder reaches ingest.

string
Allowed values: rtmp rtmps srt
stops_for_balance_at
required

When the stream will be stopped because the organization’s balance is used up; null while it has one.

string | null format: date-time
recorded
required

Whether it was kept whole.

boolean
deleted_at
required

When its files were deleted (DELETE …/sessions/{session_id}); null while kept. Files are kept 24 hours anyway.

string | null format: date-time

Example

{
"object": "live_session",
"end_reason": "disconnect",
"ingest_protocol": "rtmp"
}

The API key is missing, invalid or revoked.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Valid credentials that may not do this (forbidden), your plan doesn’t include the module the route belongs to (module_not_in_plan), or your organization is suspended (organization_suspended).

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

It doesn’t exist in your organization.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Its state doesn’t allow it (a finished job, an Idempotency-Key reused with another body…).

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Too many requests: wait and retry. Answered by the gateway, so the body may differ.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Ours: retry, and tell us if it persists.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Momentarily unavailable: retry in a few seconds.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}