## Update a meeting recording

`client.Meeting.UpdateRecording(ctx, recordingID, params) (*MeetingUpdateRecordingResponse, error)`

**post** `/v1/meetings/{id}/recordings/{recordingId}`

A recording is one session of the meeting: its transcript and, when there is one, its audio or video. Recordings come from the Lightfield notetaker, Gong, Granola, or an upload. Only uploaded recordings can be created or given media through the API. Changes only what is sent. `isCanonical: true` makes the recording the meeting primary, for any provider. `mediaFileId` adds or replaces the audio or video of an uploaded recording; a replaced file is deleted. Notetaker, Gong and Granola recordings cannot be given media. Only meeting participants and workspace owners may update.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `meetings:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `recordingID string`

  Unique identifier of the recording.

- `params MeetingUpdateRecordingParams`

  - `ID param.Field[string]`

    Path param: Unique identifier of the meeting.

  - `IsCanonical param.Field[bool]`

    Body param: `true` pins this as the meeting's primary recording. Works for every provider, but the recording needs a transcript file (`transcript` is not null). `false` is rejected: to move the primary, set it on another recording.

  - `MediaFileID param.Field[string]`

    Body param: File ID of a completed upload with purpose `meeting_recording`. Adds or replaces the media; a replaced file is deleted. Uploaded recordings only.

### Returns

- `type MeetingUpdateRecordingResponse struct{…}`

  - `ID string`

    Unique identifier of the recording.

  - `IsCanonical bool`

    Whether this is the meeting's primary recording, the one summaries and `$transcript` use.

  - `Media MeetingUpdateRecordingResponseMedia`

    Playable audio or video. Null when the recording has none, such as a Granola note, a private Gong call, a failed notetaker recording or an upload without media.

    - `MimeType string`

      MIME type of the media, when known.

    - `URL string`

      Short-lived download URL for the audio or video. Anyone with the URL can download it until it expires, so fetch it again when needed rather than storing it.

  - `Provider MeetingUpdateRecordingResponseProvider`

    Where the recording came from: `RECALL` (Lightfield notetaker), `GONG`, `GRANOLA`, or `UPLOAD`.

    - `const MeetingUpdateRecordingResponseProviderRecall MeetingUpdateRecordingResponseProvider = "RECALL"`

    - `const MeetingUpdateRecordingResponseProviderGong MeetingUpdateRecordingResponseProvider = "GONG"`

    - `const MeetingUpdateRecordingResponseProviderGranola MeetingUpdateRecordingResponseProvider = "GRANOLA"`

    - `const MeetingUpdateRecordingResponseProviderUpload MeetingUpdateRecordingResponseProvider = "UPLOAD"`

  - `RecordedAt string`

    When the provider recorded it, in ISO 8601. Null if unknown.

  - `RecordedBy string`

    Display name of who recorded or uploaded it. Not a member reference.

  - `Transcript MeetingUpdateRecordingResponseTranscript`

    The transcript text file. Null for older notetaker recordings.

    - `FileID string`

      File ID of the transcript. Read its text through `GET /v1/files/{id}/url`.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  meetingUpdateRecordingResponse, err := client.Meeting.UpdateRecording(
    context.TODO(),
    "recordingId",
    githubcomlightfldlightfieldgo.MeetingUpdateRecordingParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", meetingUpdateRecordingResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "isCanonical": true,
  "media": {
    "mimeType": "mimeType",
    "url": "url"
  },
  "provider": "RECALL",
  "recordedAt": "recordedAt",
  "recordedBy": "recordedBy",
  "transcript": {
    "fileId": "fileId"
  }
}
```
