create a webhook.md
Documentation Index
Fetch the complete documentation index at: https://filecheck.io/docs/llms.txt Use this file to discover all available pages before exploring further.
Create a webhook
Payloads are signed: X-FileCheck-Signature is the hex HMAC-SHA256 of the raw body, keyed with your Auth Key.
OpenAPI
openapi: 3.1.0
info:
title: Filecheck API
version: 1.1.0
description: >-
The Filecheck REST API. Submit files as jobs and fetch results, and set up
your account: workflows, upload rules, preflight profiles, connectors,
optimize presets, delivery destinations, product mappings, storefront
settings and webhooks. All requests are authenticated server-side with your
secret key (`sk_live_…`).
servers:
- url: https://api.filecheck.io
description: Production
security:
- bearerAuth: []
tags:
- name: Jobs
description: >-
Submit files for preflight, fixing, optimization, validation and previews,
and read the results.
- name: Uploads
description: Presigned credentials to upload large files directly.
- name: Orders
description: Attach jobs to commerce orders.
- name: Workflows
description: >-
What happens to a customer's files for a product: the intake rule that
checks them on upload, the processing streams, proofing, merging and
delivery. Products in your store map to a workflow.
- name: Rules
description: >-
Upload rules: which files a product accepts (kinds, MIME types, how many),
which preflight profile checks each kind, and what happens when a file
fails. A workflow's intake points at one rule.
- name: Profiles
description: >-
Preflight profiles: the checks run on a file (size, bleed, resolution,
colour, fonts…) with their thresholds, severities and automatic fixes. PDF
profiles check PDFs (and vector and office files once converted); raster
profiles check images.
- name: Connectors
description: >-
Connectors wire a product page to the Element: what the shopper chose
(size, page count, sides, finishing) adjusts the rule's size checks for
that upload, and what FileCheck measured in the file (page count, size,
area) can fill the page's own inputs so the store prices from the real
file. The cart plugins store the chosen connector per product.
- name: Optimize presets
description: >-
Saved optimize settings (compression, downsampling, colour conversion)
that optimize steps can use.
- name: Destinations
description: >-
Where finished files are delivered: SFTP and FTP hotfolders, S3 buckets,
webhooks. Workflows list the destinations they deliver to. Secrets are
write-only.
- name: Products
description: >-
Which workflow each product in your store uses. The storefront Element
opens the mapped workflow on the product page.
- name: Settings
description: >-
How the storefront Element appears on your product pages: where it mounts,
the add-to-cart button it guards, display mode and theme.
- name: Webhooks
description: >-
HTTP callbacks for job, proof, account and billing events, signed with
X-FileCheck-Signature.
paths:
/webhooks:
post:
tags:
- Webhooks
summary: Create a webhook
description: >-
Payloads are signed: X-FileCheck-Signature is the hex HMAC-SHA256 of the
raw body, keyed with your Auth Key.
operationId: createWebhook
parameters:
- name: dryRun
in: query
schema:
type: boolean
default: false
description: >-
Validate and check references without saving: the response shows the
record as it would be saved.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Webhook'
responses:
'201':
description: OK
content:
application/json:
schema:
type: object
properties:
webhook:
allOf:
- $ref: '#/components/schemas/Webhook'
- $ref: '#/components/schemas/RecordFields'
dryRun:
type: boolean
description: Present and true when nothing was saved.
'400':
description: >-
Invalid request: `code` says why, `param` names the field, `details`
lists every problem
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Webhook:
title: Webhook
description: >-
An HTTPS endpoint FileCheck calls when events happen on your account:
jobs created, completed or delivered, proofs ready or approved, settings
changed, credits running low. Each call is a JSON POST signed with
X-FileCheck-Signature (the hex HMAC-SHA256 of the raw body, keyed with
your Auth Key). Delivery is attempted once; the webhook records the last
status it got.
type: object
additionalProperties: false
required:
- url
- events
properties:
url:
type: string
format: uri
pattern: ^https://
maxLength: 2048
description: The HTTPS URL that receives the POSTs.
events:
type: array
minItems: 1
uniqueItems: true
items:
type: string
minLength: 1
description: >-
The event keys this webhook receives, from GET /webhook-events (for
example job.completed, proof.ready).
headers:
type: object
maxProperties: 10
propertyNames:
pattern: ^[A-Za-z0-9-]{1,64}$
additionalProperties:
type: string
maxLength: 1024
description: >-
Extra request headers sent with every call, such as an Authorization
header your endpoint checks. Values are write-only: they read back
as ********.
description:
type: string
maxLength: 500
description: 'A note for yourself: what the endpoint is for.'
RecordFields:
type: object
properties:
id:
type: string
description: The record id.
source:
type: string
enum:
- domain
- store
description: '`domain`: yours. `store`: a built-in catalog record.'
customized:
type: boolean
description: >-
Your own copy of a built-in record, under the same id. Revert drops
it.
draft:
type: boolean
description: Present and true on an unpublished draft.
draftExpiresAt:
type: string
format: date-time
description: When an unpublished draft is deleted.
created:
type: integer
description: Unix time (seconds).
modified:
type: integer
description: Unix time (seconds).
Error:
type: object
properties:
error:
type: boolean
const: true
code:
type: string
description: >-
Machine-readable reason, such as validation_failed,
invalid_reference, not_found, in_use, draft_reference.
message:
type: string
param:
type: string
description: >-
The field at fault, as a dotted path (intake.ruleId,
accepts.0.preflight.profileId).
details:
type: array
description: Every problem found, or the records that block a delete.
items:
type: object
additionalProperties: true
requestId:
type: string
description: Quote it to support.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: >-
Your secret key as a bearer token, e.g. `Authorization: Bearer
sk_live_…`. Secret keys are server-side only.
This documentation is built and hosted on Mintlify, a developer documentation platform.