# List service accounts in project

`GET /v1/projects/{project}/serviceAccounts`, operation `serviceAccounts.ListServiceAccountsInProject`

Lists the service accounts a project owns, or, as the project - with a filter that names an organization, those of the organization's projects that the caller holds identity.serviceAccounts.list on.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID, or - for every project of the organization that filter names. |
| `pageSize` | query | No | `integer (int32)` | Maximum number of items to return. Defaults to 50; values above 500 are treated as 500. |
| `pageToken` | query | No | `string` | Page token from a previous response. |
| `filter` | query | No | `string` | With the project -, and only then: organization = "organizations/{organization_id}". The list then holds the service accounts of every project of the organization that the caller holds identity.serviceAccounts.list on, without the organization's own. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `nextPageToken` | `string` | Yes | Token for the next page; empty on the last page. |
| `serviceAccounts` | `ServiceAccount[]` | Yes | Service accounts, oldest first. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.