---
title: "Create a service account in the database"
method: POST
path: "/oauth/serviceAccounts"
tags: ["OAuth"]
---

# Create a service account in the database

`POST /oauth/serviceAccounts`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/oauth/serviceAccounts`
- Auth: none declared

Creates a service account in the database.

## Request body

- object
  - `accountData` OauthServiceAccountsPostRequestBodyContentApplicationJsonSchemaAccountData
    - `name` string: The name associated with the service account
    - `description` string: The description of the service account

## Response `200`

result

- OauthCreateServiceAccountResponse200: The client credentials for a new service account
  - `client_id` string: String representation of a MongoDB ObjectId
  - `client_secret` string: Uuid representation of client secret

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
