---
title: "Create service account"
method: POST
path: "/api/users/service"
tags: ["User"]
---

# Create service account

`POST /api/users/service`

Creates a new service account user with the specified email and user type.

## Request body

- object
  - `email` string, required — Email address for the service account
  - `type` 'admin' | 'member' — User type for the service account

## Response `200`

The created service account user

- object — The created service account user
  - `id` string, uuid, required — Unique identifier of the user
  - `email` string, email, required — Email address of the user
  - `firstName` string, nullable — First name of the user
  - `lastName` string, nullable — Last name of the user
  - `type` 'invited' | 'member' | 'author' | 'admin' | 'owner', required — User type/role within the organisation
  - `status` 'active' | 'disabled' | 'locked', required — Current status of the user account
  - `isService` boolean — Whether this is a service account
  - `roles` object[] — Roles assigned to the user
    - `id` string, uuid, required — Unique identifier of the role
    - `name` string, required — Name of the role
    - `description` string, nullable — Description of the role
  - `createdAt` string, required — Timestamp when the user was created
  - `updatedAt` string, required — Timestamp when the user was last updated

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
