---
title: HTTP / Webhooks
description: POST SAP documents to any HTTP endpoint or webhook URL. Supports multipart, JSON, and raw binary with configurable auth and retries.
type: http
use_cases:
  - Trigger custom workflows on document arrival
  - Send documents to any REST API
  - Integrate with Zapier, Make, or n8n via webhooks
config_fields:
  - name: url
    type: string
    required: true
    desc: "Endpoint URL"
  - name: method
    type: string
    required: false
    desc: "HTTP method: POST, PUT, or PATCH (default: POST)"
  - name: body_format
    type: string
    required: false
    desc: "Body format: multipart, json, or raw (default: multipart)"
  - name: headers
    type: object
    required: false
    desc: "Custom HTTP headers as key-value pairs"
  - name: retry_count
    type: integer
    required: false
    desc: "Number of retries on failure (default 3)"
  - name: retry_delay
    type: integer
    required: false
    desc: "Delay between retries in ms (default 1000)"
credential_fields:
  - name: auth_type
    type: string
    required: false
    desc: "Auth type: none, bearer, basic, or api_key"
  - name: token
    type: string
    required: false
    desc: "Bearer token (when auth_type = bearer)"
  - name: username
    type: string
    required: false
    desc: "Username (when auth_type = basic)"
  - name: password
    type: string
    required: false
    desc: "Password (when auth_type = basic)"
  - name: api_key_header
    type: string
    required: false
    desc: "Header name for API key (default: X-API-Key)"
  - name: api_key
    type: string
    required: false
    desc: "API key value"
---

POST SAP documents to any HTTP endpoint or webhook URL. This is the most flexible connector — it works with any system that accepts HTTP requests.

## Body Formats

### Multipart (default)

```
POST /your-endpoint HTTP/1.1
Content-Type: multipart/form-data

file: <binary file content>
file_name: invoice-2026.pdf
mime_type: application/pdf
subfolder: 2026/04
```

### JSON (base64)

```json
POST /your-endpoint HTTP/1.1
Content-Type: application/json

{
  "file_name": "invoice-2026.pdf",
  "mime_type": "application/pdf",
  "subfolder": "2026/04",
  "content": "<base64-encoded-file>"
}
```

### Raw Binary

```
PUT /your-endpoint HTTP/1.1
Content-Type: application/pdf
X-File-Name: invoice-2026.pdf
X-Subfolder: 2026/04

<raw binary file content>
```

## Expected Response

FileRelay treats any **2xx** status code as success:

- `200 OK` — standard success
- `201 Created` — resource created
- `202 Accepted` — async processing accepted

Any non-2xx response triggers retries (up to `retry_count` times with `retry_delay` between attempts).

## Authentication

| Type | Headers Sent |
|------|-------------|
| None | No auth headers |
| Bearer | `Authorization: Bearer <token>` |
| Basic | `Authorization: Basic <base64(user:pass)>` |
| API Key | `<custom-header>: <key>` (default: `X-API-Key`) |

## Use with Zapier / Make / n8n

Set up a webhook trigger in your automation platform, copy the webhook URL, and paste it as the endpoint URL in FileRelay. Use JSON body format for easiest parsing.
