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

# Remove Service Accounts From Projects

> Removes a list of service account ids from a list of project ids



## OpenAPI

````yaml openapi/service-accounts.openapi.yaml POST /organizations/{organizationId}/service-accounts/remove-from-project
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/remove-from-project:
    parameters:
      - in: path
        name: organizationId
        schema:
          type: integer
        required: true
        description: 'Your organization id (eg: 12345)'
    post:
      tags:
        - Project Membership
      summary: Remove Service Accounts From Projects
      description: Removes a list of service account ids from a list of project ids
      operationId: remove-service-accounts-from-projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveServiceAccountsFromProjectsRequest'
      responses:
        '200':
          description: Service accounts removed from projects
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '"ok" if the request succeeded, "error" otherwise.'
                    example: ok
                    enum:
                      - ok
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details about the error that occurred
                  status:
                    type: string
                    enum:
                      - error
        '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:
  schemas:
    RemoveServiceAccountsFromProjectsRequest:
      type: object
      properties:
        projects:
          type: array
          description: A list of projects and service accounts to remove
          items:
            type: object
            properties:
              id:
                type: integer
                description: The project id to remove the service account from
              service_account_ids:
                type: array
                description: The list of service account ids to remove from the project
                items:
                  type: integer
            required:
              - id
              - service_account_ids
      required:
        - projects
  securitySchemes:
    ServiceAccount:
      type: http
      scheme: basic
      description: Service Account

````