Skip to content

Settings

The settings module provides endpoints for user / organization preference configuration. Currently most service methods are still stubs (placeholder strings) — the CreateSettingDto and UpdateSettingDto DTOs are empty. These endpoints live at the /settings route and all require Bearer JWT (no specific ACL permissions).

PropertyValue
Base URL{HOST}/v1
AuthBearer JWT (header Authorization) or access_token cookie
Content-Typeapplication/json
Error envelope{ "message": string | string[], "statusCode": number, "error": string }
ValidationGlobal ValidationPipe · whitelist: true, forbidNonWhitelisted: true
Related modulesusers, organizations
Document versionv1 · 2026-05-20
AudienceInternal FE devs (mobile + web)

Five standard REST endpoints, still at an early stage. The service only fills in createSettings (creating a basic UsersSettings record with user_id from the token) — the rest (findAll, findOne, update, remove) still return string stubs. FE should not hard-code the response schema; wait for the next backend release.

MethodPathAuthSummary
POST/v1/settingsbearerCreate user settings (uses user from token)
GET/v1/settingsbearerList all settings (stub)
GET/v1/settings/:settings_idbearerDetail of one setting by ID (stub)
PATCH/v1/settings/:settings_idbearerUpdate a setting (stub)
DELETE/v1/settings/:settings_idbearerDelete a setting (stub)

Create a new UsersSettings record for the logged-in user. The DTO body is empty; the server fills in user_id and created_by from the token.

bearer
FieldTypeRequiredNotes
(empty)The DTO does not define any field yet. Send body {}.
{}
{
"status": "success",
"statusCode": 201,
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "660e8400-e29b-41d4-a716-446655440111",
"created_by": "660e8400-e29b-41d4-a716-446655440111",
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T08:30:00.000Z"
}
}
StatusWhen it occurs
400 Bad RequestBody contains non-whitelisted field
401 UnauthorizedBearer/cookie is invalid

List all settings. The service is still a stub — returns a placeholder string.

bearer
{
"status": "success",
"statusCode": 200,
"message": "Success",
"data": "This action returns all settings"
}
StatusWhen it occurs
401 UnauthorizedBearer/cookie is invalid

GET /v1/settings/:settings_id bearer

Section titled “GET /v1/settings/:settings_id ”

Detail of one setting. The service is a stub — no real lookup yet.

bearer
ParamTypeNotes
settings_idstringCurrently cast to number (+id); no ParseUUIDPipe yet
{
"status": "success",
"statusCode": 200,
"message": "Success",
"data": "This action returns a #1 setting"
}
StatusWhen it occurs
401 UnauthorizedBearer/cookie is invalid

PATCH /v1/settings/:settings_id bearer

Section titled “PATCH /v1/settings/:settings_id ”

Update a setting. The DTO is still PartialType(CreateSettingDto) empty — body must be {}.

bearer
ParamTypeNotes
settings_idstringSee notes on the detail endpoint
FieldTypeRequiredNotes
(empty)The DTO has no fields; service is a stub
{
"status": "success",
"statusCode": 200,
"message": "Success",
"data": "This action updates a #1 setting"
}
StatusWhen it occurs
400 Bad RequestNon-whitelisted field in body
401 UnauthorizedBearer/cookie is invalid

DELETE /v1/settings/:settings_id bearer

Section titled “DELETE /v1/settings/:settings_id ”

Delete a setting. Service stub.

bearer
ParamTypeNotes
settings_idstringSee notes on the detail endpoint
{
"status": "success",
"statusCode": 200,
"message": "Success",
"data": "This action removes a #1 setting"
}
StatusWhen it occurs
401 UnauthorizedBearer/cookie is invalid

  • UsersSettingsuser_id + audit fields
  • OrganizationSettingsorganization_id + audit fields

Configuration schemas (notifications, language, etc.) are not yet exposed in the public API.

  • Bearer JWT required on all endpoints
  • No specific @Permissions or @Roles
{
"message": "property unknown_field should not exist",
"statusCode": 400,
"error": "Bad Request"
}
  • 400 body contains unknown field
  • 401 missing / expired token
  • 500 the service stub may throw a raw error when called