hornet icon

hornet

Interact with hornet API

Actions452

Emails Deny And Allowlisting → Emails Black White List Import Post

AI-generated

Summary

Import email allowlist or denylist entries for a given object

Inputs

  • Object Id (object_id) (required) — ID of the object (user or customer) whose list is being modified. Sent as a query parameter.
  • APP ID (APP-ID) (required) — Application ID issued by Hornet Security. Sent as a request header.
  • Type (type) (required) — List type: 1 = allowlist, 2 = denylist. Sent in the request body.
  • Data (data) (required) — Array of email addresses to import. Sent in the request body.
  • Extended Data (extended_data) — Array of per‑entry extended settings objects (spam protection, content filter, etc.). Only usable by customer administrators. Sent in the request body.
  • Mode (mode) — Import mode: 1 = Add, 2 = Add and delete existing entries not in the supplied list. Defaults to 0 (Add). Sent in the request body.
  • Dry Run (dry_run) — When true, performs a trial run that reports what would be changed without modifying the list. Sent in the request body.

Output shape

API response containing import results (e.g., counts of added/deleted entries, validation errors).

The response structure follows the Hornet API’s import endpoint.

Examples

Example 1: Add emails to an allowlist

Set Type=1, Mode=1, provide email array in Data, leave Dry Run false.

Example 2: Test import without changes

Set Dry Run=true to see what would be added/deleted.

Links

Discussion