---
title: "Zapier"
description: "Txuas Quire rau Zapier nrog webhook thiab REST API."
image: "https://docs.quirelms.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.quirelms.com/hmn/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier

<span id="zapier"></span>

Zapier txuas rau Quire ntawm tib REST API, OAuth client thiab webhook uas txhua kev txuas siv. Tsis muaj Quire code tshwj xeeb rau ib sab twg, yog li Zap siv tau txhua yam hauv [API reference](https://docs.quirelms.com/api/).

## Pib Zap thaum muaj xwm txheej hauv Quire <!--quire:start-a-zap-when-something-happens-in-quire-->

1. Hauv Zapier, xaiv **Webhooks by Zapier** ua trigger nrog xwm txheej **Catch Raw Hook**. Xaiv Raw vim xam signature siv byte kiag uas Quire xa. Luam qhov chaw nyob uas Zapier muab.
2. Hauv Quire, qhib `/admin/webhooks`, xaiv **Add subscription**, muab qhov chaw nyob tso thiab xaiv xwm txheej, xws li `course_completion.changed`. Quire xub xa xwm txheej xeem; subscription pib thaum Zapier tau txais.
3. Ntxiv **Code by Zapier** kauj ruam los xyuas signature nrog subscription secret, raws li [phau ntawv qhia tsim kho](/hmn/developer/#webhooks). Nres Zap yog tias xyuas tsis dhau.
4. Parse lub cev thiab ntxiv cov kauj ruam uas xav tau.

## Ua haujlwm hauv Quire ntawm Zap <!--quire:act-in-quire-from-a-zap-->

Siv **Webhooks by Zapier** nrog **Custom Request** action, lossis **API Request** hauv app step:

- **URL**: `https://acme.quirelms.com/api/v1/...`, xws li `/api/v1/enrolments` tso npe ib tug.
- **Headers**: `Authorization: Bearer qk_live_...` nrog key uas tsim ntawm `/admin/integrations/api-keys` rau Zap no nkaus xwb, thiab `Idempotency-Key` tsim raws trigger ID kom Zap uas Zapier rov khiav tsis tso npe tib tug ob zaug.
- **Data**: JSON raws li API reference qhia.

Yuav ua sawv cev rau ib tug neeg es tsis yog koom haum, tso npe OAuth client ntawm `/admin/integrations/oauth-clients` nrog Zapier redirect address thiab siv hauv private Zapier integration.

## Piv txwv: tso npe tus qhua thaum deal kaw <!--quire:example-enrol-a-customer-when-a-deal-closes-->

1. Trigger: CRM qhia tias “deal won”.
2. Custom request `PUT /api/v1/users/ext:{customer id}` nrog tus neeg npe thiab email: tsim user lossis hloov yog twb muaj.
3. Custom request `POST /api/v1/enrolments` nrog user thiab chav kawm, thiab `Idempotency-Key: deal-{deal id}`.

Source: https://docs.quirelms.com/hmn/integrations/zapier/index.mdx
