Create a webhook
The webhook secret is returned only on creation. Store it securely to verify webhook signatures.
POST
/projects/{projectId}/webhooks
The webhook secret is returned only on creation. Store it securely to verify webhook signatures.
Authentication
API Key (header: X-API-Key)
Path Parameters
projectId
string
required
path
Request Body required
application/jsonResponses
201
Created webhook with secret
application/jsondata
object
id
string
url
string (uri)
events
string[]
Array of:
secret
string
Only returned on creation
status
string
Enum:
active, disabledfailure_count
integer
last_triggered_at
string (date-time) | null
created_at
string (date-time)
curl -X POST 'https://api.rogeriq.com/api/v1/projects/string/webhooks' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d 'null'
const response = await fetch('https://api.rogeriq.com/api/v1/projects/string/webhooks', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify(null)});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://api.rogeriq.com/api/v1/projects/string/webhooks', headers=headers, json=null)print(response.json())
201
Response
{ "data": { "id": "<string>", "url": "<uri>", "events": [ "<string>" ], "secret": "<string>", "status": "active", "failure_count": 123, "last_triggered_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z" }}
API Playground
Try this endpoint
POST
/projects/{projectId}/webhooks