Overview
Baselayer supports both synchronous and asynchronous execution for all task-based endpoints (business searches, liens, dockets, web presence, DMF, and more).- Synchronous — the API blocks until processing completes and returns results in the response body.
- Asynchronous — the API accepts the request immediately and delivers results later via webhooks or polling.
Prefer header, or configure the default behavior on your API key.
How It Works
Every task-based endpoint follows the same lifecycle:
These headers are set before any synchronous wait begins, so your application can identify the resource even if a sync request times out.
The Prefer Header
Baselayer uses the standard HTTP Prefer header (RFC 7240) to let you control execution behavior on each request.
Supported Directives
No Prefer header (default behavior)
When no Prefer header is sent, the request uses your API key’s default_request_mode setting. New organizations default to synchronous execution (recommended), but you can configure the default mode when creating additional API keys.
Prefer: respond-async
Explicitly requests asynchronous execution. The API returns 202 Accepted immediately without waiting for results. Use webhooks or poll the Location URL to retrieve results when processing completes.
The response includes a Preference-Applied: respond-async header confirming the directive was honored.
Prefer: wait=N
Requests synchronous execution with a timeout hint of N seconds. The API will wait up to N seconds for processing to complete:
- If processing completes within the timeout: returns
201 Createdwith full results. - If processing does not complete: returns
202 Acceptedwith the current resource state. Results will be delivered via webhook.
wait is 90 seconds. Values above this are capped automatically.
Quick Reference
Examples
Synchronous request (default)
201 Created):
Asynchronous request
202 Accepted):
Synchronous with explicit timeout
201 Created with full results.
If it takes longer: 202 Accepted with the current state. A webhook fires when processing completes.
API Key Default Request Mode
Each API key has adefault_request_mode that controls whether requests default to synchronous or asynchronous execution when no Prefer header is present.
The
Prefer header always overrides the API key default. This means:
- An API key with
default_request_mode: asyncthat sendsPrefer: wait=30executes synchronously. - An API key with
default_request_mode: syncthat sendsPrefer: respond-asyncexecutes asynchronously.
Setting the Default on a New API Key
When you create an API key in the console, choose its Default request mode: Synchronous or Asynchronous. New keys created in the console default to Synchronous.Viewing the Default on an Existing API Key
The API Keys table in the console shows each key’sdefault_request_mode (sync or async).
You can also create and manage your API keys directly in the web application:


Status Codes
Key distinction:
201 means results are in the response body. 202 means results are not yet available — use webhooks or poll the Location URL.
Backward Compatibility
Baselayer maintains a backwards compatible API contract. Existing integrations continue to work without changes.Existing API Keys
API keys created before this feature havedefault_request_mode: async. On API v1, these keys continue to receive 201 Created for all POST responses, matching the behavior your integration was built against. No code changes are required.
New Integrations
New organizations and API keys default todefault_request_mode: sync. New integrations should handle both 201 Created (completed) and 202 Accepted (still processing).
Explicit Prefer Header
When a request includes an explicit Prefer: respond-async header, the response is always 202 Accepted regardless of API key defaults or API version. This signals a forward-looking integration that expects standard HTTP semantics.
Request Lifecycle States
Every request-creating endpoint (business searches, web presence, lien searches, dockets, person searches, TIN verification, OFAC batch, international products, etc.) reports its progress through the samestate field, with the same five values:
Legal transitions:
PENDING → EXECUTING; EXECUTING → COMPLETED or FAILED; a request that is still PENDING or EXECUTING can also move to CANCELLED or FAILED (for example, if it times out). COMPLETED, FAILED, and CANCELLED are terminal — a request never leaves them.
Note: Some resources also carry a free-textstatusfield. That field is a human-readable progress message, not the lifecycle — always usestateto drive your integration logic.
Consuming Results
How you consume results depends on the execution mode: Synchronous (201 Created): Results are included directly in the response body. No additional steps needed. Asynchronous or Timeout (202 Accepted): Results are delivered asynchronously. You have two options:- Webhooks (recommended) — Baselayer sends an HTTP POST to your configured endpoint when processing completes. See the Webhooks guide for setup instructions.
-
Polling — Use the
Locationheader from the response to periodically check the resource status:
X-Resource-Id header is always available immediately, so you can begin tracking the resource in your system before results arrive.
Migration Guide for Existing Customers
If you are an existing Baselayer customer and want to adopt synchronous execution:Step 1: Create a new API key with sync default
Create a new API key withdefault_request_mode: sync, or contact your Baselayer account manager to update your existing key.
Step 2: Update your response handling
Your integration should distinguish between two response codes:201 Created— processing completed, results are in the response body202 Accepted— still processing, consume results via webhooks or polling
Step 3: (Optional) Use Prefer: wait=N for timeout control
If your use case has specific latency requirements, include Prefer: wait=N to set an explicit timeout in seconds (up to 90).
No changes required to stay on async
If your current integration works well with asynchronous execution and webhooks, no changes are needed. Your existing API key retainsdefault_request_mode: async and all behavior remains identical.
Supported Endpoints
These endpoints accept thePrefer header and support both synchronous and asynchronous execution:
POST /searches also accepts the older Accept: application/vnd.osiris.sync+json header to request synchronous execution. If a request sends both, Prefer takes precedence.
Last updated: February 2026