Skip to content

Create group

PUT
/groups
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 /groups with a JSON object containing name returned 201 Created and a numeric group ID.
  • Persistence was verified through GET /groups.
  • Repeating the create request with the same name returned 409 Conflict and 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.

Customer-ID
required
string

Customer database ID

Media typeapplication/json
object
name
required

Name of the group to create

string
Example
{
"name": "Fleet Berlin"
}

Group was created successfully

Media typeapplication/json
object
id

Database ID of the created group

number
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