---
title: "Remove Service Accounts From Projects"
method: POST
path: "/organizations/{organizationId}/service-accounts/remove-from-project"
tags: ["Project Membership"]
---

# Remove Service Accounts From Projects

`POST /organizations/{organizationId}/service-accounts/remove-from-project`

## Request

- Base URL: `https://mixpanel.com/api/query`
- URL: `https://mixpanel.com/api/query/organizations/{organizationId}/service-accounts/remove-from-project`
- Auth: one of:
  - HTTP basic
  - HTTP basic
- TypeScript: <https://skmtc.dev/mixpanel/apis/query-api/docs/organizations/:organizationId/service-accounts/remove-from-project/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Request body

- RemoveServiceAccountsFromProjectsRequest
  - `projects` object[], required: A list of projects and service accounts to remove
    - `id` integer, required: The project id to remove the service account from
    - `service_account_ids` integer[], required: The list of service account ids to remove from the project

## Response `200`

Service accounts removed from projects

- object
  - `status` 'ok': "ok" if the request succeeded, "error" otherwise.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/mixpanel/apis/query-api.md) - [All operations](https://skmtc.dev/mixpanel/apis/query-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpanel/apis/query-api/revisions/f442da95252a?raw)
