Skip to content

Create event

PUT
/events
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 /events returned 201 Created with a numeric event ID.
  • A minimal request without latitude and longitude was accepted.
  • The created event was retrieved successfully through GET /events/{eventId}; omitted coordinates were persisted as null.
  • dateTime was supplied as local wall-clock time and returned with an appended Z, while utcDateTime retained the explicitly supplied UTC value. Use utcDateTime for 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.

Customer-ID
required
string

Customer database ID

Media typeapplication/json
object
dateTime
required

Event date and time

string format: date-time
utcDateTime
required

Event date and time in UTC

string format: date-time
userId
required

Database ID of the user associated with the event

integer
carId
required

Database ID of the car associated with the event

integer
type
required

Event type. Documented values are CarOpened and CarClosed

string
userAgent
required

User agent to record for the event

string
latitude

Latitude, if available

number | null
longitude

Longitude, if available

number | null
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
}

Event was created successfully

Media typeapplication/json
object
id

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