Integration Overview

Introduction to integrating via webhooks and API

Overview

1Flow provides three webhook endpoints for programmatic document management:

  • Upload - Upload documents via URL, multipart form data, or base64
  • Get - Retrieve document status and extracted data
  • Delete - Permanently delete documents

Authentication

All endpoints require your {webhookId} from Organization Settings.

Optionally configure a webhook secret and include it in the Authorization header:

Authorization: {your-webhook-secret}

Endpoints

1. Upload Document

POST /api/webhook/{webhookId}/document/upload

Upload documents via URL (recommended), multipart form data, or base64.

Show example
curl -X POST https://app.1flow.io/api/webhook/{webhookId}/document/upload \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/documents/invoice.pdf"
  }'

View full documentation →

2. Get Document

POST /api/webhook/{webhookId}/document/get

Retrieve document status and extracted data by document ID.

Show example
curl -X POST https://app.1flow.io/api/webhook/{webhookId}/document/get \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "doc_abc123xyz"
  }'

View full documentation →

3. Delete Document

POST /api/webhook/{webhookId}/document/delete

Permanently delete a document and all associated data.

Show example
curl -X POST https://app.1flow.io/api/webhook/{webhookId}/document/delete \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "doc_abc123xyz"
  }'

View full documentation →

Best Practices

  • Use URL uploads (recommended) for better reliability
  • Poll the get endpoint to check document status until extraction completes
  • Set up webhook callbacks to avoid polling
  • Always use HTTPS in production
  • Store webhook secrets securely