# Cancel standalone Notetaker

> **DELETE** `https://api.us.nylas.com/v3/notetakers/{notetaker_id}/cancel`

Source: https://developer.nylas.com/docs/reference/api/standalone-notetaker/cancel-standalone-notetaker/

Cancels a Notetaker that is in the `scheduled` state, preventing it from joining the meeting. This endpoint only works for Notetakers that haven't joined a meeting yet. To remove a Notetaker that is currently in a meeting, use the leave endpoint. To permanently delete a Notetaker in any state, use the delete endpoint instead.

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `notetaker_id` | string | Yes | ID of the Notetaker bot to access. |

## Responses

### 200 - OK

- `request_id` (string) - The ID of the request.

### 401 - Unauthorized

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 404 - Not Found

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The raw error from the provider, if available
    - `code` (string)
    - `message` (string)

### 429 - Rate Limit

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

## Code samples

### cURL

```bash
curl --request DELETE \
  --url "https://api.us.nylas.com/v3/notetakers/<NOTETAKER_ID>/cancel" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>'
```

### Node.js SDK

```javascript
import Nylas from "nylas";

const nylas = new Nylas({
  apiKey: "<NYLAS_API_KEY>",
  apiUri: "<NYLAS_API_URI>",
});

async function cancelStandaloneNotetaker() {
  try {
    const result = await nylas.notetakers.cancel({
      notetakerId: "<NOTETAKER_ID>",
    });

    console.log("Cancelled notetaker:", result);
  } catch (error) {
    console.error("Error cancelling notetaker:", error);
  }
}

cancelStandaloneNotetaker();

```

### Python SDK

```python
from nylas import Client

nylas = Client(
    "<NYLAS_API_KEY>",
    "<NYLAS_API_URI>",
)

response = nylas.notetakers.cancel(
    notetaker_id="<NOTETAKER_ID>",
)

print("Standalone notetaker cancelled:", response)

```

### Java SDK

```java
import com.nylas.NylasClient;
import com.nylas.models.DeleteResponse;
import com.nylas.models.NylasApiError;
import com.nylas.models.NylasSdkTimeoutError;

public class CancelStandaloneNotetaker {
  public static void main(String[] args) throws NylasSdkTimeoutError, NylasApiError {
    NylasClient nylas = new NylasClient.Builder("<NYLAS_API_KEY>").build();

    // Omit the grant identifier to cancel a standalone (account-level) Notetaker.
    DeleteResponse result = nylas.notetakers().cancel("<NOTETAKER_ID>");

    System.out.println("Cancelled standalone notetaker: " + result);
  }
}

```

### Kotlin SDK

```kotlin
import com.nylas.NylasClient

fun main() {
  val nylas = NylasClient.Builder("<NYLAS_API_KEY>").build()

  // Omit the grant identifier to cancel a standalone (account-level) Notetaker.
  val result = nylas.notetakers().cancel("<NOTETAKER_ID>")

  println("Cancelled standalone notetaker: $result")
}

```
