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

# Update Meeting State

> Use the API to pause or resume recording for a live meeting

## Overview

The `updateMeetingState` mutation allows you to pause or resume recording for a live meeting through the API. This is useful for controlling the Fireflies bot during an active meeting.

This mutation is rate-limited to 10 requests per hour across all user tiers.

## Arguments

**input** `UpdateMeetingStateInput!` *required*

Input object containing the meeting ID and action to perform. See [UpdateMeetingStateInput](https://docs.fireflies.ai/schema/input/update-meeting-state-input.md) for details.

## Response

**success** `Boolean!`

Whether the action was executed successfully

**action** `MeetingStateAction!`

The action that was executed

## Usage Example

To update the meeting state, provide the meeting ID and the desired action:

```graphql theme={null}
mutation UpdateMeetingState($input: UpdateMeetingStateInput!) {
  updateMeetingState(input: $input) {
    success
    action
  }
}
```

```bash curl theme={null}
curl -X POST https://api.fireflies.ai/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation UpdateMeetingState($input: UpdateMeetingStateInput!) { updateMeetingState(input: $input) { success action } }",
    "variables": {
      "input": {
        "meeting_id": "your_meeting_id",
        "action": "pause_recording"
      }
    }
  }'
```

```javascript javascript theme={null}
const axios = require('axios');

const url = 'https://api.fireflies.ai/graphql';
const headers = {
  'Content-Type': 'application/json',
  Authorization: 'Bearer your_api_key'
};

const data = {
  query: `mutation UpdateMeetingState($input: UpdateMeetingStateInput!) {
    updateMeetingState(input: $input) {
      success
      action
    }
  }`,
  variables: {
    input: {
      meeting_id: 'your_meeting_id',
      action: 'pause_recording'
    }
  }
};

axios
  .post(url, data, { headers: headers })
  .then(result => {
    console.log(result.data);
  })
  .catch(e => {
    console.log(JSON.stringify(e));
  });
```

```python python theme={null}
import requests

url = 'https://api.fireflies.ai/graphql'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_key'
}

data = {
    'query': '''
      mutation UpdateMeetingState($input: UpdateMeetingStateInput!) {
        updateMeetingState(input: $input) {
          success
          action
        }
      }
    ''',
    'variables': {
        'input': {
            'meeting_id': 'your_meeting_id',
            'action': 'pause_recording'
        }
    }
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    print(response.json()['data'])
else:
    print(response.text)
```

```java java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpRequest.BodyPublishers;

public class ApiRequest {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
        String jsonRequest = "{\"query\": \"mutation UpdateMeetingState($input: UpdateMeetingStateInput!) { updateMeetingState(input: $input) { success action } }\", \"variables\": {\"input\": {\"meeting_id\": \"your_meeting_id\", \"action\": \"pause_recording\"}}}";
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.fireflies.ai/graphql"))
            .header("Content-Type", "application/json")
            .header("Authorization", "Bearer your_api_key")
            .POST(BodyPublishers.ofString(jsonRequest))
            .build();

        client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
            .thenApply(HttpResponse::body)
            .thenAccept(System.out::println)
            .join();
    }
}
```

```json Response theme={null}
{
  "data": {
    "updateMeetingState": {
      "success": true,
      "action": "pause_recording"
    }
  }
}
```

## Error Codes

List of possible error codes that may be returned by the `updateMeetingState` mutation. Full list of error codes can be found [here](https://docs.fireflies.ai/miscellaneous/error-codes.md).

> [accordion] object\_not\_found
>
> The meeting with the specified ID was not found or you do not have access to it.

> [accordion] require\_elevated\_privilege
>
> You do not have permission to control this meeting. Only the meeting organizer or team admin can update the meeting state.

> [accordion] too\_many\_requests
>
> You have exceeded the rate limit for this mutation. The limit is 10 requests per hour. Please wait before making additional requests.

## Audit Trail

A successful call records a [`MEETING_STATE_UPDATED`](https://docs.fireflies.ai/graphql-api/query/audit-events) audit event for the meeting with the recording action in metadata.

## Additional Resources

> [card] [Create Live Action Item](https://docs.fireflies.ai/graphql-api/mutation/create-live-action-item.md)
>
> Create action items during a live meeting

> [card] [Create Live Soundbite](https://docs.fireflies.ai/graphql-api/mutation/create-live-soundbite.md)
>
> Create soundbites during a live meeting


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.