Create event
const url = 'https://api-uat.flinkey.de/v3/events';const options = { method: 'PUT', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"dateTime":"2026-07-01T10:15:30.000","utcDateTime":"2026-07-01T08:15:30.000Z","userId":67890,"carId":123,"type":"CarOpened","userAgent":"partner-backend","latitude":51.2562,"longitude":7.1508}'};
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/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Customer-ID: example' \ --header 'flinkey-API-Key: <flinkey-API-Key>' \ --data '{ "dateTime": "2026-07-01T10:15:30.000", "utcDateTime": "2026-07-01T08:15:30.000Z", "userId": 67890, "carId": 123, "type": "CarOpened", "userAgent": "partner-backend", "latitude": 51.2562, "longitude": 7.1508 }'Purpose
Create one open or close event for a car and user in the selected customer context.
An event represents an open or close event of a car.
Use this operation only where partner-side event creation is explicitly required.
In standard access flows, partner integrations usually consume events rather than creating them directly.
This operation creates an operational event record.
It does not create access rights.
It does not unlock or lock a vehicle.
It does not create or change assignments.
When to use this operation
Use this operation when the partner backend needs to create an event record in flinkey.
Typical situations:
- creating an operational open or close event from a trusted backend process,
- importing event data from a controlled integration workflow,
- recording event information where the partner backend is the source of the event,
- creating event records for advanced operational integrations.
For standard access flows, partner backends usually work primarily with Car, User and Assignment.
Events are operational records and should not be treated as the primary access permission model.
Access permissions are managed through assignments between User and Car.
Before creating an event, the partner backend must have resolved:
- the correct
Customer-ID, - the flinkey
carId, - the flinkey
userId, - the event type,
- the event timestamp,
- the UTC event timestamp,
- the user agent to be recorded.
Validation notes
PUT /eventsreturned201 Createdwith a numeric event ID.- A minimal request without
latitudeandlongitudewas accepted. - The created event was retrieved successfully through
GET /events/{eventId}; omitted coordinates were persisted asnull. dateTimewas supplied as local wall-clock time and returned with an appendedZ, whileutcDateTimeretained the explicitly supplied UTC value. UseutcDateTimefor unambiguous time processing.- No event deletion endpoint is documented, so the validation event could not be removed through the public API.
Async behavior
Synchronous.
The creation 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.
Event data can contain operational access history.
Treat event records as sensitive operational data.
Car, user and event identifiers are environment-specific.
Do not mix UAT and PROD 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
Event date and time
Event date and time in UTC
Database ID of the user associated with the event
Database ID of the car associated with the event
Event type. Documented values are CarOpened and CarClosed
User agent to record for the event
Latitude, if available
Longitude, if available
Example
{ "dateTime": "2026-07-01T10:15:30.000", "utcDateTime": "2026-07-01T08:15:30.000Z", "userId": 67890, "carId": 123, "type": "CarOpened", "userAgent": "partner-backend", "latitude": 51.2562, "longitude": 7.1508}Responses
Section titled “Responses”Event was created successfully
object
Database ID of the created event
Example
{ "id": 12345}Event could not be created because type, dateTime, utcDateTime or userAgent is invalid or missing
Recommended handling: Validate required request fields before retrying
Invalid subscription key or missing / invalid access token
Recommended handling: Check flinkey-API-Key, bearer token and environment configuration
API Manager was not found, the car was not found for the selected customer, or the user was not found for the selected customer
Recommended handling: Check credentials, token context, Customer-ID, local carId mapping, local userId mapping and environment
Request media type is not supported
Recommended handling: Send Content-Type: application/json
Server-side error
Recommended handling: Retry later if appropriate and escalate if persistent
