# Stream Edit

Edit single stream in project

Reference API link: https://api.mov.mediaoutcast.com/documentation#/Streams/stream_update (opens new window)

PUT

/api/streams/{stream_id}

KEY TYPE DESCRIPTION
title string optional If not provided it will use file name
description string optional Stream description
category integer optional Stream Category, like "Sport", "SF movies" Reference API link (opens new window)
countries array optional Array of Country ids or codes where stream can be played Reference API link (opens new window)
tags array optional Tag for stream, like "Sport", "Shocker", "Manchester United". If ID is provided it will only link to already created tag, if "name" is provided it will create new tag and link to this stream
resolutions array optional Array of resolution ids. Reference API link (opens new window)
player integer optional Player ID Reference API link (opens new window)

Request body:

{
  "title": "string",
  "description": "string",
  "category": 1,
  "countries": [
    6290252,
    "RS"
  ],
  "tags": [
    {
      "id": 1
    },
    {
      "name": "New tag"
    }
  ],
  "resolutions": [
    1,
    2,
    3
  ],
  "player": 1
}

Response:

{
  "message": "Stream updated.",
  "stream": {
    "id": 81,
    "hash": "Kxe9jn8L",
    "title": "New Live Stream update",
    "description": "New Live Stream update",
    "application": "live",
    "stream": "Kxe9jn8L_6a14d96d-18d3-4793-9d1e-5c0372262f0e",
    "published": true,
    "resolutions": [
      {
        "id": 4,
        "name": "720p",
        "active": true
      },
      {
        "id": 5,
        "name": "480p",
        "active": true
      },
      {
        "id": 6,
        "name": "360p",
        "active": true
      }
    ],
    "tags": [
      {
        "id": 1,
        "name": "kuća"
      },
      {
        "id": 39,
        "name": "New tag"
      }
    ],
    "category": null,
    "countries": [
      {
        "id": 6290252,
        "code": "RS",
        "name": "Serbia"
        }
    ],
    "rtmps_url": "rtmps://stream.mediaoutcast.com/live/Kxe9jn8L_6a14d96d-18d3-4793-9d1e-5c0372262f0e",
    "rtmp_url": "rtmp://stream.mediaoutcast.com/live/Kxe9jn8L_6a14d96d-18d3-4793-9d1e-5c0372262f0e",
    "stream_url": "https://api.mov.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/index.m3u8",
    "published_url": "https://static.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/index.m3u8",
    "live": false,
    "live_channel": "stream.81",
    "live_event": "live",
    "receiving_count": 0,
    "processing": false,
    "paused": false,
    "web_socket_broadcaster": "pusher",
    "web_socket_key": "e35893989a0fe4e0c1ae",
    "web_socket_cluster": "eu",
    "image_urls": {
      "360p": "https://api.mov.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/posters/360p.jpg?1704889396",
      "720p": "https://api.mov.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/posters/720p.jpg?1704889396",
      "1080p": "https://api.mov.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/posters/1080p.jpg?1704889395"
    },
    "embed": {
      "iframe": "<iframe width=\"560\" height=\"315\" src=\"https://static.mediaoutcast.com/streams/Kxe9jn8L/stream.html\" title=\"New Live Stream update\" frameborder=\"0\" scrolling=\"no\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
      "script": "<script src=\"https://static.mediaoutcast.com/player/master/js/mov-init.min.js\" async></script>\n<mov-player project-id=\"VjJd68GD\" stream-id=\"Kxe9jn8L\"></mov-player>\n<script type=\"application/ld+json\">{\"@context\":\"http://schema.org/\",\"@type\":\"VideoObject\",\"name\":\"New Live Stream update\",\"description\":\"New Live Stream update\",\"thumbnailUrl\":[\"https://static.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/posters/360p.jpg?1704889396\"],\"uploadDate\":\"2024-01-10T12:28:58+01:00\",\"contentUrl\":\"https://static.mediaoutcast.com/storage/VjJd68GD/VjJd68GD/stream/Kxe9jn8L/index.m3u8\"}</script>\n",
      "link": "https://static.mediaoutcast.com/streams/Kxe9jn8L/stream.html"
    },
    "player": null,
    "backups": [
      {
        "id": 27,
        "name": "6a14d96d-18d3-4793-9d1e-5c0372262f0e",
        "rtmps_url": "rtmps://stream.mediaoutcast.com/live/Kxe9jn8L_6a14d96d-18d3-4793-9d1e-5c0372262f0e",
        "rtmp_url": "rtmp://stream.mediaoutcast.com/live/Kxe9jn8L_6a14d96d-18d3-4793-9d1e-5c0372262f0e",
        "publish": false,
        "live": false
      }
    ],
    "no_audio_stream": false
  }
}