> ## Documentation Index
> Fetch the complete documentation index at: https://mixpanel-edb78807-tofufu-patch-1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Service Account

> Removes the service account from all associated projects and deletes it from the organization



## OpenAPI

````yaml openapi/service-accounts.openapi.yaml DELETE /organizations/{organizationId}/service-accounts/{serviceAccountId}
openapi: 3.0.2
info:
  title: Service Accounts API
  description: Endpoints for managing service accounts programmatically.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
  contact:
    url: https://mixpanel.com/get-support
servers:
  - url: https://{regionAndDomain}.com/api/app
    description: Mixpanel's application API server.
    variables:
      regionAndDomain:
        default: mixpanel
        enum:
          - mixpanel
          - eu.mixpanel
          - in.mixpanel
        description: |
          The server location to be used:
            * `mixpanel` - The default (US) servers used for most projects
            * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
            * `in.mixpanel` - India servers if you are enrolled in India Data Residency
security:
  - ServiceAccount: []
tags:
  - name: Create Service Accounts
    description: Operations to add service accounts to an organization
  - name: Delete Service Accounts
    description: Remove a service account from an organization
  - name: Project Membership
    description: Add/remove service accounts to/from projects
  - name: Retrieve Service Accounts
    description: Get details about an organization's service account
paths:
  /organizations/{organizationId}/service-accounts/{serviceAccountId}:
    parameters:
      - in: path
        name: organizationId
        schema:
          type: integer
        required: true
        description: 'Your organization id (eg: 12345)'
      - $ref: '#/components/parameters/serviceAccountId'
    delete:
      tags:
        - Delete Service Accounts
      summary: Delete Service Account
      description: >-
        Removes the service account from all associated projects and deletes it
        from the organization
      operationId: delete-service-account
      responses:
        '200':
          description: Successfully deleted service account
          content:
            application/json:
              schema:
                type: object
                example:
                  status: ok
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details about the error that occurred
                  status:
                    type: string
                    enum:
                      - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details about the error that occurred
                  status:
                    type: string
                    enum:
                      - error
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details about the error that occurred
                  status:
                    type: string
                    enum:
                      - error
components:
  parameters:
    serviceAccountId:
      in: path
      name: serviceAccountId
      description: The id of an existing Service Account
      schema:
        type: integer
      required: true
  securitySchemes:
    ServiceAccount:
      type: http
      scheme: basic
      description: Service Account

````