Webhooks

Webhooks

Trigger AppPilot flows from your integration by event name, instead of polling.

How it works

The public External API exposes POST /v1/webhooks/trigger (scope webhooks.write). You send an event name; Appficient matches AppPilot triggers (or custom keys) and starts runs.

See also the Webhooks API reference.

bash
curl -sS -X POST https://api.appficient.nl/v1/webhooks/trigger \
  -H "Authorization: Bearer apf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "invoice.paid",
    "entity_type": "invoice",
    "entity_id": 522,
    "data": { "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
  }'

Request and response

Request body (required: event; optional: data, entity_type, entity_id):

json
{
  "event": "invoice.paid",
  "entity_type": "invoice",
  "entity_id": 522,
  "data": {
    "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}

Response:

json
{
  "data": {
    "event": "invoice.paid",
    "matched": 1,
    "runs": [
      {
        "flow_guid": "c9d0e1f2-a3b4-5678-9012-789012345678",
        "run_guid": "d0e1f2a3-b4c5-6789-0123-890123456789",
        "status": "queued"
      }
    ]
  },
  "meta": {}
}

Events

Built-in event names. Custom keys are also accepted.

EventWhen
ticket.inbound_messageInbound ticket message received
ticket.createdTicket created
ticket.status_changedTicket status changed
ticket.closedTicket closed
ticket.messageTicket message posted
ticket.staleTicket idle too long
quote.fase_changedQuote phase changed
quote.viewedQuote viewed
quote.acceptedQuote accepted
quote.createdQuote created
quote.converted_to_projectQuote converted to project
quote.silentQuote without response
deal.wonDeal won
deal.lostDeal lost
deal.phase_changedDeal phase changed
deal.quote_acceptedDeal quote accepted
deal.createdDeal created
deal.stalledDeal stalled
deal.phase_idleDeal idle in the same phase
deal.close_dueDeal close date approaching
deal.no_followupDeal without follow-up
sales.document_sentSales document sent
invoice.createdInvoice created
invoice.creditedInvoice credited
invoice.paidInvoice paid
invoice.lateInvoice overdue
project.createdProject created
project.completedProject completed
project.status_changedProject status changed
project.phase_completedProject phase completed
workorder.completedWork order completed
customer.createdCustomer created
customer.updatedCustomer updated
customer.first_invoice_paidFirst invoice of a customer paid
customer.inactiveCustomer inactive
customer.no_followupCustomer without follow-up
customer.payment_overdueCustomer payment overdue
subscription.expiringSubscription expiring
mail.unansweredMail unanswered
document.draftDocument in draft
work.recurringRecurring work
planning.scheduledPlanning scheduled
planning.rescheduledPlanning rescheduled
planning.updatedPlanning updated
planning.unscheduledPlanning unscheduled
planning.deletedPlanning deleted

Reliability

  • Rate limit on this route: 30/minute.
  • Handle runs idempotently on your side if you resend the same trigger.