> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gcore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change restream

> Updates restream settings, such as the target URI or active status



## OpenAPI

````yaml /api-reference/services_docs_mintlify/streaming_api.yaml patch /streaming/restreams/{restream_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Streaming API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: a41613cd4a9e
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: AI
  - name: Broadcasts
  - name: Directories
  - name: Overlays
  - name: Players
  - name: Playlists
  - name: QualitySets
  - name: Restreams
  - name: Statistics
  - name: Streams
  - name: Subtitles
  - name: Videos
paths:
  /streaming/restreams/{restream_id}:
    patch:
      tags:
        - Restreams
      summary: Change restream
      description: Updates restream settings, such as the target URI or active status
      operationId: patch_restreams_id
      parameters:
        - name: restream_id
          in: path
          description: Restream ID
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                restream:
                  $ref: '#/components/schemas/createRestream'
        required: false
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/restream'
        '422':
          description: |-
            Possible error messages:   
             **{ "errors": { "stream": [ "must exist" ] } }**   
             A stream with such ID was deleted or hasn't been created yet.   
             **{ "errors": { "stream": [ "does not belong to the same client " ] } }**   
             A stream with specified ID belongs to another client. **{ "errors": { "uri": [ "invalid uri, supported protocols are rtmp, rtmps, srt" ] } }**   
             A *uri* parameter input protocol is not supported
          content: {}
components:
  schemas:
    createRestream:
      type: object
      properties:
        name:
          type: string
          description: Restream name
        live:
          type: boolean
          description: >-
            Indicates that the stream is being published. Has two possible
            values:


            - **true** — stream is being published

            - **false** — stream isn't published
        active:
          type: boolean
          description: |-
            Enables/Disables restream. Has two possible values:

            - **true** — restream is enabled and can be started
            - **false** — restream is disabled.

              
            Default is true
        uri:
          type: string
          description: >-
            A URL to push the stream to. Supported protocols: rtmp, rtmps, srt.
            For SRT target URLs, only `mode=caller` is supported.
          example: srt://example.com:1234?mode=caller
        stream_id:
          type: integer
          description: ID of the stream to restream
        client_user_id:
          type: integer
          description: Custom field where you can specify user ID in your system
      example:
        name: first restream
        active: true
        uri: rtmp://a.rtmp.youtube.com/live/k17a-13s8
        stream_id: 20
        client_user_id: 10
    restream:
      allOf:
        - $ref: '#/components/schemas/createRestream'
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````