Create Subscription
POSThttps://embedded.runalloy.com/2024-03/one/webhooks
Creates a webhook subscription for the topics provided.
Request
Header Parameters
Authorization stringrequired
Default value: bearer YOUR_API_KEY
- application/json
Body
address stringrequired
URL where the data will be sent to each time this webhook is triggered
topic string[]required
The topic of the subscription you want to register. Examples include commerce/customers
, accounting/invoices
, sync/completed
, etc. Find a full list of topics here
Responses
- 200
- 400
200
- application/json
- Schema
- Example (from schema)
- Result
Schema
subscription
object
{
"subscription": {
"address": "https://your-server.com/api/v1/webhhook",
"topic": [
"connection/created"
],
"isEnabled": false,
"subscriptionId": "658a0e6071defce8902069de"
}
}
{
"subscription": {
"address": "https://your-server.com/api/v1/webhhook",
"topic": [
"connection/created",
"connection/deleted",
"connection/authentication_failure",
"commerce/customers",
"commerce/orders",
"commerce/products",
"accounting/companyInfo",
"accounting/accounts",
"accounting/customers",
"accounting/taxRates",
"accounting/trackingCategories",
"accounting/vendors",
"accounting/items",
"accounting/payments",
"accounting/purchaseOrders",
"accounting/bills",
"accounting/invoices",
"crm/accounts",
"crm/contacts",
"crm/leads",
"crm/notes",
"crm/opportunities",
"crm/stages",
"crm/tasks",
"crm/users",
"sync/started",
"sync/completed",
"sync/failed"
],
"isEnabled": false,
"subscriptionId": "658a0e6071defce8902069de"
}
}
400
- application/json
- Schema
- Example (from schema)
- Result
Schema
object
{}
{}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://embedded.runalloy.com/2024-03/one/webhooks' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"address": "string",
"topic": [
"string"
]
}'
ResponseClear