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

# Delete app

> Permanently deletes an app you registered via this API and ALL of its data — runs, findings, mappings, and stored credentials. Irreversible. Only apps registered through this API can be deleted here; an app created in the console (or predating API source tracking) returns 409 — delete it in the console instead. Rate limit 5 requests / 60 s per IP.




## OpenAPI

````yaml /api-reference/openapi.yaml delete /apps/{appId}
openapi: 3.1.1
info:
  title: Perfai Security API
  version: 1.1.0
  description: >
    Partner-facing REST API for automating Perfai security testing: register
    apps, trigger security tests and vision (browser-automation) runs, poll run
    status, and retrieve vulnerability findings. All endpoints are
    JWT-authenticated and scoped to the caller's organization; cross-tenant
    access returns 404 (never 403) to prevent enumeration. Errors follow RFC
    9457 Problem Details.
servers:
  - url: https://api.perfai.ai/v1
    description: Perfai cloud
  - url: https://api.{customerDomain}/v1
    description: On-premise deployment
    variables:
      customerDomain:
        default: example.com
security:
  - bearerAuth: []
tags:
  - name: Apps
    description: App catalog — list, register, and poll registration.
  - name: Security Agent
    description: Trigger security tests and poll their lifecycle.
  - name: Vision Agent
    description: >-
      Trigger vision (browser-automation) runs and poll their lifecycle. Always
      browserless.
  - name: Vulnerabilities
    description: Retrieve security findings.
  - name: Reports
    description: List an app's security reports and download them as PDF.
  - name: Tasks
    description: Poll any asynchronous operation started by this API.
paths:
  /apps/{appId}:
    delete:
      tags:
        - Apps
      summary: Delete app
      description: >
        Permanently deletes an app you registered via this API and ALL of its
        data — runs, findings, mappings, and stored credentials. Irreversible.
        Only apps registered through this API can be deleted here; an app
        created in the console (or predating API source tracking) returns 409 —
        delete it in the console instead. Rate limit 5 requests / 60 s per IP.
      operationId: deleteApp
      parameters:
        - $ref: '#/components/parameters/AppId'
      responses:
        '200':
          description: App and all of its data deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAppResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >
            app-registered-outside-api — the app was created in the console, not
            via this API, and cannot be deleted through it.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    AppId:
      name: appId
      in: path
      required: true
      schema:
        type: string
      description: MongoDB ObjectId of the app (from GET /apps or POST /apps).
  schemas:
    DeleteAppResponse:
      type: object
      description: Confirmation that an app and all of its data were deleted.
      properties:
        appId:
          type: string
          description: The deleted app's id.
        status:
          type: string
          enum:
            - DELETED
          description: Always DELETED on success.
        previousRegistrationStatus:
          type:
            - string
            - 'null'
          description: The app's registrationStatus at the moment it was deleted.
    Problem:
      type: object
      description: RFC 9457 Problem Details.
      properties:
        type:
          type: string
          description: Error type URI, e.g. https://perfai.ai/errors/app-already-registered
        title:
          type: string
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or expired JWT.
    Forbidden:
      description: Caller's role does not permit this operation (Viewer is read-only).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found or belongs to a different tenant.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RateLimited:
      description: >-
        Rate limit exceeded. Back off and retry after the Retry-After header
        value.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT login token tied to your Perfai user (not a separate API key).
        Obtain it via POST /api/v1/auth/token with your username and password
        (use the returned id_token) — the same login the web console performs.
        Carries org, user, and role; short-lived.

````