Skip to main content
POST
/
clients
Create a new client
curl --request POST \
  --url https://str.keroshospitality.com/api/v1/clients \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "new-client",
  "client_secret": "strong-password",
  "roles": [
    "str-uploader"
  ]
}
'
{
  "client": {
    "client_id": "new-client",
    "created_at": "2025-03-26T15:04:05Z",
    "last_updated": "2025-03-26T15:04:05Z",
    "roles": [
      "str-uploader"
    ]
  },
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body

application/json

CreateClientRequest defines the client creation request payload

client_id
string
required

ClientID is the unique identifier for the client

Example:

"new-client"

client_secret
string
required

ClientSecret is the client's password or secret key, will be hashed and stored as password_hash

Example:

"strong-password"

roles
enum<string>[]
required
Available options:
str-uploader,
takk-uploader,
client-manager
Example:
["str-uploader"]

Response

Client created successfully

client
object

Client provides confirmation of client creation

requestId
string