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

# Bulk delete secrets

> Delete up to 100 secrets. Secrets have no active flag, so activate and deactivate are rejected. Each id is processed independently; the response lists every id with ok or an error. Requires secrets:delete.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /secrets/bulk
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /secrets/bulk:
    post:
      tags:
        - secrets
      summary: Bulk delete secrets
      description: >-
        Delete up to 100 secrets. Secrets have no active flag, so activate and
        deactivate are rejected. Each id is processed independently; the
        response lists every id with ok or an error. Requires secrets:delete.
      requestBody:
        description: Action and ids
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.BulkActionInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.BulkActionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '503':
          description: When TYK_AI_SECRET_KEY is not set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.BulkActionInput:
      type: object
      properties:
        action:
          type: string
          example: deactivate
        ids:
          type: array
          items:
            type: integer
      description: Bulk action request
    api.BulkActionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            action:
              type: string
            failed:
              type: integer
            results:
              type: array
              items:
                $ref: '#/components/schemas/api.BulkActionResult'
            succeeded:
              type: integer
      description: Bulk action response
    api.ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
      description: Error response model
    api.BulkActionResult:
      type: object
      properties:
        error:
          type: string
        id:
          type: integer
        ok:
          type: boolean
      description: One object's outcome in a bulk action
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````