Signal
Send a Signal to DFend.
Endpoint
https://api.dfend.app/signal
Accepts requests from client or server environments (publishable or secret API key).
Methods
POST
Send a Signal. Some fields will only be accepted from a server environment.
Accepts (client environment)
body object An object containing the following subset of Signal fields that are suitable for sending from a client environment:
idempotencyKeystring optional Prevent duplicate events by providing a unique key for this signal.typestring optional A custom string value representing the type of event.sourceenum A string of value'App' | 'Browser'.deviceDevice optional An object of Device type.identifiersobject An object containing at least one of the following fields:userIdstring The user's primary key or unique ID in your system.identitystring Theidvalue of the user's Identity in DFend.
Accepts (server environment)
body object An object containing the following subset of Signal fields that are suitable for sending from a server environment:
idempotencyKeystring optional Prevent duplicate events by providing a unique key for this signal.typestring optional A custom string value representing the type of event.sourceenum A string of value'Server'.deviceDevice optional An object of Device type.identifiersobject An object containing at least one primary and any secondary Identifiers.ipstring The user's client IP address from the original request you received.userAgentstring optional The user's client user-agent from the original request you received.latnumber optional The latitude coordinate, if you obtained it from the user's device.lonnumber optional The longitude coordinate, if you obtained it from the user's device.metadataobject optional Custom metadata you wish to add to this Signal.timenumber optional A Unix timestamp (ms) representing the original time of Signal event.
Returns
A JSON-encoded object containing the following fields:
startednumber A Unix timestamp (ms).finishednumber A Unix timestamp (ms).immediateResultsImmediateResult[] An array of ImmediateResult objects.
Last updated