---
title: "Deletes a service account from the project."
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/operations/delete-project-service-account"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# Deletes a service account from the project.

`DELETE` `/organization/projects/{project_id}/service_accounts/{service_account_id}`

Operation ID: `delete-project-service-account`

## Path parameters

- `project_id` (string, required) - The ID of the project.
- `service_account_id` (string, required) - The ID of the service account.

## Responses

- `200` - Project service account deleted successfully.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
paths:
  /organization/projects/{project_id}/service_accounts/{service_account_id}:
    delete:
      summary: Deletes a service account from the project.
      operationId: delete-project-service-account
      tags:
        - Projects
      parameters:
        - name: project_id
          in: path
          description: The ID of the project.
          required: true
          schema:
            type: string
        - name: service_account_id
          in: path
          description: The ID of the service account.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Project service account deleted successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectServiceAccountDeleteResponse"
      x-oaiMeta:
        name: Delete project service account
        group: administration
        returns: Confirmation of service account being deleted, or an error in case of
          an archived project, which has no service accounts
        examples:
          request:
            curl: |
              curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \
                -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
                -H "Content-Type: application/json"
          response: |
            {
                "object": "organization.project.service_account.deleted",
                "id": "svc_acct_abc",
                "deleted": true
            }
security:
  - ApiKeyAuth: []
components:
  schemas:
    ProjectServiceAccountDeleteResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - organization.project.service_account.deleted
          x-stainless-const: true
        id:
          type: string
        deleted:
          type: boolean
      required:
        - object
        - id
        - deleted
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
```
