Create Watch
POST
/api/watches
const url = 'http://localhost:8000/api/watches';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"config":{},"create_webhook_rule":false,"interval":"example","kind":"example","lead_id":1,"signal_types":["example"],"target":"example","webhook_secret_ref":"example","webhook_url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/watches \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "config": {}, "create_webhook_rule": false, "interval": "example", "kind": "example", "lead_id": 1, "signal_types": [ "example" ], "target": "example", "webhook_secret_ref": "example", "webhook_url": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
WatchCreate
object
create_webhook_rule
Create Webhook Rule
boolean
kind
required
Kind
string
signal_types
Any of:
Array<string>
null
target
required
Target
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}