post/streams/{stream_key}/preview/upload-url

Create stream preview upload URL

Creates a reusable PUT upload URL for updating the current thumbnail image for the stream.

create_stream_preview_upload_url

Parameters

NameInTypeDescription
stream_key*pathstringThe stream key

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "channel_id": {
      "$ref": "#/components/schemas/SnowflakeType"
    },
    "content_type": {
      "type": "string",
      "description": "MIME type of the thumbnail image"
    }
  },
  "required": [
    "channel_id"
  ]
}

Responses

200

Success

json
{
  "type": "object",
  "properties": {
    "upload_url": {
      "type": "string",
      "description": "URL used to upload the stream preview with a PUT request"
    },
    "method": {
      "type": "string",
      "enum": [
        "PUT"
      ],
      "description": "HTTP method to use for the upload URL"
    },
    "content_type": {
      "type": "string",
      "description": "MIME type that must be sent with the upload request"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO timestamp when the upload URL expires"
    },
    "expires_in": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647,
      "format": "int32",
      "description": "Number of seconds the upload URL remains valid"
    },
    "max_bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647,
      "format": "int32",
      "description": "Maximum supported preview image size in bytes"
    }
  },
  "required": [
    "upload_url",
    "method",
    "content_type",
    "expires_at",
    "expires_in",
    "max_bytes"
  ]
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
401

Unauthorized - Authentication is required or the token is invalid

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
403

Forbidden - You do not have permission to perform this action

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "RATE_LIMITED"
      ]
    },
    "message": {
      "type": "string"
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message",
    "retry_after"
  ]
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}