Outbound webhooks and the API
Push events from Mav to your systems with an outbound notification, and send contacts, record conversions and add webhooks through the API or Zapier.
Outbound notifications: Mav tells your systems
An outbound notification sends an event to you every time something happens to a contact. Add one under Integrations › Outbound with Add notification, or from an agent's Outbound Notifications section.
- Agents: all agents, including ones added later, or specific ones. When Mav deletes an agent, it takes the agent off the notification. A notification with no agents left turns off.
- Events: tick the ones you want, or leave all unticked to get every event. Events include Started, Interested, Reengagement Sent, Opted Out, Undeliverable, Qualified, Quoted, Sold, Custom Conversion, Link Clicked and the phone call events (scheduled, started, connected, transferred, completed, missed).
- Delivery: a Webhook (GET or POST, with an optional Bearer token) or an Email to one address. A POST goes as JSON or a form.
- Parameters: leave empty to send Mav's standard payload. Add parameters to send only those, in the URL for GET or in the body for POST. Type
{in a value to fill it from the contact or the event, like{phone_national}for the phone without the country code.
Click Send test to post one sample event for a fictional contact right away. The payload carries activity.properties.test: true and nothing is saved.
Delivery rules
Mav waits 3 seconds to connect and 3 more for your answer, so reply 200 first and do the work after. Any 2xx counts. Redirects are not followed. A failed delivery is retried up to 18 times over about four days. If the last retry fails, the notification is turned off and your account's admins and managers get an email. A 410 Gone answer turns it off right away, with no retries. Fix it and click Save changes to turn it back on. See A webhook was turned off.
A retry can deliver the same event twice. Dedupe on the contact id, the event label and its timestamp.
The API: your systems tell Mav
The API at https://hiremav.com/api/v3 lets your rater, agency management system or CRM send contacts to an agent, look them up, stop a conversation, opt them out, record conversions and add webhooks. A Manager finds your API key in Mav under Integrations › API. Send it as Authorization: Bearer YOUR_API_KEY.
| Call | What it does |
|---|---|
GET /contacts/find?phone= |
Find a contact by phone, in any US format. |
GET /contacts/{id} |
One contact, with the properties your vendor sent. |
POST /contacts |
Send a contact to an agent, which starts texting or calling them. |
POST /contacts/{id}/stop |
Stop a contact's open conversation without opting them out. |
POST /contacts/{id}/opt_out |
Opt a contact out and block their phone number. Mav sends no confirmation text. |
POST /opt_outs |
Opt out a phone number, whether or not you have a contact with it. |
GET /agents |
Your agents, with the id a new contact needs. |
GET /agents/{id}/contact_fields |
The fields that agent reads: home fields for a home agent, auto fields for the rest. |
GET /conversions |
Your conversions: Quoted, Sold and any custom ones. |
POST /conversions/{id}/events |
Record a conversion for a contact, with an optional value in cents. |
GET /events |
Every event a webhook can send. |
POST /webhooks |
Add a webhook notification for the events and agents you name. |
DELETE /webhooks/{id} |
Remove one. |
GET /webhooks/samples |
Your newest events, in the shape a webhook delivers. |
Money is in cents, timestamps are ISO 8601, and ids are strings that never change. Each conversion's id is also under Settings › Conversions. A key sees one account only. Recording a conversion twice returns the first record, so retries are safe. Sending a contact whose phone you already have returns that contact.
Opting out adds the phone number to your blocked numbers, under Settings › Filters › Blocked Numbers. POST /opt_outs does this even when you have no contact with that number. Stopping and opting out answer with messages, which says what Mav did.
A webhook added through the API is an outbound notification like any other. It shows in the same list, and you can edit or remove it there.
The full reference, with a request and response for every call, the webhook payload and every error, is at hiremav.com/api. Every section there is also served as Markdown for your own tools.
Zapier: no code
Version 6 of the Mav app on Zapier uses the same API, so a Zap can do all of this without code. Version 6 is private for now, so you need an invitation to use it. See Mav on Zapier.
Still have a question?
Our team answers in the thread. Ask us anything about your account.