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

# Invite Freelancer

> Invites a freelancer by email.

Track pending invitations with `GET /api/v1/freelancers?status=pending`.




## OpenAPI

````yaml /openapi.yaml post /api/v1/freelancers/invitations
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/invitations:
    post:
      tags:
        - Freelancers
      summary: Invite Freelancer
      description: |
        Invites a freelancer by email.

        Track pending invitations with `GET /api/v1/freelancers?status=pending`.
      operationId: inviteFreelancer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FreelancerInvitationCreateRequest'
            example:
              email: jane.doe@example.com
              first_name: Jane
              last_name: Doe
              job_title: Senior Developer
              tag_ids:
                - aaaaaaaa-bbbb-4ccc-dddd-eeeeeeeeeeee
              invite_locale: en
      responses:
        '201':
          description: Invitation created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FreelancerInvitationCreated'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    FreelancerInvitationCreateRequest:
      type: object
      required:
        - email
        - first_name
        - last_name
      properties:
        email:
          type: string
          format: email
        first_name:
          type: string
        last_name:
          type: string
        job_title:
          type: string
          description: Optional job title stored on the invitation.
        referent_id:
          type: string
          format: uuid
          description: Active team member profile UUID as referent.
        tag_ids:
          type: array
          items:
            type: string
            format: uuid
        team_ids:
          type: array
          maxItems: 1
          description: >-
            Organizational team UUID on the invitation. At most one team per
            person.
          items:
            type: string
            format: uuid
        invited_by_member_id:
          type: string
          format: uuid
          description: >-
            Team member profile UUID shown as email sender; defaults to first
            active team-admin.
        invite_locale:
          type: string
          enum:
            - fr
            - en
          description: Locale for the invitation email (`fr` or `en`).
    FreelancerInvitationCreated:
      type: object
      required:
        - invitation_id
        - email
        - status
        - email_sent
        - is_existing_freelancer
      properties:
        invitation_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        status:
          type: string
          enum:
            - pending
        email_sent:
          type: boolean
        is_existing_freelancer:
          type: boolean
          description: >-
            True when the email belongs to an existing freelancer account on the
            platform.
    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'
    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

````