Webhooks
Resource created
Aira sends this event after it creates a resource, which a user creates in the billing app or a system creates through the API.
WEBHOOK
resource.created
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "resource.created",
"payload": {
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Emails sent",
"aggregateByField": "value",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": [
{
"property": "eventName",
"operator": "equals",
"valueType": "text",
"value": "email_sent",
"group": "eventName"
},
{
"property": "type",
"operator": "equals",
"valueType": "text",
"value": "transactional",
"group": "type"
},
{
"property": "type",
"operator": "equals",
"valueType": "text",
"value": "marketing",
"group": "type"
}
],
"archivedAt": "2023-11-07T05:31:56Z"
}
}
}Headers
Body
application/json
The event, with its identifier, its name and its payload.
Response
2XX
Answer with a 2XX status to confirm the delivery. Aira retries a delivery that gets another status, a redirect or no answer.
⌘I
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "resource.created",
"payload": {
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Emails sent",
"aggregateByField": "value",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": [
{
"property": "eventName",
"operator": "equals",
"valueType": "text",
"value": "email_sent",
"group": "eventName"
},
{
"property": "type",
"operator": "equals",
"valueType": "text",
"value": "transactional",
"group": "type"
},
{
"property": "type",
"operator": "equals",
"valueType": "text",
"value": "marketing",
"group": "type"
}
],
"archivedAt": "2023-11-07T05:31:56Z"
}
}
}