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

# Request cancellation of a Scrub Job

> Cancellation is an explicit idempotent action. A queued job can be cancelled immediately. For a running provider call, the job remains running until the provider effect is reconciled; once reconciled, the job becomes cancelled, discards the result, and releases Customer Quota. An already-terminal job keeps its state. The API never returns a partial result or silently claims that an uncertain call was cancelled.



## OpenAPI

````yaml https://api.dnclatam.com/openapi.json post /v2/scrub/{job_id}/cancel
openapi: 3.1.0
info:
  title: DNC LATAM API
  version: 2.1.0
  description: >-
    Scrub phone-number arrays against the selected country's Do Not Call
    registry with zero data retention for synchronous v1 and encrypted,
    time-limited storage for durable v2 jobs. Registry type, provider, chunking,
    retries, cost, and capacity are internal implementation details.
servers:
  - url: https://api.dnclatam.com
security: []
paths:
  /v2/scrub/{job_id}/cancel:
    parameters:
      - name: job_id
        in: path
        required: true
        description: Opaque lowercase UUID returned at admission.
        schema:
          $ref: '#/components/schemas/JobId'
    post:
      summary: Request cancellation of a Scrub Job
      description: >-
        Cancellation is an explicit idempotent action. A queued job can be
        cancelled immediately. For a running provider call, the job remains
        running until the provider effect is reconciled; once reconciled, the
        job becomes cancelled, discards the result, and releases Customer Quota.
        An already-terminal job keeps its state. The API never returns a partial
        result or silently claims that an uncertain call was cancelled.
      operationId: cancelScrubJob
      responses:
        '200':
          description: The job is already terminal or cancellation completed
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrubJobStatus'
        '202':
          description: Cancellation was accepted and reconciliation is still in progress
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrubJobStatus'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidKeyError'
          headers:
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
        '404':
          description: Job does not exist for this organization
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobNotFoundError'
        '405':
          description: The HTTP method is not supported for this resource
          headers:
            Allow:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MethodNotAllowedError'
        '429':
          description: >-
            The organization exceeded its configured shared technical window
            (default 60, bounded 1-60000 requests per 60 seconds) or triggered
            the abuse guard
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
            X-RateLimit-Reset:
              schema:
                type: integer
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/RateLimitError'
                  - $ref: '#/components/schemas/TemporaryBlockError'
        '500':
          description: Unexpected internal failure
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: The platform could not complete the control operation
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 1
                maximum: 60000
                default: 60
              description: >-
                Effective maximum authenticated requests in the current
                60-second window for this organization. The safe default is 60;
                operator overrides are bounded from 1 to 60000.
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                maximum: 60000
              description: Requests remaining in the current technical window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the current technical window resets.
            Retry-After:
              schema:
                type: integer
                minimum: 1
            x-retention:
              schema:
                type: string
                const: transient-encrypted
              description: >-
                v2 may retain encrypted input, result, and non-phone metadata
                only for the published lifecycle. This is distinct from v1
                zero-data-retention.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformFailure'
      security:
        - bearerAuth: []
