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

# Archive a job mandate

> Close the job when it is filled: no new campaigns start, running ones finish, results stay readable.

**Scope:** `mandates:write` · **Idempotency-Key:** optional



## OpenAPI

````yaml /blue-collar-api/api-reference/openapi.json post /mandates/{mandate_id}/archive
openapi: 3.1.0
info:
  title: Record Blue Collar API
  version: 1.0.0
  description: >-
    Run Record candidate verification from your own system. You need two things:
    your **key id** and your **secret**. Everything else is generated. See
    Authentication for how.
servers:
  - url: https://api-bc.userecord.io/api/v1/partner
    description: Blue Collar API
security: []
tags:
  - name: Skills
    description: The skill taxonomy, read live a page at a time
  - name: Skill requests
    description: Ask Record to add a missing skill
  - name: Lookups
    description: >-
      Lookups for filling in a job mandate: places in India, the countries an
      abroad job can be in, and the employment types and shifts the playground
      offers
  - name: Workflows
    description: >-
      Your organisation's blue-collar workflows (read all; change and
      soft-delete only the ones you created)
  - name: Job mandates
    description: >-
      Your organisation's job mandates, addressed by Record's mandate_id (read
      all; change only the ones you created)
  - name: Campaigns
    description: Contact candidates for one of your jobs and verify them. Spends credits
  - name: Results
    description: >-
      What Record collected from each candidate: status (pending, completed,
      declined, failed) and an output of answers and verdicts
  - name: Events
    description: >-
      Pull your result events and acknowledge them: the safety net behind the
      webhook, and a way to receive results without exposing a URL
  - name: Webhooks
    description: >-
      Endpoints that Record POSTs result events to: signed, retried until you
      acknowledge, replayable
  - name: Analytics
    description: >-
      The workflow Overview analytics of the Record playground: funnel,
      channels, follow-ups, calls, drop-offs, languages (read-only, scope
      analytics:read)
