Integrations and the API
Connecting your own tools with the API and webhooks
Make an API key or OAuth client, choose what it may do, call your firm's API, and get webhooks when estimates change.
Keys and OAuth clients
Admins make them under Company settings, API. An API key is for your own scripts and automations: it is sent with every request. An OAuth client is for an app that uses the client-credentials flow: it trades its client id and secret for a short-lived access token.
- Open Company settings and choose API.
- Choose “New API key” or “New OAuth client”.
- Name it after what will use it, and tick the permissions it needs.
- Copy the key, or the client id and secret, straight away. It is shown only once.
Give each tool its own key with only the permissions it needs. Revoke one there and anything using it stops working at once; a revoked key can't be brought back, so make a new one.
What a key can do
- Read estimates: list estimates and read one with its properties.
- Write estimates: create estimates and change an estimate's status.
- Read tasks: list the firm's tasks.
- Read team: list the firm's members and their roles.
An estimate created through the API starts as a draft and reaches your team like one from your estimate form, but the client gets no receipt email. Changes made through the API show in the estimate's activity under the key's name.
Calling the API
Call it on your firm's own Selantia address, for example https://yourfirm.selantia.com/api/v1/estimates, with the key (or an access token) in an Authorization header: “Bearer” followed by the key. The full list of endpoints is at /api/v1/openapi.json on the same address.
Webhooks
A webhook tells your tool the moment something happens, instead of it asking the API over and over. Admins add an endpoint under Company settings, Webhooks: an https address on the public internet and the events it should get, “Estimate created” and “Estimate status changed”.
- Open Company settings and choose Webhooks.
- Choose “Add endpoint”, enter its https address and tick its events.
- Copy the signing secret straight away. It is shown only once.
- Choose “Send a test event” from the endpoint's menu and check it arrives.
Each event is a POST with a small JSON body naming the estimate; read the rest through the API. The Selantia-Signature header holds a timestamp and an HMAC-SHA256 of the timestamp and the body under the signing secret, so your endpoint can check the request came from Selantia.
If your endpoint doesn't answer with a 2xx status, Selantia tries twice more within about half a minute and then marks the delivery failed. Recent deliveries are listed on the Webhooks page, where you can resend a failed one; it keeps its event id, so your tool can tell it has seen it before.
Didn't find it?
Email [email protected]. If you can sign in, you can also send us a message from the Help Center in your dashboard.