HeyReq

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."
  }
}
StatusCodeMeaning
401UNAUTHENTICATEDNo Authorization: Bearer header was sent.
401INVALID_API_KEYThe key is unknown or has been revoked.
403PRO_REQUIREDThe key belongs to a workspace that is not Pro.
404NOT_FOUNDThe request does not exist, or belongs to another workspace. Cross-workspace lookups never leak information.
422VALIDATIONA parameter or body field is missing, malformed, or unknown. The message says which one.
500INTERNALSomething went wrong on the server.

List requests

GET /api/v1/requests?status=published&updatedSince=2026-10-01T00:00:00.000Z&limit=50

Returns the workspace's requests, ordered by updatedAt ascending (oldest first, so polling picks up new and updated records in order).

Query parameterTypeDescription
statusstring, optionalFilter by one request status (see Status values). Without it, archived requests are excluded. An unknown status returns 422 VALIDATION.
updatedSincestring, optionalISO 8601 timestamp. Only requests updated after it are returned. An invalid timestamp returns 422 VALIDATION. Polling clients pass the last seen updatedAt here.
limitnumber, optionalPage 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:

  • client is null when the request has no linked client.
  • Deleted requests are never returned.
  • To poll for newly completed requests, call with status=completed and updatedSince set to the last processed updatedAt.

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/requests

Creates 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 fieldTypeDescription
namestring, requiredRequest name, 1–255 characters.
dueAtstring or null, optionalDue date as an ISO 8601 timestamp. An invalid date returns 422 VALIDATION.
clientIdstring, optionalId of an existing client in the same workspace. A client from another workspace returns 422 VALIDATION.
clientEmailstring, optionalClient email. When no clientId is given, the client is looked up by email; if none exists, a new client is created.
clientNamestring, optionalRequired when clientEmail would create a new client, otherwise 422 VALIDATION. Ignored when clientId is given.
templateIdstring, optionalId 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 draft and never requires client email verification (require_verification is false).
  • Idempotency: send an Idempotency-Key header to make retries safe. Repeating a request with the same key returns the original request with status 200 instead of creating a duplicate. A first-time create returns 201.

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}/answers

Returns 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

StatusMeaning
draftBeing built, not yet sent to the client.
publishedSent to the client, awaiting answers.
in_progressClient is filling it in.
in_reviewClient submitted, awaiting team review.
completedApproved and done.
closedClosed without completion.
reopenedReopened after closing.
archivedArchived (excluded from unfiltered lists).
deletedDeleted (never returned by the API).
API Reference