paths:
  /mandates/{mandate_id}/archive:
    post:
      tags:
        - Job mandates
      summary: Archive a job mandate
      description: >-
        Close the job when it is filled: no new campaigns start, running ones
        finish, results stay readable.


        **Scope:** `mandates:write` · **Idempotency-Key:** optional
      operationId: archiveMandateById
      parameters:
        - name: mandate_id
          in: path
          required: true
          description: >-
            Record's mandate id (JM_...): the mandate_id returned when you
            create the mandate
          schema:
            type: string
            pattern: ^JM_[A-Z0-9]{10,40}$
          example: JM_261009101612456H3N8W2L5C9V1Z4
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 255
          description: >-
            Optional. A retry with the same key returns the first answer (kept
            24 h). Leave empty in Try it: a new one is made for every call.
      responses:
        '200':
          description: The archived mandate
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      mandate_id:
                        type: string
                      job_id:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Your job id; null for a mandate created without one
                          (it is known by its mandate_id)
                      workflow_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - preparing
                          - ready
                          - failed
                          - archived
                      flow_version:
                        anyOf:
                          - type: integer
                          - type: 'null'
                        description: >-
                          Counts the changes made through this API; null for a
                          mandate made in the playground
                      methods:
                        type: array
                        items:
                          type: string
                          enum:
                            - data_enrichment
                            - skill_verification
                            - interest_collection
                      title:
                        type: string
                      company_name:
                        type: string
                      location_type:
                        type: string
                        enum:
                          - india
                          - abroad
                        description: >-
                          india when the job is in India (the default for
                          mandates made before the Abroad option existed)
                      location:
                        anyOf:
                          - type: object
                            properties:
                              city:
                                type: string
                              state:
                                type: string
                              pincode:
                                type: string
                          - type: 'null'
                        description: >-
                          The place in India; null for an abroad job, or when
                          none was given
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: ISO 3166-1 alpha-2, e.g. SG
                            name:
                              type: string
                        description: >-
                          The countries of an abroad job, in the order picked;
                          empty for an India job
                      location_names:
                        type: array
                        items:
                          type: string
                        description: >-
                          Every place (India) or country name (abroad) the
                          playground shows for the job, in full
                      experience:
                        anyOf:
                          - type: object
                            properties:
                              min_years:
                                type: number
                              max_years:
                                type: number
                          - type: 'null'
                      openings:
                        anyOf:
                          - type: number
                          - type: 'null'
                      salary:
                        anyOf:
                          - type: object
                            properties:
                              min:
                                type: number
                              max:
                                type: number
                              currency:
                                type: string
                              period:
                                type: string
                          - type: 'null'
                      description:
                        type: string
                      shift:
                        anyOf:
                          - type: string
                          - type: 'null'
                      employment_type:
                        anyOf:
                          - type: string
                          - type: 'null'
                      owner:
                        anyOf:
                          - type: object
                            properties:
                              external_user_id:
                                type: string
                              name:
                                type: string
                          - type: 'null'
                      skills:
                        type: array
                        items:
                          type: object
                          properties:
                            skill_id:
                              anyOf:
                                - type: string
                                - type: 'null'
                            name:
                              type: string
                              description: The current name (it follows taxonomy renames)
                            verify:
                              type: boolean
                            status:
                              type: string
                              enum:
                                - active
                                - pending
                                - not_found
                      enrichment_questions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            type:
                              type: string
                            text:
                              type: string
                            knockout:
                              anyOf:
                                - type: string
                                - type: 'null'
                            required:
                              type: boolean
                      interest_collection:
                        type: object
                        properties:
                          other_roles:
                            type: array
                            items:
                              type: string
                      warnings:
                        type: array
                        items:
                          type: string
                      is_external:
                        type: boolean
                        description: >-
                          true when the mandate was created through the Partner
                          API, false when it was made in the Record playground
                      created_at:
                        type: string
                      updated_at:
                        type: string
              example:
                success: true
                data:
                  mandate_id: JM_261009101612456H3N8W2L5C9V1Z4
                  job_id: job-10452
                  workflow_id: WF_BG_261009101530123K7M2P9Q4X7R5T8
                  status: archived
                  flow_version: 1
                  methods:
                    - data_enrichment
                    - skill_verification
                    - interest_collection
                  title: Warehouse Associate (Forklift)
                  company_name: Acme Logistics Pvt Ltd
                  location_type: india
                  location:
                    city: Chennai
                    state: Tamil Nadu
                    pincode: '600001'
                  countries: []
                  location_names:
                    - Chennai, Tamil Nadu
                  experience:
                    min_years: 1
                    max_years: 5
                  openings: 12
                  salary:
                    min: 18000
                    max: 24000
                    currency: INR
                    period: month
                  description: >-
                    Pick, pack and load orders in a busy warehouse. Forklift
                    licence preferred.
                  shift: Day shift
                  employment_type: Full-time
                  owner:
                    external_user_id: recruiter_1042
                    name: Priya Nair
                  skills:
                    - skill_id: sk_36440
                      name: Forklift Basic Operation
                      verify: true
                      status: active
                    - skill_id: sk_38973
                      name: Pallet Jack Safety Check
                      verify: true
                      status: active
                    - skill_id: sk_38824
                      name: Packing Station Setup
                      verify: true
                      status: active
                    - skill_id: sk_2338
                      name: Order Picking
                      verify: false
                      status: active
                    - skill_id: sk_2452
                      name: Loading And Unloading
                      verify: false
                      status: active
                    - skill_id: null
                      name: Reach Truck Operation
                      verify: false
                      status: pending
                  enrichment_questions:
                    - key: has_licence
                      type: yes_no
                      text: Do you hold a valid forklift licence?
                      knockout: 'no'
                      required: true
                    - key: why_this_job
                      type: voice
                      text: Tell us in your own words why you want this job.
                      knockout: null
                      required: false
                  interest_collection:
                    other_roles:
                      - Forklift Operator
                      - Store Keeper
                  warnings: []
                  is_external: true
                  created_at: '2026-10-09T10:16:12.456Z'
                  updated_at: '2026-10-09T12:00:00.000Z'
        '403':
          description: '`FORBIDDEN`: Mandate was made in the playground.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`NOT_FOUND`: No such mandate.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKey: []
          SecretKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            pcall POST
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/archive"
        - lang: javascript
          label: JavaScript
          source: >-
            const res = await call("POST",
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/archive");

            const { data } = await res.json();
        - lang: python
          label: Python
          source: >-
            res = call("POST",
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/archive")

            data = res.json()["data"]
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          const: false
          type: boolean
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - LIMIT_EXCEEDED
                - UNAUTHORIZED
                - SCOPE_MISSING
                - FORBIDDEN
                - HTTPS_REQUIRED
                - NOT_FOUND
                - CONFLICT
                - WORKFLOW_IN_USE
                - INSUFFICIENT_CREDITS
                - IDEMPOTENCY_KEY_REQUIRED
                - IDEMPOTENCY_KEY_REUSED
                - IDEMPOTENCY_IN_PROGRESS
                - PAYLOAD_TOO_LARGE
                - UNSUPPORTED_MEDIA_TYPE
                - RATE_LIMITED
                - COOLDOWN
                - DAILY_CAP
                - SERVICE_DISABLED
                - SERVER_ERROR
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
            request_id:
              type: string
              description: Quote it to Record support
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your key id, `VFN_TEST_…` or `VFN_LIVE_…`. Sent on every request.
    SecretKey:
      type: apiKey
      in: header
      name: x-secret-key
      description: >-
        Your secret, `VFN_SK_…`. **Not a real header, and never sent to the
        API.** It is only a form field for Try it, which uses it to sign your
        request in your browser. In your own code you sign each request with the
        secret and send `x-api-key`, `x-timestamp` and `x-signature` (see
        Authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.