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

# Update a multistream



## OpenAPI

````yaml PATCH /multistream/target/{id}
openapi: 3.1.0
info:
  title: Livepeer API Reference
  description: |
    Welcome to the Livepeer API reference docs. Here you will find all the
    endpoints exposed on the standard Livepeer API, learn how to use them and
    what they return.
  version: 1.0.0
servers:
  - url: https://livepeer.studio/api
security:
  - apiKey: []
tags:
  - name: stream
    description: Operations related to livestream api
  - name: asset
    description: Operations related to asset/vod api
  - name: webhook
    description: Operations related to webhook api
  - name: multistream
    description: Operations related to multistream api
  - name: session
    description: Operations related to session api
  - name: room
    description: Operations related to rooms api
  - name: transcode
    description: Operations related to transcode api
  - name: metrics
    description: Operations related to metrics api
  - name: playback
    description: Operations related to playback api
  - name: accessControl
    description: Operations related to access control/signing keys api
  - name: task
    description: Operations related to tasks api
  - name: generate
    description: Operations related to AI generate api
paths:
  /multistream/target/{id}:
    parameters:
      - name: id
        description: ID of the multistream target
        in: path
        required: true
        schema:
          type: string
    patch:
      tags:
        - multistream
      summary: Update Multistream Target
      operationId: updateMultistreamTarget
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/multistream-target-patch-payload'
      responses:
        '204':
          description: Success
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-codeSamples:
        - lang: typescript
          label: updateMultistreamTarget
          source: |-
            import { Livepeer } from "livepeer";

            const livepeer = new Livepeer({
              apiKey: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await livepeer.multistream.update({
                url: "rtmps://live.my-service.tv/channel/secretKey",
              }, "<id>");

              // Handle the result
              console.log(result);
            }

            run();
        - lang: go
          label: updateMultistreamTarget
          source: "package main\n\nimport(\n\tlivepeergo \"github.com/livepeer/livepeer-go\"\n\t\"context\"\n\t\"github.com/livepeer/livepeer-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    s := livepeergo.New(\n        livepeergo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n    )\n\n    ctx := context.Background()\n    res, err := s.Multistream.Update(ctx, \"<id>\", components.MultistreamTargetPatchPayload{\n        URL: \"rtmps://live.my-service.tv/channel/secretKey\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: updateMultistreamTarget
          source: >-
            from livepeer import Livepeer


            s = Livepeer(
                api_key="<YOUR_BEARER_TOKEN_HERE>",
            )


            res = s.multistream.update(id="<id>",
            multistream_target_patch_payload={
                "url": "rtmps://live.my-service.tv/channel/secretKey",
            })


            if res is not None:
                # handle response
                pass
components:
  schemas:
    multistream-target-patch-payload:
      $ref: '#/components/schemas/multistream-target'
      required: []
    error:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: string
            example:
              - id not provided
              - Account not found
    multistream-target:
      type: object
      required:
        - url
      additionalProperties: false
      properties:
        id:
          type: string
          readOnly: true
          example: 09F8B46C-61A0-4254-9875-F71F4C605BC7
        name:
          type: string
        userId:
          type: string
          readOnly: true
          example: 66E2161C-7670-4D05-B71D-DA2D6979556F
          deprecated: true
        url:
          type: string
          writeOnly: true
          description: Livepeer-compatible multistream target URL (RTMP(S) or SRT)
          example: rtmps://live.my-service.tv/channel/secretKey
          format: uri
          pattern: ^(srt|rtmps?)://
        disabled:
          type: boolean
          description: |
            If true then this multistream target will not be used for pushing
            even if it is configured in a stream object.
        createdAt:
          type: number
          readOnly: true
          description: |
            Timestamp (in milliseconds) at which multistream target object was
            created
          example: 1587667174725
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````