Users
11 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
Upload avatar image#
/users/avatarTokenUploads a new avatar image (max 5 MB). Supported formats: JPEG, PNG, GIF, WebP.
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
filePflicht | string (binary) | – |
Antworten
- 201Avatar uploaded successfully
- 400No file provided, file too large, or invalid MIME type
- 401Not authenticated
curl -X POST "https://xapi.ambertech.cloud/api/v1/users/avatar" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-F "file=@./datei.pdf"Delete avatar image#
/users/avatarTokenRemoves the user's avatar from storage and clears the avatar URL and path.
Antworten
- 200Avatar deleted successfully
- 401Not authenticated
- 404User not found
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/users/avatar" \
-H "Authorization: Bearer $XISUITE_TOKEN"Upload cover image#
/users/cover-imageTokenUploads a new cover image (max 10 MB). Supported formats: JPEG, PNG, GIF, WebP.
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
filePflicht | string (binary) | – |
Antworten
- 201Cover image uploaded successfully
- 400No file provided, file too large, or invalid MIME type
- 401Not authenticated
curl -X POST "https://xapi.ambertech.cloud/api/v1/users/cover-image" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-F "file=@./datei.pdf"Delete cover image#
/users/cover-imageTokenRemoves the user's cover image from storage and clears the cover image URL and path.
Antworten
- 200Cover image deleted successfully
- 401Not authenticated
- 404User not found
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/users/cover-image" \
-H "Authorization: Bearer $XISUITE_TOKEN"List organization members#
/users/organization-membersTokenReturns all user profiles belonging to the authenticated user's organization.
Antworten
- 200Organization members returned
- 401Not authenticated
curl -X GET "https://xapi.ambertech.cloud/api/v1/users/organization-members" \
-H "Authorization: Bearer $XISUITE_TOKEN"Merge a migrated placeholder into a real member#
/users/organization-members/{userId}/mergeTokenMoves everything a migration placeholder user holds (tasks, comments, history, attachments, mentions, watchers, memberships, permissions) to a registered member of the caller's organization, then deletes the placeholder. Atomic. With `dry_run` nothing changes and the counts preview the merge.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
userIdPflicht | Pfad | string | public.users.id of the placeholder |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
target_user_idPflicht | string (uuid) | public.users.id of the real member that keeps the work |
dry_run | boolean | Only count what would move; nothing changes |
Antworten
- 200Merged, or previewed with dry_run
- 400Same user, or the target is not a registered member
- 401Not authenticated
- 403Missing can_edit_users
- 404Not a placeholder of this organization
- 409Placeholder belongs to another organization too, or a row is locked
curl -X POST "https://xapi.ambertech.cloud/api/v1/users/organization-members/{userId}/merge" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_user_id":"…"}'Change a member organization role#
/users/organization-members/{userId}/roleTokenUpdates `organization_members.role` for one member of the caller's own organization. Granting or revoking 'owner' requires the caller to be an owner, the caller cannot change their own role, and demoting the sole owner is rejected by the `prevent_demote_last_owner` database trigger.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
userIdPflicht | Pfad | string | public.users.id of the member |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
rolePflicht | string | The member's new organization role. Granting or revoking 'owner' requires the caller to be an owner. Werte: |
Antworten
- 200Role updated
- 400Invalid role, or the organization would be left without an owner
- 401Not authenticated
- 403Missing can_edit_users, self-target, or owner-only change
- 404Member not found in organization
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/users/organization-members/{userId}/role" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"role":"admin"}'Change several members organization roles#
/users/organization-members/roleTokenApplies one organization role to many members of the caller's own organization. Partial success: each user id is applied independently and failures are returned in `errors` rather than aborting the request. Granting or revoking 'owner' requires the caller to be an owner, and the caller cannot change their own role.
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
rolePflicht | string | The member's new organization role. Granting or revoking 'owner' requires the caller to be an owner. Werte: |
user_idsPflicht | string (uuid)[] | Users to update, up to 200. Applied per user, so the response reports partial success. |
Antworten
- 200Bulk role change processed
- 400Invalid role or user_ids
- 401Not authenticated
- 403Missing can_edit_users
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/users/organization-members/role" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"role":"admin","user_ids":[]}'Get current user profile#
/users/profileTokenReturns the authenticated user's profile with a fresh signed avatar and cover image URL.
Antworten
- 200User profile returned
- 401Not authenticated
- 404User profile not found
curl -X GET "https://xapi.ambertech.cloud/api/v1/users/profile" \
-H "Authorization: Bearer $XISUITE_TOKEN"Update user profile#
/users/profileTokenUpdates the authenticated user's profile fields. Only provided fields are changed.
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
first_name | string | |
last_name | string | |
mobile | string | |
role | string | |
country | string | |
language | string | |
date_of_birth | string |
Antworten
- 200Profile updated successfully
- 400Validation error
- 401Not authenticated
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/users/profile" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name":"Prince","last_name":"Jadiya","mobile":"9601910055"}'Search users in current org by name or email (ilike)#
/users/searchTokenReturns a lightweight list of `{ id, name, email, avatar_url }` for picker UIs. Scoped to the caller’s organization. Empty `q` returns the first `limit` members.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
q | Query | string | Search query (case-insensitive substring) |
limit | Query | number | Max results (default 20, max 50) |
Antworten
- 200Search results returned
- 401Not authenticated
- 403Missing can_view_users
curl -X GET "https://xapi.ambertech.cloud/api/v1/users/search" \
-H "Authorization: Bearer $XISUITE_TOKEN"