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

# Update Freelancer Team Fields

> Updates team-scoped freelancer fields.



## OpenAPI

````yaml /openapi.yaml patch /api/v1/freelancers/{id}
openapi: 3.0.3
info:
  title: Folkyn API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://folkyn.com
  description: >-
    Team API key; responses in `data`, errors in `error` with `X-Request-Id`.
    Spec at `/api/v1/openapi.yaml` and `/api/v1/openapi.json` (no key). **60
    requests/minute** per key on `/api/v1/*`.
servers:
  - url: https://api.folkyn.com
    description: Production
security:
  - bearerAuth: []
  - ApiKeyHeader: []
tags:
  - name: Specification
    description: OpenAPI document download (no authentication)
  - name: Project codes
    description: Team project codes
  - name: Team tags
    description: Team tags
  - name: Teams
    description: Organizational teams (team units) and member lists
  - name: Missions
    description: Team missions
  - name: Freelancers
    description: Team freelancers and invitations
  - name: Activity reports
    description: Activity reports (CRA)
  - name: Accounting
    description: Accounting entries
paths:
  /api/v1/freelancers/{id}:
    patch:
      tags:
        - Freelancers
      summary: Update Freelancer Team Fields
      description: Updates team-scoped freelancer fields.
      operationId: patchFreelancerTeamFields
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Freelancer profile UUID (not a pending invitation id).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FreelancerPartnerPatchRequest'
            examples:
              external_id_and_note:
                summary: External id and internal note
                value:
                  external_id: ERP-F-88421
                  note: Preferred for Q3 staffing
              tags_and_teams:
                summary: Replace tags and teams
                value:
                  tag_ids:
                    - aaaaaaaa-bbbb-4ccc-dddd-eeeeeeeeeeee
                  team_ids:
                    - bbbbbbbb-cccc-4ddd-eeee-ffffffffffff
              job_title_and_referent:
                summary: Job title and team referent
                value:
                  job_title: Senior React Developer
                  referent_id: cccccccc-dddd-4eee-ffff-000000000001
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FreelancerListItemPublic'
        '400':
          description: >-
            Validation (unknown fields, invalid arrays, referent not in team,
            etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Freelancer not found for this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    FreelancerPartnerPatchRequest:
      type: object
      description: >
        At least one field required. `tag_ids` and `team_ids` replace the full
        assignment for this team.

        `referent_id` can be reassigned to another team member but cannot be
        cleared.
      minProperties: 1
      properties:
        external_id:
          type: string
          nullable: true
          description: Team-stored external identifier; null clears it.
        note:
          type: string
          nullable: true
          description: Internal team note on the freelancer; null clears it.
        tag_ids:
          type: array
          description: Team tag UUIDs to assign (replaces existing tags for this team).
          items:
            type: string
            format: uuid
        team_ids:
          type: array
          maxItems: 1
          description: >-
            Organizational team UUID to assign (replaces existing assignment for
            this team). At most one team per person. Send an empty array to
            clear.
          items:
            type: string
            format: uuid
        department_ids:
          type: array
          maxItems: 1
          deprecated: true
          description: Deprecated alias for `team_ids`. Use `team_ids` instead.
          items:
            type: string
            format: uuid
        job_title:
          type: string
          nullable: true
          description: Job title on the team link.
        referent_id:
          type: string
          format: uuid
          description: >-
            Team member profile UUID as referent; must belong to the API key's
            team. Cannot be cleared.
    FreelancerListItemPublic:
      type: object
      required:
        - id
        - email
        - external_id
        - job_title
        - note
        - referent
        - status
        - tags
        - teams
        - kyc_complete
        - master_agreement_active
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: Profile UUID, or invitation UUID when `status` is `pending`.
        email:
          type: string
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        external_id:
          type: string
          description: >
            External identifier for integrations. Uses the team-stored value
            when set; otherwise computed from lowercased `first_name` +
            `last_name` with spaces and Latin diacritics stripped (e.g. Clément
            Balea → `clementbalea`). German `ß` becomes `ss`. Empty string if
            both names are missing and no stored value.
        job_title:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
          description: Internal team note on the freelancer; null if absent.
        referent:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PartnerFreelancerReferentPublic'
          description: Team referent profile; null if none.
        status:
          $ref: '#/components/schemas/PartnerFreelancerListStatus'
        tags:
          type: array
          description: >-
            Tags for this freelancer on the team (`tag_ids` query uses AND
            across listed UUIDs).
          items:
            $ref: '#/components/schemas/FreelancerTagPublic'
        teams:
          type: array
          description: Organizational teams (team units) this freelancer belongs to.
          items:
            $ref: '#/components/schemas/FreelancerTeamPublic'
        kyc_complete:
          type: boolean
        master_agreement_active:
          type: boolean
          description: Signed master agreement with a future `valid_until` date.
        created_at:
          type: string
          format: date-time
    PublicError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: integer
              description: Same as HTTP status; use `message` and `details` to narrow.
              enum:
                - 400
                - 401
                - 403
                - 404
                - 429
                - 500
              example: 401
            message:
              type: string
            request_id:
              type: string
              format: uuid
              description: Correlates with the X-Request-Id response header.
            details:
              $ref: '#/components/schemas/PublicErrorDetails'
    PartnerFreelancerReferentPublic:
      type: object
      description: Team referent (id, first name, last name, email).
      required:
        - id
        - first_name
        - last_name
        - email
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
    PartnerFreelancerListStatus:
      type: string
      enum:
        - staffed
        - unstaffed
        - pending
        - archived
      description: >
        Lifecycle status on each list item. `staffed` = active mission on team;
        `unstaffed` = active link, no such mission; `pending` = invitation not
        yet accepted; `archived` = archived link.
    FreelancerTagPublic:
      type: object
      required:
        - id
        - name
      description: Team tag attached to the freelancer.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    FreelancerTeamPublic:
      type: object
      required:
        - id
        - name
        - depth
        - path
        - parent_id
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        depth:
          type: integer
          minimum: 1
          maximum: 3
          description: Depth in the organizational tree (1 = root).
        path:
          type: string
          description: >-
            Ancestor path from root to this node (e.g. `Direction › Engineering
            › Backend`).
        parent_id:
          type: string
          format: uuid
          nullable: true
          description: Parent organizational team UUID; null for root nodes.
    PublicErrorDetails:
      type: object
      description: Optional structured hints (validation, scope, rate limit).
      additionalProperties: true
      properties:
        reason:
          $ref: '#/components/schemas/PartnerValidationErrorReason'
        field:
          type: string
          description: JSON body field name when applicable (e.g. `name`).
          example: name
        requiredScope:
          type: string
          description: >-
            Required OAuth-like scope string when `code` is 403 (insufficient
            scope).
          example: tags:write
        retryAfterSeconds:
          type: integer
          minimum: 0
          description: Hint when `code` is 429.
    PartnerValidationErrorReason:
      type: string
      description: >-
        Machine-readable validation subtype (HTTP 400) for create tag / project
        code.
      enum:
        - invalid_json
        - required_field
        - duplicate_name
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    ForbiddenError:
      description: Insufficient scope or forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    RateLimited:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
    InternalError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer <your_api_key>`'
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key

````