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

# ユーザーを削除する

> ユーザーID、メールアドレス、電話番号、LINEユーザーIDのいずれかで、Notiflyに登録済みのユーザーを単件または一括で削除します。

> [!NOTE]
>
> 複数のユーザーを一括で削除するには、同じ形式のユーザーオブジェクトを配列で送信します。1回のリクエストにつき最大1,000人です。
>
> * ユーザーID、メールアドレス、電話番号、LINEユーザーIDのいずれかでユーザーを指定します。
> * 電話番号は、記号を含めて完全に一致する必要があります。たとえば、`010-1234-1234`と`01012341234`は異なる値です。


## OpenAPI

````yaml /ja/api-reference/openapi.yaml delete /users
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly APIサーバー
security: []
tags:
  - name: catalog
    x-group: カタログ
paths:
  /users:
    delete:
      summary: delete-users
      operationId: deleteUsers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - projectId
              properties:
                projectId:
                  type: string
                  description: >-
                    Notiflyが発行するプロジェクトIDです。**設定 > 製品とプロジェクト情報 >
                    プロジェクト情報**で確認できます。
                userId:
                  type: string
                  description: 削除するユーザーのIDです。
                userProperties:
                  type: object
                  description: 削除するユーザーを特定する属性です。メールアドレス、電話番号、LINEユーザーIDのいずれかを指定します。
                  properties:
                    $email:
                      type: string
                      description: 削除するユーザーのメールアドレスです。
                    $phone_number:
                      type: string
                      description: 削除するユーザーの電話番号です。
                    $line_user_id:
                      type: string
                      description: 削除するユーザーのLINEユーザーIDです。
            example:
              projectId: example_project_1234567890abcdef
              userId: user_abc123
              userProperties:
                $email: delete@example.com
                $phone_number: '+821012345678'
      responses:
        '200':
          description: ユーザーを削除しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: integer
                    description: 削除した行数です。
              example:
                data: 1
        '400':
          description: リクエスト本文の形式が不正です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorResponse'
        '401':
          description: トークンが無効か期限切れのため、認証に失敗しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorResponse'
        '413':
          description: リクエストの件数が1回あたりの上限である1,000人を超えています。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorResponse'
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ClientErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          description: エラー時はnullです。
          example: null
        error:
          type: string
          description: エラーメッセージ
          example: Invalid Authorization Token
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          description: エラー時はnullです。
          example: null
        error:
          type: string
          description: エラーメッセージ
        projectId:
          type: string
          nullable: true
          description: プロジェクトIDです。500エラーの場合のみ含まれます。
          example: null
        durationMs:
          type: integer
          nullable: true
          description: 処理時間です。単位はmsで、500エラーの場合のみ含まれます。
          example: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '`POST /authenticate`で発行したトークンをBearer形式で送信します。'

````

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