DOCS

API REFERENCE

[DIRECTIVE] INTEGRATE PARSEHOOK PROGRAMMATICALLY USING SECURE REST API ENDPOINTS, VALIDATING REQUESTS VIA API KEYS INSTANTLY.

Base URL: https://api.parsehook.com

Need an API key? Manage your API Credentials or review Webhook Error Codes for debugging dispatch failures.

AUTHENTICATION

All API requests require an API key. Create one in your API Settings. Pass the key as a Bearer token in the Authorization header:

API access is available on Pro, Business, and Enterprise plans. Free plan users can use the dashboard but cannot create API keys.

CURL
curl https://api.parsehook.com/v1/parse \
  -H "Authorization: Bearer pa_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"email": "raw_email_stream_here"}'

PARSE EMAIL

POST/v1/parse

Parses a raw email provided in the request body and returns structured JSON. This endpoint is the core of ParseHook.

REQUEST BODY
{
  "email": "raw_email_stream_here"
}
RESPONSE 200
{
  "event": "email.parsed",
  "email_id": "uuid-here",
  "from": {
    "email": "billing@vendor.com",
    "name": "Vendor Corp"
  },
  "subject": "Invoice #INV-2024-88",
  "parsed_data": {
    "type": "invoice",
    "invoice_number": "INV-2024-88",
    "amount": 1250.00,
    "currency": "USD",
    "vendor": "vendor.com",
    "due_date": "2024-02-15"
  },
  "metadata": {
    "parsing_method": "multi_model_ai",
    "parsing_confidence": 0.96,
    "received_at": "2024-01-15T14:22:00Z"
  }
}

INBOXES

GET/api/inboxes/

List all inboxes for the authenticated user.

[
  {
    "id": "uuid",
    "name": "Invoices",
    "inbox_address": "x7k2m9@mails.parsehook.com",
    "is_active": true,
    "email_count": 42
  }
]
POST/api/inboxes/

Create a new inbox. Body: { "name": "string" }

{
  "id": "uuid",
  "name": "Invoices",
  "inbox_address": "x7k2m9@mails.parsehook.com",
  "is_active": true
}
DELETE/api/inboxes/{id}

Deactivate an inbox. Emails already received are retained.

{
  "status": "deactivated",
  "inbox_id": "uuid"
}

EMAILS

GET
/api/emails/

List emails. Query params: limit (default 50), offset, inbox_id

GET
/api/emails/{id}

Get a single email including body text and parsed data.

POST
/api/emails/{id}/feedback

Submit feedback. Body: { "feedback": "correct" | "incorrect", "corrected_data": {} }

ERROR CODES

CodeMeaning
200Success
201Resource created
400Bad request — check your payload
401Missing or invalid API key
403Access denied — resource belongs to another user or plan limits exceeded
404Resource not found
422Validation error — check field formats
429Rate limit exceeded — limits depend on plan. Free: no API access. Pro: 10 requests per minute. Business: 100 requests per minute.
500Server error — retry with exponential backoff