Unassign user from customer
const url = 'https://api-uat.flinkey.de/v3/users/assignments/customers';const options = { method: 'DELETE', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"emailAddress":"user@example.com","userId":54321}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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/customerswith a numericuserIdreturned204 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 alternativeemailAddressrequest 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Customer database ID
Request Body
Section titled “Request Body”object
E-mail address of the user to unassign
Database ID of the user to unassign
Example
{ "emailAddress": "user@example.com", "userId": 54321}Responses
Section titled “Responses”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
