Notifications

Add a notification target

Where approvals and automation output reach a human: a phone number, an https webhook, an email address, or a push token.

An SMS target is created unverified and stays that way until someone proves they hold the number. Adding a number must not itself be an authorisation — otherwise a session borrowed for five minutes leaves behind a number that can approve things long after it is gone. An unverified target still receives notifications; it just cannot reply to decide one.

post/v1/notification-targets

Request

  • Base URL: https://api.1claw.co
  • URL: https://api.1claw.co/v1/notification-targets
  • Auth: HTTP bearer

Request body

target_type'sms' | 'webhook' | 'expo' | 'email' required
configobject required

{"phone_number": "+14155550123"} for sms (E.164 only), {"url": "https://…"} for webhook (https only), {"email": "…"}, or {"push_token": "…"}.

eventsstring[]

Empty means every event.

agent_idstring uuid

The agent whose SMS channel sends to this target.

user_idstring uuid

Defaults to the caller.

Response

Target created, unverified

idstring uuid required
target_type'sms' | 'webhook' | 'expo' | 'email' required
user_idstring uuid nullable
agent_idstring uuid nullable
configobject required
eventsstring[] required
is_activeboolean required
verifiedboolean required

An unverified SMS target receives notifications but cannot decide an approval by reply.

created_atstring date-time required

Changes

No recorded changes to this operation across all 2 revisions of this API.