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

# Updates siprec session for a call

> Updates siprec session identified by siprec_sid.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/texml/siprec.yml post /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.json
openapi: 3.1.0
info:
  title: Telnyx TeXML Siprec API
  version: 2.0.0
  description: API for managing TeXML Siprec.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Command
    description: TeXML command operations
  - name: Callbacks
    description: Webhook callbacks for call events
paths:
  /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.json:
    post:
      tags:
        - TeXML REST Commands
      summary: Updates siprec session for a call
      description: Updates siprec session identified by siprec_sid.
      operationId: UpdateTeXMLSiprecSession
      parameters:
        - $ref: '#/components/parameters/AccountSid'
        - $ref: '#/components/parameters/CallSid'
        - $ref: '#/components/parameters/SiprecSid'
      requestBody:
        $ref: '#/components/requestBodies/TexmlUpdateSiprecSessionRequest'
      responses:
        '200':
          $ref: '#/components/responses/TexmlUpdateSiprecSessionResponse'
        '404':
          $ref: '#/components/responses/call-scripting_NotFoundResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.texml.accounts.calls.siprec.siprecSidJson('siprec_sid', {
              account_sid: 'account_sid',
              call_sid: 'call_sid',
            });


            console.log(response.account_sid);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.texml.accounts.calls.siprec.siprec_sid_json(
                siprec_sid="siprec_sid",
                account_sid="account_sid",
                call_sid="call_sid",
            )
            print(response.account_sid)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Texml.Accounts.Calls.Siprec.SiprecSidJson(\n\t\tcontext.TODO(),\n\t\t\"siprec_sid\",\n\t\ttelnyx.TexmlAccountCallSiprecSiprecSidJsonParams{\n\t\t\tAccountSid: \"account_sid\",\n\t\t\tCallSid:    \"call_sid\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.AccountSid)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonParams;

            import
            com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    SiprecSiprecSidJsonParams params = SiprecSiprecSidJsonParams.builder()
                        .accountSid("account_sid")
                        .callSid("call_sid")
                        .siprecSid("siprec_sid")
                        .build();
                    SiprecSiprecSidJsonResponse response = client.texml().accounts().calls().siprec().siprecSidJson(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.texml.accounts.calls.siprec.siprec_sid_json(
              "siprec_sid",
              account_sid: "account_sid",
              call_sid: "call_sid"
            )

            puts(response)
        - lang: CLI
          source: |-
            telnyx texml:accounts:calls:siprec siprec-sid-json \
              --api-key 'My API Key' \
              --account-sid account_sid \
              --call-sid call_sid \
              --siprec-sid siprec_sid
components:
  parameters:
    AccountSid:
      name: account_sid
      in: path
      required: true
      description: The id of the account the resource belongs to.
      schema:
        type: string
    CallSid:
      name: call_sid
      in: path
      required: true
      description: The CallSid that identifies the call to update.
      schema:
        type: string
    SiprecSid:
      name: siprec_sid
      in: path
      required: true
      description: The SiprecSid that uniquely identifies the Sip Recording.
      schema:
        type: string
  requestBodies:
    TexmlUpdateSiprecSessionRequest:
      content:
        application/x-www-form-urlencoded:
          schema:
            $ref: '#/components/schemas/TexmlUpdateSiprecSessionRequestBody'
      description: Updates a SIPREC session.
  responses:
    TexmlUpdateSiprecSessionResponse:
      description: Successful SIPREC session update response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TexmlUpdateSiprecSessionResponseBody'
    call-scripting_NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/call-scripting_ResourceNotFoundError'
  schemas:
    TexmlUpdateSiprecSessionRequestBody:
      type: object
      title: Update Siprec Session Request
      properties:
        Status:
          description: >-
            The new status of the resource. Specifying `stopped` will end the
            siprec session.
          example: stopped
          enum:
            - stopped
          type: string
    TexmlUpdateSiprecSessionResponseBody:
      type: object
      title: Update Siprec Session Response
      properties:
        account_sid:
          type: string
          description: The id of the account the resource belongs to.
          example: 61bf923e-5e4d-4595-a110-56190ea18a1b
        call_sid:
          type: string
          description: The id of the call the resource belongs to.
          example: v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ
        sid:
          description: The SID of the siprec session.
          example: 61bf923e-5e4d-4595-a110-56190ea18123
          type: string
        date_updated:
          description: The date and time the siprec session was last updated.
          example: Fri, 11 Aug 2023 19:12:11 +0000
          type: string
        status:
          description: The status of the siprec session.
          example: in-progress
          type: string
          enum:
            - in-progress
            - stopped
        uri:
          description: The URI of the siprec session.
          example: >-
            https://api.telnyx.com/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18123/Calls/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-ai/Siprec/61bf923e-5e4d-4595-a110-56190ea18123
          type: string
        error_code:
          description: The error code of the siprec session.
          type: string
    call-scripting_ResourceNotFoundError:
      type: object
      title: Resource not found
      example:
        errors:
          - detail: Resource not found
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````