> ## 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.

# Replace mandate skills

> Replace only the skill list. Changing the verified skills regenerates the skill questions.

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



## OpenAPI

````yaml /blue-collar-api/api-reference/openapi.json put /mandates/{mandate_id}/skills
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}/skills:
    put:
      tags:
        - Job mandates
      summary: Replace mandate skills
      description: >-
        Replace only the skill list. Changing the verified skills regenerates
        the skill questions.


        **Scope:** `mandates:write` · **Idempotency-Key:** optional
      operationId: setMandateSkillsById
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                skills:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          skill_id:
                            type: string
                            pattern: ^sk_\d{1,9}$
                          verify:
                            type: boolean
                            default: false
                            description: At most 3 per mandate, and only verifiable skills
                        required:
                          - skill_id
                        additionalProperties: false
                      - type: object
                        properties:
                          name:
                            type: string
                            minLength: 2
                            maxLength: 120
                          pending:
                            const: true
                            type: boolean
                            description: >-
                              A skill you asked Record to add (POST
                              /skill-requests); cannot be verified
                        required:
                          - name
                          - pending
                        additionalProperties: false
                  minItems: 1
                  maxItems: 50
                  description: 5 to 10 recommended; fewer than 5 is a warning
              required:
                - skills
              additionalProperties: false
            example:
              skills:
                - skill_id: sk_36440
                  verify: true
                - skill_id: sk_38973
                  verify: true
                - skill_id: sk_38824
                  verify: true
                - skill_id: sk_2338
                - skill_id: sk_2452
                - name: Reach Truck Operation
                  pending: true
      responses:
        '202':
          description: Accepted (200 when nothing changed)
          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)
                      status:
                        type: string
                        enum:
                          - preparing
                          - ready
                          - failed
                          - archived
                      flow_version:
                        type: integer
                      methods:
                        type: array
                        items:
                          type: string
                          enum:
                            - data_enrichment
                            - skill_verification
                            - interest_collection
                      changed:
                        type: boolean
                        description: false when the same mandate was sent again
                      warnings:
                        type: array
                        items:
                          type: string
              example:
                success: true
                data:
                  mandate_id: JM_261009101612456H3N8W2L5C9V1Z4
                  job_id: job-10452
                  status: preparing
                  flow_version: 2
                  methods:
                    - data_enrichment
                    - skill_verification
                    - interest_collection
                  changed: true
                  warnings: []
        '400':
          description: '`VALIDATION_FAILED`: Unknown or repeated skill.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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'
        '409':
          description: >-
            `CONFLICT`: Archived, still `preparing`, or too many changes this
            hour.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '`LIMIT_EXCEEDED`: More than 10 skills or 3 verified.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKey: []
          SecretKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            pcall PUT
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/skills"
            '{
              "skills": [
                {
                  "skill_id": "sk_36440",
                  "verify": true
                },
                {
                  "skill_id": "sk_38973",
                  "verify": true
                },
                {
                  "skill_id": "sk_38824",
                  "verify": true
                },
                {
                  "skill_id": "sk_2338"
                },
                {
                  "skill_id": "sk_2452"
                },
                {
                  "name": "Reach Truck Operation",
                  "pending": true
                }
              ]
            }'
        - lang: javascript
          label: JavaScript
          source: >-
            const res = await call("PUT",
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/skills",
            {
              "skills": [
                {
                  "skill_id": "sk_36440",
                  "verify": true
                },
                {
                  "skill_id": "sk_38973",
                  "verify": true
                },
                {
                  "skill_id": "sk_38824",
                  "verify": true
                },
                {
                  "skill_id": "sk_2338"
                },
                {
                  "skill_id": "sk_2452"
                },
                {
                  "name": "Reach Truck Operation",
                  "pending": true
                }
              ]
            });

            const { data } = await res.json();
        - lang: python
          label: Python
          source: >-
            res = call("PUT",
            "/api/v1/partner/mandates/JM_261009101612456H3N8W2L5C9V1Z4/skills",
            {
                "skills": [
                    {
                        "skill_id": "sk_36440",
                        "verify": True
                    },
                    {
                        "skill_id": "sk_38973",
                        "verify": True
                    },
                    {
                        "skill_id": "sk_38824",
                        "verify": True
                    },
                    {
                        "skill_id": "sk_2338"
                    },
                    {
                        "skill_id": "sk_2452"
                    },
                    {
                        "name": "Reach Truck Operation",
                        "pending": True
                    }
                ]
            })

            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.