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

# レコードを削除

### パス

DELETE /api/table/\{tableId}/record

### リクエスト

**パスパラメーター**

* tableId (string): テーブルの一意の識別子です（[取得方法](/ja/api-doc/get-id#tableid)）。

**クエリパラメーター**

* **recordIds（必須）**（[取得方法](/ja/api-doc/get-id#recordid)）
  * 説明: 削除するレコードIDの配列
  * 型: 配列
  * 例: `["rec123456", "rec789012"]`
  * 注: 各要素は、削除するレコードのIDを表す文字列です。

#### レスポンス

**成功レスポンス**

* ステータスコード: 200 OK
* レスポンス本文: コンテンツなし

#### エラーレスポンス

* ステータスコード: 400 Bad Request: リクエストパラメーターの形式が正しくないか、必須パラメーターがありません。
* ステータスコード: 404 Not Found: 指定したtableIdが存在しないか、一部のレコードIDが存在しません。

#### コード例

<CodeGroup>
  ```bash CURL theme={null}
  curl -X DELETE 'https://app.teable.ai/api/table/__tableId__/record?recordIds[]=rec123456&recordIds[]=rec789012' \
    -H 'Authorization: Bearer __token__'
  ```

  ```js JS SDK theme={null}
  import { configApi, deleteRecords } from '@teable/openapi';

  configApi({
    endpoint: 'https://app.teable.ai',
    token: '__token__',
  });

  await deleteRecords('__tableId__', ['rec123456', 'rec789012']);
  ```

  ```ts TypeScript theme={null}
  const response = await fetch('https://app.teable.ai/api/table/__tableId__/record?recordIds[]=rec123456&recordIds[]=rec789012', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer __token__'
    }
  });

  console.log(response.status); // 200 if successful
  ```

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

  response = requests.delete(
      'https://app.teable.ai/api/table/__tableId__/record',
      headers={
          'Authorization': 'Bearer __token__'
      },
      params={
          'recordIds': ['rec123456', 'rec789012']
      }
  )

  print(response.status_code) # 200 if successful
  ```
</CodeGroup>
