---
title: "Authorize Zapier"
method: POST
path: "/zapier/oauth/authorize"
tags: ["Zapier"]
---

# Authorize Zapier

`POST /zapier/oauth/authorize`

## Request

- Base URL: `https://api.openintake.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openintake.ai/zapier/oauth/authorize`
- Auth: none declared

Mint an authorization code for the logged-in firm admin and return the
Zapier redirect URL (with code + state appended) for the SPA to navigate
to. Cookie-authenticated and same-site (called by our own frontend).

## Request body

- ZapierAuthorizeRequest: Body the SPA posts (same-site, cookie-authenticated) to mint an authorization code on behalf of the logged-in firm admin. The values originate from the query string Zapier sent to the frontend authorize page.
  - `client_id` string, required: OAuth client_id supplied by Zapier
  - `redirect_uri` string, required: Zapier callback the code is delivered to
  - `response_type` string: Must be 'code'
  - `scope` string, nullable: Requested scope (optional)
  - `state` string, nullable: Opaque CSRF value echoed back to Zapier

## Response `200`

Successful Response

- ZapierAuthorizeResponse: The fully-built redirect URL the SPA should send the browser to, with the freshly minted code (and echoed state) appended.
  - `redirect_to` string, required: Zapier redirect_uri with ?code=...&state=... appended

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/openintake/apis/openintake-api.md) - [All operations](https://skmtc.dev/openintake/apis/openintake-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openintake/apis/openintake-api/revisions/de90a8dcbc07?raw)