components:
  schemas:
    JobId:
      type: string
      format: uuid
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
      description: >-
        Opaque lowercase UUIDv4 generated by DNC LATAM. It carries no country,
        tenant, provider, or execution meaning; tenant identity remains internal
        and is never returned.
    ScrubJobStatus:
      type: object
      description: >-
        Public job state. Provider names, retries, chunks, cost, balance,
        credentials, and raw provider errors are never included.
      properties:
        job_id:
          $ref: '#/components/schemas/JobId'
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
            - expired
        country:
          $ref: '#/components/schemas/CountryCode'
        submitted_count:
          type: integer
          minimum: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
          description: >-
            State-dependent expiration: queued/running = admission plus the
            24-hour active job/input hard cap; succeeded = successful
            terminalization plus the seven-day result TTL;
            failed/cancelled/expired = terminalization plus the 30-day metadata
            TTL. Attached input is eligible for purge at terminalization; an
            unconfirmed or unknown upload is revalidated at the 24-hour hard
            cap. This field does not signal input availability.
        status_url:
          type: string
          format: uri
        result_url:
          type: string
          format: uri
          description: Available as a link when a result can still be retrieved.
        error:
          $ref: '#/components/schemas/JobError'
          description: >-
            Required when status is failed (or expired) and contains the closed
            public JobError mapping. Cancelled jobs never include this field:
            cancellation is not an error.
        scrub_record:
          $ref: '#/components/schemas/ScrubRecord'
          description: >-
            Phone-free Screening record once the job is terminal and within the
            metadata TTL. Cancelled records omit failure. Owning organization
            only.
      required:
        - job_id
        - status
        - country
        - submitted_count
        - created_at
        - updated_at
        - expires_at
        - status_url
      allOf:
        - if:
            properties:
              status:
                enum:
                  - failed
                  - expired
            required:
              - status
          then:
            required:
              - error
        - if:
            properties:
              status:
                const: cancelled
            required:
              - status
          then:
            not:
              required:
                - error
      additionalProperties: false
    InvalidKeyError:
      type: object
      properties:
        error:
          type: string
          const: invalid_key
      required:
        - error
      additionalProperties: false
    JobNotFoundError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: string
              const: job_not_found
          required:
            - error
            - message
      unevaluatedProperties: false
      description: >-
        The job does not exist or belongs to another organization. Both cases
        use the same response to prevent cross-tenant enumeration.
    MethodNotAllowedError:
      type: object
      properties:
        error:
          type: string
          const: method_not_allowed
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: false
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: string
              const: rate_limit_exceeded
            limit:
              type: integer
              minimum: 1
              maximum: 60000
            window_seconds:
              type: integer
              const: 60
            retry_after:
              type: integer
              minimum: 1
          required:
            - error
            - message
            - limit
            - window_seconds
            - retry_after
      unevaluatedProperties: false
      description: >-
        The organization exceeded its configured shared technical request limit
        across its API keys. The safe default is 60 requests per 60 seconds; an
        operator may configure 1 to 60,000.
    TemporaryBlockError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: string
              const: temporarily_blocked
            retry_after:
              type: integer
              minimum: 1
              maximum: 900
          required:
            - error
            - message
            - retry_after
      unevaluatedProperties: false
      description: >-
        The source temporarily triggered the API abuse guard. This is separate
        from Customer Quota and country availability.
    InternalError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: string
              const: internal
          required:
            - error
            - request_id
      unevaluatedProperties: false
      description: >-
        An unexpected failure outside the public taxonomy. The request_id is
        safe to share with support.
    PlatformFailure:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: string
              const: platform_failure
          required:
            - error
            - message
      unevaluatedProperties: false
      description: >-
        DNC LATAM could not complete the batch because an internal platform
        component failed. No partial result is returned and Customer Quota is
        not consumed.
    CountryCode:
      type: string
      enum:
        - mx
        - ar
        - co
        - es
        - au
        - sg
      description: >-
        Technical country code. The current sellable catalog is mx/ar/co.
        es/au/sg are planned product coverage, end of September 2026, and are
        not sellable at checkout until their catalog and runtime are released
        together. Every real request requires a matching Country Purchase and
        country availability/activation. Colombia is sellable and operational,
        and a successful initial payment activates its complete API access
        immediately without manual approval; entitlement and operational
        availability are still evaluated at admission.
    JobError:
      type: object
      description: >-
        Closed terminal public error vocabulary for a durable job. Internal
        country, worker, storage, lease, and retry classifications map to these
        values; provider names, balances, capacity causes, and raw internal
        codes are never exposed. A country service failure never consumes
        Customer Quota and never includes a partial result.
      properties:
        error:
          type: string
          enum:
            - country_service_maintenance
            - country_service_temporarily_unavailable
            - platform_failure
            - job_expired
        message:
          type: string
        country:
          $ref: '#/components/schemas/CountryCode'
        retry_after:
          type: integer
          minimum: 1
        request_id:
          type: string
      required:
        - error
        - message
      allOf:
        - if:
            properties:
              error:
                enum:
                  - country_service_maintenance
                  - country_service_temporarily_unavailable
            required:
              - error
          then:
            required:
              - country
      additionalProperties: false
    ScrubRecord:
      type: object
      description: >-
        Phone-free evidence of one Scrub. Public name: Screening record /
        comprobante de screening. Counts and metadata only; never phone inputs
        or per-number determinations.
      additionalProperties: false
      required:
        - record_id
        - record_version
        - surface
        - organization
        - country
        - registry
        - status
        - counts
        - submitted_at
        - completed_at
        - record_issued_at
      properties:
        record_id:
          $ref: '#/components/schemas/JobId'
        record_version:
          type: string
          const: '1'
        surface:
          type: string
          enum:
            - api_v1
            - api_v2
            - panel_csv
        request_id:
          type: string
          description: Present only for api_v1.
        job_id:
          $ref: '#/components/schemas/JobId'
          description: Present only for api_v2.
        client_scrub_reference:
          type: string
          format: uuid
          description: >-
            Optional UUIDv4 Client Scrub Reference on the record when supplied.
            Not an idempotency key. Request-body acceptance is not published in
            this contract version.
        organization:
          type: object
          additionalProperties: false
          required:
            - name
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 200
        country:
          $ref: '#/components/schemas/CountryCode'
        registry:
          type: object
          additionalProperties: false
          required:
            - authority
            - mode
          properties:
            authority:
              type: string
            mode:
              type: string
              enum:
                - snapshot
                - live_consult
            source_observed_at:
              type: string
              format: date-time
            consulted_at:
              type: string
              format: date-time
        status:
          type: string
          enum:
            - succeeded
            - failed
            - cancelled
            - expired
        failure:
          type: object
          additionalProperties: false
          required:
            - error
            - country
          properties:
            error:
              type: string
            country:
              $ref: '#/components/schemas/CountryCode'
        counts:
          type: object
          additionalProperties: false
          required:
            - submitted
            - prohibited
            - safe
            - invalid
          properties:
            submitted:
              type: integer
              minimum: 1
            prohibited:
              type: integer
              minimum: 0
            safe:
              type: integer
              minimum: 0
            invalid:
              type: integer
              minimum: 0
        submitted_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
        record_issued_at:
          type: string
          format: date-time
    Error:
      type: object
      description: >-
        Base error envelope. It is only composed into a concrete public error
        schema; every concrete error closes unknown fields with
        additionalProperties or unevaluatedProperties.
      properties:
        error:
          type: string
        message:
          type: string
        request_id:
          type: string
          description: Opaque support identifier. It never contains phone data.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: dnc_live_*

````