Skip to main content
POST
Create a browser action

Body

application/json
type
enum<string>
required

The action the SDK performs after the link is opened. impersonation signs the browser in as user_id; clickmap-overlay mounts the clickmap overlay.

Available options:
impersonation,
clickmap-overlay
Example:

"impersonation"

origin
string
required

The project's trusted origin where the link opens. The action can only be consumed by a request whose Origin header matches this value.

Example:

"https://app.example.com"

expires_in_millis
integer
default:300000

How long the single-use link remains redeemable, in milliseconds.

Example:

300000

session_expires_in_millis
integer
default:7200000

Lifetime of the impersonation session, measured from link creation. Ignored for clickmap-overlay actions.

Example:

7200000

user_id
string

ID of the user to impersonate. Required when type is impersonation and ignored for clickmap-overlay.

Example:

"user_123"

Response

200 - application/json

Successful response

id
string
required

Opaque, single-use browser action ID.

Example:

"browser_action_code"

url
string
required

URL at the requested trusted origin containing the browser action ID. Open it in the target browser to perform the action.

Example:

"https://app.example.com/?hexclave_action_id=browser_action_code"

expires_at_millis
number
required

Unix timestamp in milliseconds after which the browser action can no longer be consumed.

Example:

1800000000000