Skip to content

Unassign user from customer

DELETE
/users/assignments/customers
curl --request DELETE \
--url https://api-uat.flinkey.de/v3/users/assignments/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Customer-ID: example' \
--header 'flinkey-API-Key: <flinkey-API-Key>' \
--data '{ "emailAddress": "user@example.com", "userId": 54321 }'

Purpose

Remove an existing user assignment from the selected customer context.

A user represents the access identity that can receive assignments for cars.

This operation removes the link between an existing user and the customer identified by the Customer-ID header.

Use this operation only when the user should no longer belong to the selected customer context.

When to use this operation

Use this operation when the partner backend needs to remove a user from the selected customer context.

Typical situations:

  • a user should no longer be available in the selected customer context,
  • a customer-user assignment was created incorrectly,
  • a user mapping is being retired,
  • a user was assigned to the wrong customer context,
  • user/customer access data is being reconciled.

Before unassigning a user from a customer, check whether the user is still referenced by active partner processes or assignments.

Do not unassign a user only because the user currently has no active assignment.

In most integrations, the partner backend should persist a mapping between the partner customer or driver and the flinkey userId.

After successful unassignment, update the local mapping state.

Validation notes

PROD validation result:

  • DELETE /users/assignments/customers with a numeric userId returned 204 No Content.
  • The user was no longer visible in the selected customer context after the operation.
  • Removal of the user-customer assignment was additionally confirmed in the application portal.
  • The same existing user was subsequently assigned to the customer again successfully.
  • The validated request used userId. The alternative emailAddress request form was not separately validated.

Async behavior

Synchronous.

The unassignment from the customer is completed directly by the API operation.

Webhook result

No.

This operation does not produce a webhook result.

Security notes

Never log:

  • flinkey-API-Key,
  • bearer token,
  • full request headers.

User identifiers are environment-specific.

Do not mix UAT and PROD 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.

Customer-ID
required
string

Customer database ID

Media typeapplication/json
object
emailAddress

E-mail address of the user to unassign

string | null
userId

Database ID of the user to unassign

number | null
Example
{
"emailAddress": "user@example.com",
"userId": 54321
}

User was unassigned from the customer successfully

Invalid e-mail address and userId given, or no valid identifier was provided

Recommended handling: Provide either a valid emailAddress or a valid userId

Invalid subscription key or missing / invalid access token

Recommended handling: Check flinkey-API-Key, bearer token and environment configuration

API Manager, user or user-customer assignment was not found

Recommended handling: Check credentials, Customer-ID, user identifier and whether the assignment exists

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