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

# Delete a resource



## OpenAPI

````yaml /api-reference/openapi.json delete /crm/{resource}/{id}
openapi: 3.0.0
info:
  title: RouteMCP API
  description: >-
    Unified API for integrations. Connect to multiple providers through a single
    API.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.routemcp.io/api/v1
    description: Production
security:
  - bearerAuth: []
tags: []
paths:
  /crm/{resource}/{id}:
    delete:
      tags:
        - CRM Resources
      summary: Delete a resource
      operationId: CrmResourceController_deleteResource
      parameters:
        - name: resource
          required: true
          in: path
          description: >-
            Canonical CRM resource type to delete. Must be one of the values in
            the enum below. RouteMCP maps this to the equivalent provider-native
            object (e.g. `contact` → HubSpot Contacts, Pipedrive Persons, Zoho
            Contacts). `owner` and `pipeline` are read-only and cannot be
            deleted.
          schema:
            enum:
              - contact
              - lead
              - deal
              - meeting
              - company
              - note
              - task
              - activity
              - appointment
            type: string
        - $ref: '#/components/parameters/CrmRecordIdPath'
        - $ref: '#/components/parameters/ProviderQueryRequired'
        - $ref: '#/components/parameters/XEndUserIdHeader'
      responses:
        '200':
          description: Resource deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCrmResourceResponse'
              examples:
                default:
                  summary: Resource deleted
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      deleted: true
                      id: '12345'
        '400':
          description: Missing provider or X-End-User-Id header or invalid resource type
        '401':
          description: Missing or invalid API key
        '404':
          description: End user, provider, or record not found
        '422':
          description: Validation Errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 400
                    default: 400
                  message:
                    type: string
                    example: Validation Errors.
                    default: Validation Errors.
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                    example:
                      email: email should not be empty
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - errors
                  - timestamp
                  - path
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 429
                    default: 429
                  message:
                    type: string
                    example: Too Many Requests
                    default: Too Many Requests
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 500
                    default: 500
                  message:
                    type: string
                    example: Internal server error.
                    default: Internal server error.
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
      security:
        - bearerAuth: []
components:
  parameters:
    CrmRecordIdPath:
      name: id
      required: true
      in: path
      description: >-
        Provider-native record id. This is the id as it appears in the source
        system (e.g. a HubSpot contact id, a Pipedrive deal id, a QuickBooks
        invoice id). Use the `remote_id` field returned by the list endpoint.
      schema:
        example: '12345'
        type: string
    ProviderQueryRequired:
      name: provider
      required: true
      in: query
      description: >-
        Provider slug identifying which connected provider to target (e.g.
        `hubspot`, `pipedrive`, `zoho-crm`, `quickbooks-online`, `xero`,
        `zoho-books`). Required — single-record operations always target a
        specific provider.
      schema:
        example: hubspot
        type: string
    XEndUserIdHeader:
      name: X-End-User-Id
      required: true
      in: header
      description: >-
        Identifier of the end user whose connected provider should be queried.
        This is the same `endUserId` you supplied when creating the connect
        token. Required on every CRM and accounting call.
      schema:
        example: user-001
        type: string
  schemas:
    DeleteCrmResourceResponse:
      type: object
      title: DeleteCrmResourceResponse
      description: >-
        Standard envelope returned by `DELETE /crm/{resource}/{id}`. Confirms
        which provider-native record was removed.
      properties:
        success:
          type: boolean
          example: true
          description: Always `true` for successful (2xx) responses.
        statusCode:
          type: integer
          example: 200
          description: HTTP status code mirrored inside the envelope.
        message:
          type: string
          example: OK
        data:
          type: object
          description: Confirmation payload.
          properties:
            deleted:
              type: boolean
              example: true
              description: >-
                `true` when the provider acknowledged the delete. RouteMCP
                normalises this across providers regardless of how the upstream
                API signals success (some return 204 No Content, others return
                the deleted record).
            id:
              type: string
              example: '12345'
              description: >-
                Provider-native id of the record that was deleted (echo of the
                `id` path parameter).
          required:
            - deleted
            - id
      required:
        - success
        - statusCode
        - message
        - data
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx
        (production) or Bearer sk_test_xxx (sandbox)

````