---
title: "Create a service account"
method: POST
path: "/orgs/{orgId}/service-accounts"
tags: ["service-accounts"]
---

# Create a service account

`POST /orgs/{orgId}/service-accounts`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

## Path parameters

- `orgId` integer, required

## Request body

- CreateServiceAccountRequest
  - `description` string
  - `name` string, required: Lower-case letters, digits and single dashes, starting and ending with a letter or digit. Must be unique across all platform users, and reserved names are rejected

## Response `201`

Created

- CreateServiceAccountResponse
  - `serviceAccount` ServiceAccountDto
    - `createdAt` string, date-time
    - `description` string, nullable
    - `id` integer
    - `memberId` integer, nullable: Organization membership ID of this service account
    - `name` string

## Other responses

- `400`: Bad request: the name does not match the naming rules or is reserved
- `403`: Operation not allowed
- `404`: Service accounts are not enabled for this organization
- `409`: Duplicate service account name, name must be unique across all platform users

## Changes

> 19 revisions in range; 1 not diffed.

- **2026-10-20** `adab9fd613a4`: 3 breaking
  - the `name` request property's maxLength was decreased to `39`
  - the `name` request property's minLength was increased from `1` to `2`
  - added the pattern `^[a-z0-9]+(?:-[a-z0-9]+)*$` to the request property `name`
- **2026-10-06** `0e1a1696f553`: 1 info
  - added the non-success response with the status `404`
- **2026-09-28** `24f327d93421`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/seqeralabs/apis/seqera-api/changes/orgs/:orgId/service-accounts/post.md)

---

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