> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retellai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Backfill Contact Analysis Data

> Trigger a backfill job that re-applies analysis data mappings to contacts using historical call data. Only one backfill job can run per organization at a time.



## OpenAPI

````yaml openapi-final post /backfill-contact-analysis-data
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-08-22-7679759
  contact:
    name: Retell Support
    url: https://www.retellai.com/
    email: support@retellai.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.retellai.com
    description: The production server.
security:
  - api_key: []
paths:
  /backfill-contact-analysis-data:
    post:
      description: >-
        Trigger a backfill job that re-applies analysis data mappings to
        contacts using historical call data. Only one backfill job can run per
        organization at a time.
      operationId: backfillContactAnalysisData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backfill_call_filter:
                  type: object
                  description: >-
                    Optional call filter to scope which calls are processed.
                    Supports agent and start_timestamp from the standard call
                    filter.
                  properties:
                    agent:
                      type: array
                      items:
                        $ref: '#/components/schemas/AgentFilter'
                      description: Filter calls by agent. Agents are OR-connected.
                    start_timestamp:
                      oneOf:
                        - $ref: '#/components/schemas/NumberFilter'
                        - $ref: '#/components/schemas/RangeFilter'
                      description: Filter calls by start timestamp (epoch ms).
                backfill_attributes:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 200
                  description: >-
                    Contact fields to recompute. Each one must still exist as a
                    contact field and have an analysis data mapping configured,
                    otherwise the request is rejected rather than running a job
                    that writes nothing.
              required:
                - backfill_attributes
      responses:
        '201':
          description: Backfill job started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Retell from 'retell-sdk';


            const client = new Retell({
              apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.contact.backfillAnalysisData({
            backfill_attributes: ['string'] });


            console.log(response.status);
        - lang: Python
          source: |-
            import os
            from retell import Retell

            client = Retell(
                api_key=os.environ.get("RETELL_API_KEY"),  # This is the default and can be omitted
            )
            response = client.contact.backfill_analysis_data(
                backfill_attributes=["string"],
            )
            print(response.status)
components:
  schemas:
    AgentFilter:
      type: object
      required:
        - agent_id
      properties:
        agent_id:
          type: string
          minLength: 1
          description: The agent ID to filter on.
        version:
          type: array
          items:
            type: number
          description: >-
            Specific versions to filter on. If not provided, all versions are
            included.
    NumberFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - number
        op:
          type: string
          enum:
            - eq
            - ne
            - gt
            - ge
            - lt
            - le
          description: >-
            eq: equal, ne: not equal, gt: greater than, ge: greater than or
            equal, lt: less than, le: less than or equal
        value:
          type: number
    RangeFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - range
        op:
          type: string
          enum:
            - bt
          description: 'bt: between'
        value:
          type: array
          minItems: 2
          maxItems: 2
          items:
            type: number
          description: '[lower_bound, upper_bound]'
    JobStatus:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - queued
            - running
            - idle
        start_timestamp:
          type: number
          description: Epoch milliseconds when the job started.
        succeeded:
          type: number
          description: Number of items processed successfully so far.
        failed:
          type: number
          description: Number of items that errored so far.
        triggered_by:
          type: string
          description: >-
            Whether the job was started by an explicit API call (`manual`) or by
            the scheduled sync (`cron`).
          enum:
            - manual
            - cron
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Invalid request format, please check API reference.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: API key is missing or invalid.
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Account rate limited, please throttle your requests.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: An unexpected server error occurred.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Authentication header containing API key (find it in dashboard). The
        format is "Bearer YOUR_API_KEY"

````