Skip to main content

Overview

While every event has a primary resource (resource.type, resource.id, resource.name), many actions involve multiple resources. The targets field lets you attach additional resources to an event for cross-resource tracking.

Target Structure

Each target object has the following fields:
type
string
required
The type of resource. Example: folder, team, permission.
id
string
The resource identifier. Example: folder_3mK9pLq.
name
string
Human-readable name. Example: Engineering Team.
metadata
object
Optional metadata specific to this target.

Example

A user shares a document with a team and moves it to a folder:

Filtering by Target

Query events by target using the target_type and target_id query parameters:
This returns all events where the specified target appears in the targets array, regardless of the primary resource.

Use Cases

SDK Usage

Hash Chain

Targets are included in the hash chain computation. They are sorted by type then id before hashing to ensure deterministic results regardless of the order you provide them.