Overview
The backfill endpoint allows you to apply citation schemas to calls that have already been completed. This is useful when you:- Create a new schema and want to extract data from historical calls
- Need to re-analyze calls with updated schemas
- Want to extract data from multiple calls at scale
workflow_id immediately and can poll the status endpoint to check progress and retrieve results.
This is an Enterprise-only feature. Contact your Bland representative or reach out to sales to enable this functionality.
Backfilling will update citation variables for the specified call(s) and schema(s). Variables are merged with existing data - only the variables defined in the schema being backfilled will be updated.
Request
Headers
Your API key for authentication.
Body Parameters
Schema Parameters (Choose One)
A single citation schema ID from your organization to apply to the call(s).
An array of citation schema IDs to apply to the call(s). All schemas will be processed for each call.Note: Cannot be combined with
schema (inline schema).An inline citation schema definition. Useful for one-time analysis without creating a schema in your account.Can be combined with
call_id or call_ids for multi-call analysis.Note: Cannot be combined with schema_ids.Call Parameters (Choose One)
A single call ID to analyze with the specified schema(s).
An array of call IDs to analyze with the specified schema(s). All schemas will be applied to each call.
Response (202 Accepted)
The endpoint returns immediately with a workflow ID. Use the status endpoint to monitor progress.Always
"processing" - indicates the workflow has been started.Unique identifier for this backfill operation. Use this to check status and retrieve results.
Number of calls being processed.
Number of schemas being applied to each call.
Total number of call+schema extractions that will be performed (
call_count × schema_count).Instructions on how to check the status of your workflow.
Checking Status
Use the workflow ID to poll the status endpoint:Status Response
The workflow ID you’re querying.
Current workflow status:
RUNNING: Still processingCOMPLETED: Finished successfully (may have partial failures)FAILED: Workflow encountered an errorTERMINATED: Manually stoppedTIMED_OUT: Exceeded maximum execution time
Only present when
status is COMPLETED. Contains the full backfill results.Result Object (When Completed)
Overall result status:
success: All extractions succeededpartial: Some extractions succeeded, some failedfailed: All extractions failed
Array of results, one entry per call processed.
The call that was analyzed.
Status for this call:
success, partial, or failed.Details about each schema extraction for this call.
Total number of unique variables extracted across all schemas for this call.
The call’s citation variables before this backfill operation.
Variables that were extracted or updated by this backfill operation.
The call’s citation variables after this backfill operation (complete state).
Aggregate statistics across all calls and schemas:
total_calls: Number of calls processedsuccessful_calls: Calls where all schemas succeededpartial_calls: Calls where some schemas failedfailed_calls: Calls where all schemas failedtotal_schemas_processed: Total schema extractions attemptedsuccessful_schema_extractions: Schema extractions that succeededfailed_schema_extractions: Schema extractions that failed
Usage Flow
- Send backfill request and receive
workflow_id - Poll the status endpoint periodically (every 5-10 seconds)
- When status is
COMPLETED, retrieve results fromresultfield - Review the results to see what was extracted for each call
Examples
Single Call, Single Schema
Request
Response (202 Accepted)
Multiple Calls, Multiple Schemas
Request
Response (202 Accepted)
Single Call with Inline Schema
Request
Checking Status
Request
Response (Status: RUNNING)
Response (Status: COMPLETED)
Error Responses
400 Bad Request
Returned when:- No schema parameter provided (
schema_id,schema_ids, orschemarequired) - No call parameter provided (
call_idorcall_idsrequired) - Invalid parameter combinations (e.g.,
schema_idswith inlineschema) - Empty arrays provided
403 Forbidden
Returned when:- Account does not have enterprise features enabled
- Attempting to access another organization’s calls or schemas
404 Not Found
Returned when:- Specified call ID(s) not found
- Specified schema ID(s) not found
- Resources don’t belong to your organization
500 Internal Server Error
Returned when an unexpected error occurs starting the workflow.Best Practices
Polling Strategy
- Poll every 5-10 seconds for single-call operations
- Poll every 10-30 seconds for batch operations
- Implement exponential backoff if polling for extended periods
- Stop polling once status is
COMPLETED,FAILED,TERMINATED, orTIMED_OUT
Batch Processing
- Process up to 100 calls at once for optimal performance
- For larger batches, split into multiple backfill requests
- Use multiple schemas in a single request rather than separate requests per schema
Error Handling
- Check the
result.calls[].statusfield for per-call results - Review
schemas_processedarray to see which schemas succeeded/failed - Use
error_summaryfield for quick diagnosis of partial failures - Failed extractions don’t prevent successful ones from being stored
Variable Management
- Newly extracted variables overwrite previous values with the same name
- Variables from different schemas are merged together
- Only variables defined in the backfilled schema are updated
- Other existing variables remain unchanged