API Reference
HeyReq public REST API (v1) — authentication, endpoints, parameters, responses, and errors.
Overview
The HeyReq public REST API lets a workspace read its client requests and create new draft requests from outside the app. It is the same API that powers the HeyReq Zapier integration.
- Base URL:
https://heyreq.com - Version:
v1(in the path, for example/api/v1/requests) - Format: JSON everywhere. Responses are never cached (
Cache-Control: no-store). - Scope: every endpoint is isolated to the workspace that owns the API key. A request from another workspace behaves exactly like a request that does not exist.
Authentication
Every request must carry an API key in the Authorization header:
curl https://heyreq.com/api/v1/requests \
-H "Authorization: Bearer $HEYREQ_API_KEY"Rules:
- Only the
Authorization: Bearer <key>header is accepted. Cookies and URL parameters are ignored. - Keys look like
hrk_live_...and are shown only once, at creation time. Copy the whole key with the Copy button. Only a hash is stored, so a lost key cannot be recovered — revoke it and create a new one. - Create and revoke keys in the workspace settings API keys page. Each workspace can hold up to 20 keys.
- API access requires a Pro workspace. A key from a Free workspace is rejected with
403 PRO_REQUIRED(see Errors). There is no Free-plan quota to work around: Free workspaces cannot use the API at all.
Errors
All errors share one envelope:
{
"error": {
"code": "PRO_REQUIRED",
"message": "API access requires a Pro workspace."
}
}| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | No Authorization: Bearer header was sent. |
| 401 | INVALID_API_KEY | The key is unknown or has been revoked. |
| 403 | PRO_REQUIRED | The key belongs to a workspace that is not Pro. |
| 404 | NOT_FOUND | The request does not exist, or belongs to another workspace. Cross-workspace lookups never leak information. |
| 422 | VALIDATION | A parameter or body field is missing, malformed, or unknown. The message says which one. |
| 500 | INTERNAL | Something went wrong on the server. |
List requests
GET /api/v1/requests?status=published&updatedSince=2026-10-01T00:00:00.000Z&limit=50Returns the workspace's requests, ordered by updatedAt ascending (oldest first, so polling picks up new and updated records in order).
| Query parameter | Type | Description |
|---|---|---|
status | string, optional | Filter by one request status (see Status values). Without it, archived requests are excluded. An unknown status returns 422 VALIDATION. |
updatedSince | string, optional | ISO 8601 timestamp. Only requests updated after it are returned. An invalid timestamp returns 422 VALIDATION. Polling clients pass the last seen updatedAt here. |
limit | number, optional | Page size. Defaults to 50, clamped to 1–100. |
Response:
{
"requests": [
{
"id": "3f8a2b1c-4d5e-4a6b-9c0d-1e2f3a4b5c6d",
"name": "Year-end bookkeeping",
"status": "published",
"client": {
"id": "7a1b2c3d-4e5f-4a6b-9c0d-1e2f3a4b5c6d",
"fullName": "Acme Studio",
"email": "hello@acme.example",
"company": "Acme Studio LLC"
},
"dueAt": "2026-11-30T00:00:00.000Z",
"accessId": "a1b2c3d4",
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-28T10:02:00.000Z"
}
]
}Notes:
clientisnullwhen the request has no linked client.- Deleted requests are never returned.
- To poll for newly completed requests, call with
status=completedandupdatedSinceset to the last processedupdatedAt.
Get a request
GET /api/v1/requests/{id}Returns one request:
{
"request": {
"id": "3f8a2b1c-4d5e-4a6b-9c0d-1e2f3a4b5c6d",
"name": "Year-end bookkeeping",
"status": "in_progress",
"client": null,
"dueAt": null,
"accessId": "a1b2c3d4",
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-28T10:02:00.000Z"
}
}Returns 404 NOT_FOUND when the id is unknown or belongs to another workspace.
Create a request
POST /api/v1/requestsCreates a draft request. Publishing and client follow-up happen in the HeyReq app, not through this endpoint.
curl https://heyreq.com/api/v1/requests \
-H "Authorization: Bearer $HEYREQ_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: zap-run-2026-11-01-001" \
-d '{
"name": "Year-end bookkeeping",
"dueAt": "2026-11-30T00:00:00.000Z",
"clientEmail": "hello@acme.example",
"clientName": "Acme Studio"
}'| Body field | Type | Description |
|---|---|---|
name | string, required | Request name, 1–255 characters. |
dueAt | string or null, optional | Due date as an ISO 8601 timestamp. An invalid date returns 422 VALIDATION. |
clientId | string, optional | Id of an existing client in the same workspace. A client from another workspace returns 422 VALIDATION. |
clientEmail | string, optional | Client email. When no clientId is given, the client is looked up by email; if none exists, a new client is created. |
clientName | string, optional | Required when clientEmail would create a new client, otherwise 422 VALIDATION. Ignored when clientId is given. |
templateId | string, optional | Id of an active template in the same workspace (or a global template). An unknown or inactive template returns 422 VALIDATION. The new draft copies the template's current structure. |
Rules:
- The body must be a JSON object, and only the fields above are accepted. Any unknown field returns
422 VALIDATION. - The created request always starts as
draftand never requires client email verification (require_verificationis false). - Idempotency: send an
Idempotency-Keyheader to make retries safe. Repeating a request with the same key returns the original request with status200instead of creating a duplicate. A first-time create returns201.
Response (201 on create, 200 on idempotent replay):
{
"request": {
"id": "3f8a2b1c-4d5e-4a6b-9c0d-1e2f3a4b5c6d",
"name": "Year-end bookkeeping",
"status": "draft",
"client": {
"id": "7a1b2c3d-4e5f-4a6b-9c0d-1e2f3a4b5c6d",
"fullName": "Acme Studio",
"email": "hello@acme.example",
"company": null
},
"dueAt": "2026-11-30T00:00:00.000Z",
"accessId": "a1b2c3d4",
"createdAt": "2026-11-01T09:00:00.000Z",
"updatedAt": "2026-11-01T09:00:00.000Z"
}
}List answers
GET /api/v1/requests/{id}/answersReturns the latest version of each answer on the request, with the question title resolved from the request's structure. questionTitle is null when the title cannot be resolved.
{
"answers": [
{
"questionId": "q-annual-revenue",
"questionTitle": "What was your annual revenue?",
"status": "approved",
"value": 120000,
"version": 2,
"submittedAt": "2026-10-27T14:30:00.000Z",
"rejectionReason": null
}
]
}Returns 404 NOT_FOUND when the request is unknown or belongs to another workspace. A request with no answers yet returns an empty answers array.
Request status values
| Status | Meaning |
|---|---|
draft | Being built, not yet sent to the client. |
published | Sent to the client, awaiting answers. |
in_progress | Client is filling it in. |
in_review | Client submitted, awaiting team review. |
completed | Approved and done. |
closed | Closed without completion. |
reopened | Reopened after closing. |
archived | Archived (excluded from unfiltered lists). |
deleted | Deleted (never returned by the API). |