API & Webhooks
API gives other systems credentials to use LBM...
The REST API #
Settings > API gives other systems credentials to use LBM through its REST API: look up clients, create invoices and more, with an API key and the permissions you give it.
- Create a key per system, so you can revoke one without touching the others.
- Give each key only the permissions it needs. A key's permissions are scopes:
client.read,client.create,client.update,order.read,order.accept,order.cancel,service.read,service.update,service.suspend,service.cancel,service.terminate,invoice.read,invoice.cancel,transaction.create(record a payment),domain.read,ticket.read,ticket.createandticket.update. A scope is the same permission the matching admin screen needs. - A request is allowed only what both the key's scopes and the staff member who made it can do today. A key can never be given more than its maker has, and narrowing that person's role narrows every key they made at once.
- Keep keys secret: anyone with a key can do what it allows.
An interactive reference of the endpoints is part of the API documentation page of your install.
Webhooks #
Settings > Webhooks tells other systems when things happen, such as an invoice being paid, a service being suspended or a ticket being opened.
- Add a webhook with the address to call and the events to send. The events are:
client.created,order.created,order.cancelled,invoice.created,invoice.paid,invoice.cancelled,payment.received,payment.refunded,service.provisioned,service.suspended,service.unsuspended,service.transfer_warning,service.changed,service.cancelled,service.terminated,domain.registered,domain.transferred,domain.renewed,ticket.openedandticket.replied. - LBM sends a signed request to that address when one of the events happens, so the receiver can check it came from you.
- A webhook that fails is retried, and failures are recorded.
Gateway webhooks are different #
The webhooks in Settings > Payment gateways are the other direction: a payment provider calling LBM to say a payment happened. They are set up for you when you save a gateway's keys (Stripe, PayPal), and the address to give a provider is shown on the gateway's screen.
Something missing or wrong? Tell us or contact us.