---
title: "Create a Service Account"
method: POST
path: "/service-accounts"
tags: ["service-accounts"]
---

# Create a Service Account

`POST /service-accounts`

## Request body

- ServiceAccount
  - `name` string — Name
  - `token` string — Secret token used to access the API
  - `roles` string[]

## Response `200`

Service Account resource was successfully created

- ServiceAccount
  - `name` string — Name
  - `token` string — Secret token used to access the API
  - `roles` string[]

## Other responses

- `409` — Service Account resource with with the same name already exists

## Changes

- **2025-11-11** `cd959a44c8d1` — 1 breaking
  - added required request body
- **2023-10-09** `e0632c7e52ea` — 1 breaking, 3 info
  - the response's body type changed from no type to `object` for status `200`
  - added the optional property `name` to the response with the `200` status
  - added the optional property `roles` to the response with the `200` status
  - added the optional property `token` to the response with the `200` status
- **2023-02-21** `74fb43ee9642` — 1 info
  - endpoint added
- **2023-01-26** `4b9547159dde` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openai/apis/orchard/changes/service-accounts/post.md)

---

[API](https://skmtc.dev/openai/apis/orchard.md) · [All operations](https://skmtc.dev/openai/apis/orchard/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openai/orchard/revisions/8c00d644b0ad/schema)
