# Create service account in project

`POST /v1/projects/{project}/serviceAccounts`, operation `serviceAccounts.CreateServiceAccountInProject`

Creates a service account in an organization or a project.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID. |

## Request body

Content-Type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accountId` | `string` | Yes | A readable name, unique within the organization or project that owns the account: 6 to 30 lowercase letters, digits or hyphens, starting with a letter. It never changes. |
| `description` | `string` | No | What the account is for. |
| `displayName` | `string` | No | Name shown in user interfaces. |

## Responses

### 201

Created

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accountId` | `string` | Yes | A readable name, unique within the organization or project that owns the account. |
| `createTime` | `string (date-time)` | Yes | When the account was created. |
| `description` | `string` | Yes | What the account is for. |
| `displayName` | `string` | Yes | Name shown in user interfaces. |
| `name` | `string` | Yes | Resource name, projects/{project_id}/serviceAccounts/{service_account_id} for a project's account or organizations/{organization_id}/serviceAccounts/{service_account_id} for an organization's own. It never changes. |
| `state` | `string` | Yes | Lifecycle state: the keys of an ACTIVE account work, and a DISABLED one's are refused. Values: `ACTIVE`, `DISABLED`. |
| `updateTime` | `string (date-time)` | Yes | When the account was last updated. |

### 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.