Create group
const url = 'https://api-uat.flinkey.de/v3/groups';const options = { method: 'PUT', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"name":"Fleet Berlin"}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Customer-ID: example' \ --header 'flinkey-API-Key: <flinkey-API-Key>' \ --data '{ "name": "Fleet Berlin" }'Purpose
Create a new 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 new group must be created before assigning entities to it.
When to use this operation
Use this operation when the partner backend or operational backend needs to create a group.
Typical situations:
- creating a group for operational administration,
- preparing group-based assignment of cars,
- preparing group-based assignment of users,
- preparing group-based assignment of services,
- preparing group-based assignment of products,
- creating a group for reconciliation or support workflows,
- setting up a customer-specific grouping structure.
Before creating a group, check whether a group with the intended name already exists.
For standard access flows, partner backends usually work primarily with Car, User and Assignment.
Use grouping operations where the integration or operational process explicitly works with grouped cars, users, services or products.
Validation notes
PUT /groupswith a JSON object containingnamereturned201 Createdand a numeric group ID.- Persistence was verified through
GET /groups. - Repeating the create request with the same name returned
409 Conflictand a plain JSON string stating that a group with the same name already exists. - The validation group remains temporary and must be deleted after the complete Grouping validation block.
Async behavior
Synchronous.
The group creation result is returned directly in 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 identifiers are environment-specific.
Do not mix UAT and PROD group 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”Header Parameters
Section titled “Header Parameters”Customer database ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Name of the group to create
Example
{ "name": "Fleet Berlin"}Responses
Section titled “Responses”Group was created successfully
object
Database ID of the created group
Example
{ "id": 200}Group could not be created because no group name was provided
Recommended handling: Check that name is present and not empty
Invalid subscription key or missing / invalid access token
Recommended handling: Check flinkey-API-Key, bearer token and environment configuration
API Manager or customer context was not found
Recommended handling: Check credentials, token context and Customer-ID
A group with the same name already exists
Recommended handling: Retrieve existing groups and reconcile local group mapping before retrying
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
