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

# Delete A Model

> Delete a model by its ID within the specified team.



## OpenAPI

````yaml delete /{resourceSlug}/forms/{modelId}
openapi: 3.0.0
info:
  title: Agentcloud Webapp API Docs
  description: The API docs for Agentcloud's webapp.
  version: 0.2.1
servers:
  - url: https://app.agentcloud.dev
    description: Use our public api endpoints!
  - url: '{custom_url}'
    description: Test the endpoints on your own instance of Agent Cloud!
    variables:
      custom_url:
        default: https://app.agentcloud.dev
security: []
tags: []
paths:
  /{resourceSlug}/forms/{modelId}:
    delete:
      tags:
        - Models
      summary: Delete A Model
      description: Delete a model by its ID within the specified team.
      operationId: deleteModelApi
      parameters:
        - name: resourceSlug
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ObjectId'
          description: >-
            The resourceSlug is a URL parameter of the teamId associated with
            the user.
        - name: modelId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ObjectId'
          description: The ID of the model to be deleted.
      responses:
        '302':
          description: >-
            Successful operation, redirect to '/{resourceSlug}/models'. (this
            needs to be modified to correctly display dynamicResponse)
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/tempRedirectResponse'
        '400':
          description: Invalid modelId provided or model does not exist.
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
        '403':
          description: >-
            Invalid permissions on the resourceSlug, attempting to delete a
            model outside the permissions of the team.
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
        '500':
          description: Internal server error.
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
components:
  schemas:
    ObjectId:
      description: >-
        Mongodb Object id, unique identifier, length of 24 characters fitting
        the following regex; [a-f0-9]{24}
      type: string
    tempRedirectResponse:
      description: Server response after successsfully adding a new object
      properties:
        _id:
          type: string
          description: The unique Mongo id of the newly inserted object.
        redirect:
          type: string
          description: >-
            a string containing the redirect link to get all objects after a
            successful insertion.
    dynamicResponse:
      description: Server response
      properties:
        message:
          type: string
          description: Error message to provide more detail
        code:
          type: integer
          description: the error code

````