Assign user to group
const url = 'https://api-uat.flinkey.de/v3/groups/1/users';const options = { method: 'PUT', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"userId":54321}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api-uat.flinkey.de/v3/groups/1/users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Customer-ID: example' \ --header 'flinkey-API-Key: <flinkey-API-Key>' \ --data '{ "userId": 54321 }'Purpose
Assign a user to one specific group in the selected customer context.
A group is an entity represented by a group ID.
A group can contain cars, users, services and products.
Use this operation for operational grouping workflows where a user must be added to an existing group.
When to use this operation
Use this operation when the partner backend or operational backend needs to assign a user to a group.
Typical situations:
- adding a user to an operational group,
- preparing group-based user administration,
- grouping users for support workflows,
- grouping users for setup or reconciliation workflows,
- correcting group membership after reconciliation,
- maintaining group-based operational views.
Before assigning a user to a group, the partner backend should have resolved:
- the correct
Customer-ID, - the flinkey
groupId, - the flinkey
userId, - whether the group exists,
- whether the user exists,
- whether the user is already assigned to the group.
For standard access flows, partner backends usually work primarily with Car, User and Assignment.
Group membership is an operational grouping concept and should not be treated as the primary vehicle access permission.
Validation notes
- PROD returned
204 No Contentwith an empty body. A control GET returned the assigned user; after removal it returned an empty array.
Async behavior
Synchronous.
The group assignment result is represented by the API response.
Webhook result
No.
This operation does not produce a webhook result.
Security notes
Never log:
flinkey-API-Key,- bearer token,
- full request headers.
Group and user identifiers are environment-specific.
Do not mix UAT and PROD group IDs or user IDs.
Use placeholders in documentation, examples, screenshots and AI prompts.
For standard partner integrations, the mobile app must not receive API Manager credentials, backend bearer tokens or the flinkey-API-Key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Database ID of the group
Header Parameters
Section titled “Header Parameters”Customer database ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Database ID of the user to assign to the group
Example
{ "userId": 54321}Responses
Section titled “Responses”User was assigned to the group successfully
Invalid subscription key or missing / invalid access token
Recommended handling: Check flinkey-API-Key, bearer token and environment configuration
API Manager, customer context, group or user was not found
Recommended handling: Check credentials, token context, Customer-ID, local groupId mapping and local userId mapping
The user is already assigned to the group
Recommended handling: Treat as already assigned if this matches the intended state, or reconcile local group-user mapping
Request content type is missing or incorrect
Recommended handling: Ensure Content-Type: application/json is used
Server-side error
Recommended handling: Retry later if appropriate and escalate if persistent
