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

# Delete referrals

> With this endpoint you can delete referrals. 
 <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> 
 <Tip>**HTTP Request** <br/>`DELETE https://api.firstpromoter.com/api/v2/company/referrals`</Tip>



## OpenAPI

````yaml openapi-v2-referrals delete /referrals
openapi: 3.0.0
info:
  title: FirstPromoter Admin API
  version: 1.0.0
  description: Admin API endpoints for managing referrals in FirstPromoter
servers:
  - url: https://api.firstpromoter.com/api/v2/company
    description: Production server
security:
  - BearerAuth: []
paths:
  /referrals:
    delete:
      tags:
        - Referrals
      summary: Delete referrals
      description: |-
        With this endpoint you can delete referrals. 
         <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> 
         <Tip>**HTTP Request** <br/>`DELETE https://api.firstpromoter.com/api/v2/company/referrals`</Tip>
      parameters:
        - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSelectionRequest'
      responses:
        '200':
          description: Batch operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '202':
          description: Batch operation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: >-
        Account id. You can find your Account ID on Your FirstPromoter
        Dashboard. Navigate to Settings → Integrations
      schema:
        type: string
  schemas:
    BatchSelectionRequest:
      type: object
      properties:
        ids:
          type: array
          description: >-
            Array of selected referral ids. If there are more than __5__ ids on
            this param/field, the action will be processed asynchronously. The
            response for the batch status will most likely be `in_progress`. The
            available statuses are `pending`, `in_progress`, `completed`,
            `failed` and `stopped`
          items:
            type: integer
    BatchOperationResponse:
      type: object
      properties:
        id:
          type: integer
          description: Id of the batch operation
        status:
          type: string
          enum:
            - pending
            - completed
          description: Status of the batch operation
        total:
          type: integer
          description: Total number of items
        selected_total:
          type: integer
          description: Number of selected items
        processed_count:
          type: integer
          description: Number of processed items
        failed_count:
          type: integer
          description: Number of failed operations
        action_label:
          type: string
          description: Action identifier/ label assigned to the action
        created_at:
          type: string
          format: date-time
          description: Date and time when the batch operation was created
        updated_at:
          type: string
          format: date-time
          description: Date and time when the batch operation was updated
        meta:
          type: object
          description: Meta data of the batch operation
        progress:
          type: integer
          description: Progress of the action (0-100)
        processing_errors:
          type: array
          items:
            type: string
            description: List of processing errors
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token in the Authorization header. You can
        find your API Key on Your FirstPromoter Dashboard. Navigate to Settings
        → Integrations → Manage API Keys

````