---
title: "Create a client."
method: POST
path: "/client"
tags: ["client"]
---

# Create a client.

`POST /client`

## Request body

- ClientParams — Params allowed to create or update Clients.
  - `expiresAfterInactivitySeconds` integer — The number of seconds of inactivity after which the client is removed. 0 (or omitted) means the client never expires.
  - `name` string, required — The client name

## Response `200`

Ok

- Client — The Client holds information about a device which can receive notifications (and other stuff).
  - `createdAt` string, date-time, required — The date the client was created.
  - `elevatedUntil` string, date-time — The time until which this client's session is elevated.
  - `expiresAfterInactivitySeconds` integer — The number of seconds of inactivity after which the client is removed. 0 means the client never expires.
  - `expiresAt` string, date-time — The time at which this client will expire due to inactivity, or null if it never expires.
  - `id` integer, required — The client id.
  - `lastUsed` string, date-time — The last time the client token was used.
  - `name` string, required — The client name. This is how the client should be displayed to the user.
  - `token` string — The client token. Can be used as `clientToken`. See Authentication.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/gotify/apis/gotify-rest-api.md) · [All operations](https://skmtc.net/gotify/apis/gotify-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gotify/gotify-rest-api/versions/7b32fcdb1345/schema)
