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

# Delete submission [ap-3]

> Permanently deletes the submission. Can be used, e.g., to remove a document before the configured retention period.



## OpenAPI

````yaml /spec-ap-3.json delete /v2/submission/{submission_id}
openapi: 3.0.1
info:
  title: Resistant Documents API
  version: 2.0.0b
  description: >-

    Resistant Documents provides this API to programmatically interact with its
    document analysis engine.

    Interaction with the API can be divided into three phases:


    1. Creating document submission

    2. Uploading a file for for analysis to an address returned from step 1.

    3. Fetching analysis results


    In the first step, the submission is created by posting to the 
    `/v2/submission` endpoint. The response contains a `submission_id` uniquely
    identifying the document to be analyzed throughout the entire interaction,
    and is used to fetch analysis results later.


    Submission response also returns `upload_url` containing a pre-signed URL.
    This URL should be used to upload the actual document to be analyzed in the
    second step. Please note the document has to be uploaded using HTTP `PUT`
    method with `Content-Type` HTTP header set to `application/octet-stream`.


    In the last step, client should repeatedly poll using the
    `/v2/submission/{submission_id}/fraud` endpoint for analysis results. The
    best practice is to use polling with an [exponential
    back-off](https://en.wikipedia.org/wiki/Exponential_backoff) to reduce load
    on the API.


    # Authentication


    <SecurityDefinitions />
servers:
  - url: https://api.ap-3.documents.resistant.ai
security: []
paths:
  /v2/submission/{submission_id}:
    delete:
      summary: Delete submission [ap-3]
      description: >-
        Permanently deletes the submission. Can be used, e.g., to remove a
        document before the configured retention period.
      operationId: deleteSubmission
      parameters:
        - in: path
          name: submission_id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Submission deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Submission doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Submission cannot be deleted while it is being processed. Retry the
            request later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - OAuth2:
            - submissions.write
components:
  responses:
    Unauthorized:
      description: Missing valid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to the requested resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: Unsupported media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Request quota was exceeded
  schemas:
    Error:
      title: Error
      type: object
      properties:
        message:
          title: Error message
          description: Detailed error message
          minLength: 0
          maxLength: 512
          type: string
      required:
        - message
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://eu.id.resistant.ai/oauth2/ausp40dse1Q0rzDq6417/v1/token
          scopes:
            submissions.read: Read analysis results for a submission
            submissions.write: Create a new submission

````