Documentation
  • Overview
  • How It Works
  • Developer API
    • Introduction
    • Initial Test
    • Setup
    • JS SDK
    • HTTPS API
      • Identity
      • Identity Status
      • Signal
    • Webhook
    • User Involvement
    • Bans
    • Boilerplates
      • Node.js
    • Types
      • Identity
      • Signal
      • Event
        • Type
        • Level
        • EventSignal
        • Recommendation
          • Ban
            • Action
          • Type
      • ImmediateResult
      • Identifiers
      • Device
      • Location
      • Carrier
      • IP
      • Tor
      • VPN
      • Approvable
Powered by GitBook
On this page
  • Endpoint
  • Methods
  • POST
  1. Developer API
  2. HTTPS API

Signal

Send a Signal to DFend.

PreviousIdentity StatusNextWebhook

Last updated 2 years ago

Endpoint

https://api.dfend.app/signal

Accepts requests from client or server environments (publishable or secret API key).

Methods

POST

Send a . Some fields will only be accepted from a server environment.

When using your secret API key, we will create Identities on the fly when we receive Signals with an unrecognized user ID.

Accepts (client environment)

body object An object containing the following subset of fields that are suitable for sending from a client environment:

  • idempotencyKey string optional Prevent duplicate events by providing a unique key for this signal.

  • type string optional A custom string value representing the type of event.

  • source enum A string of value 'App' | 'Browser'.

  • device Device optional An object of type.

  • identifiers object An object containing at least one of the following fields:

    • userId string The user's primary key or unique ID in your system.

    • identity string The id value of the user's in DFend.

Accepts (server environment)

  • idempotencyKey string optional Prevent duplicate events by providing a unique key for this signal.

  • type string optional A custom string value representing the type of event.

  • source enum A string of value 'Server'.

  • ip string The user's client IP address from the original request you received.

  • userAgent string optional The user's client user-agent from the original request you received.

  • lat number optional The latitude coordinate, if you obtained it from the user's device.

  • lon number optional The longitude coordinate, if you obtained it from the user's device.

  • metadata object optional Custom metadata you wish to add to this Signal.

  • time number optional A Unix timestamp (ms) representing the original time of Signal event.

Returns

A JSON-encoded object containing the following fields:

  • started number A Unix timestamp (ms).

  • finished number A Unix timestamp (ms).

body object An object containing the following subset of fields that are suitable for sending from a server environment:

device Device optional An object of type.

identifiers object An object containing at least one primary and any secondary .

immediateResults ImmediateResult[] An array of objects.

Signal
Signal
Device
Identity
Signal
Device
Identifiers
ImmediateResult