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

# Delete project

> Deletes a customer's project and everything in it, to free its slot in your plan's project limit. An abandoned link or a customer who left keeps counting until you delete the project.

Requires the `projects:delete` scope, which a new key does **not** have. Only a project created through the Partner API is accepted.

The API deletes the project's messages, templates, events, contacts, keys, webhook endpoints, media files and **disabled** channels. The numbers of those channels become free. The plan, the allowance, the audit log and the partner keys of the organization do not change. Nothing changes on WhatsApp.

The project cannot be deleted while it still has a channel that is not disabled (`has_enabled_channel`) or when it is the last project of the organization (`last_project`). In both cases the response is `409 project_not_deletable`.

The response is `204` once the project is gone. On a large project, a call can delete only part of it and return `202` with `status: deleting`. The project is still there, partly deleted. **Repeat the same call until you get `204`.**



## OpenAPI

````yaml en/openapi.json DELETE /v1/partner/projects/{projectId}
openapi: 3.0.3
info:
  title: Routa API
  description: >-
    REST API to send and receive WhatsApp messages, track delivery and receive
    normalized events through webhooks.
  version: '1'
servers:
  - url: https://api.routa.chat
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Send, retrieve and list messages.
  - name: Events
    description: Query the log of normalized events.
  - name: Webhooks
    description: Manage webhook endpoints, secrets and deliveries.
  - name: Templates
    description: Create and retrieve WhatsApp templates.
  - name: Media
    description: Upload and download media files.
  - name: Usage
    description: Query the metered usage of the project.
  - name: Identity
    description: Identify the API key in use.
  - name: Partners
    description: >-
      Create one project per customer, issue the key of each project, follow the
      channels and receive the events of every customer on a single webhook.
      These routes use a partner key (`rt_partner_...`). See [Partner
      API](/en/partners/overview).
paths:
  /v1/partner/projects/{projectId}:
    delete:
      tags:
        - Partners
      summary: Delete project
      description: >-
        Deletes a customer's project and everything in it, to free its slot in
        your plan's project limit. An abandoned link or a customer who left
        keeps counting until you delete the project.


        Requires the `projects:delete` scope, which a new key does **not** have.
        Only a project created through the Partner API is accepted.


        The API deletes the project's messages, templates, events, contacts,
        keys, webhook endpoints, media files and **disabled** channels. The
        numbers of those channels become free. The plan, the allowance, the
        audit log and the partner keys of the organization do not change.
        Nothing changes on WhatsApp.


        The project cannot be deleted while it still has a channel that is not
        disabled (`has_enabled_channel`) or when it is the last project of the
        organization (`last_project`). In both cases the response is `409
        project_not_deletable`.


        The response is `204` once the project is gone. On a large project, a
        call can delete only part of it and return `202` with `status:
        deleting`. The project is still there, partly deleted. **Repeat the same
        call until you get `204`.**
      operationId: deletePartnerProject
      parameters:
        - schema:
            type: string
          in: path
          name: projectId
          required: true
          description: >-
            Project ID (`proj_...`). Only a project created through the Partner
            API is accepted.
      responses:
        '202':
          description: >-
            The deletion is not finished yet. Repeat the call until you get
            `204`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerProjectDeleting'
        '204':
          description: The project is deleted
        '401':
          description: >-
            The partner key is missing, invalid, revoked, expired or used from
            outside its IP allowlist (`partner_key_invalid`). A project key also
            gets this error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The partner key lacks the required scope (`insufficient_scope`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The resource does not exist, does not belong to your organization or
            was not created through the Partner API. Also returns
            `partner_api_not_available` when your plan does not include the
            Partner API
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The project cannot be deleted (`project_not_deletable`).
            `error.details.reason` is `has_enabled_channel` or `last_project`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit exceeded: 10 requests per second, with bursts of up to
            30, per organization. See the `Retry-After` header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - partnerAuth:
            - projects:delete
components:
  schemas:
    PartnerProjectDeleting:
      type: object
      properties:
        project_id:
          type: string
          description: Project being deleted.
          example: proj_01J8ZK9M3Q7XABCDEFGHJKMNPQ
        status:
          type: string
          enum:
            - deleting
          description: >-
            Always `deleting`. The project is still there, partly deleted.
            Repeat the call until you get `204`.
          example: deleting
      required:
        - project_id
        - status
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              description: >-
                Error category: `invalid_request_error`, `authentication_error`,
                `permission_error`, `not_found_error`, `conflict_error`,
                `rate_limit_error`, `billing_error` or `api_error`.
              example: invalid_request_error
            code:
              type: string
              description: >-
                Stable, machine-readable code. See [Error
                codes](/en/errors/error-codes).
              example: channel_inactive
            message:
              type: string
              description: >-
                Human-readable text, in English. It can change, so do not parse
                it.
              example: Channel chan_01J8... is not active and cannot send messages.
            param:
              type: string
              description: >-
                The request field at fault, when it applies. It is filled in on
                `request_invalid` (the field outside the schema, such as
                `template.button_parameters.0.index`) and on template errors:
                `name` in `template_name_invalid`; `body_text`,
                `components.header`, `components.footer` or `components.buttons`
                in `template_components_invalid`; and `variable_examples`,
                `variable_examples.<position>`, `components.header.example` or
                `components.buttons.<position>.example` when
                `template_variables_invalid` refuses an example.
              example: components.buttons.0.example
            doc_url:
              type: string
              description: Link to the documentation of the code, when available.
            details:
              type: object
              additionalProperties:
                oneOf:
                  - type: string
                  - type: number
              description: >-
                Actionable values, such as `limit`, `used` and `resets_at` in
                `message_quota_exceeded`, or `reason`, which tells apart the
                causes behind one code, in errors such as `invalid_recipient`
                and `template_variables_invalid`. See [Actionable
                details](/en/errors/overview#actionable-details).
            request_id:
              type: string
              description: Request ID. Quote it when you contact support.
              example: req_01J8ZK9M3Q7XABCDEFGHJKMNPQ
          description: Error details.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Project API key, in the format `rt_live_...` or `rt_test_...`, sent as
        `Authorization: Bearer <key>`.
    partnerAuth:
      type: http
      scheme: bearer
      description: >-
        Partner key, in the format `rt_partner_...`, sent as `Authorization:
        Bearer <key>`. It only works on the `/v1/partner/*` routes. A project
        key does not work on them, and a partner key does not work on any other
        route.

````

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