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

# Block employee

## Overview

This endpoint allows you to block an employee in the Cobee system.

You can call this endpoint multiple times for the same employee. Each new call will overwrite the previous block date with the current timestamp at the moment of the call.

> **Note**: Blocking an employee prevents them from using their benefits, but they will still have access to the Cobee app and their historical data.


## OpenAPI

````yaml PATCH /companies/{companyId}/employees/{employeeId}/block
openapi: 3.0.1
info:
  title: Partners API
  description: >-
    Partners API definition where you can check the documentation for the
    different available operations to integrate with the platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://pre-partners-api.cobee.io/api/v3
  - url: https://partners-api.cobee.io/api/v3
security:
  - bearerAuth: []
paths:
  /companies/{companyId}/employees/{employeeId}/block:
    patch:
      summary: Block employee
      parameters:
        - name: companyId
          in: path
          required: true
          description: The unique identifier of the company
          schema:
            type: string
            format: uuid
          example: a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890
        - name: employeeId
          in: path
          required: true
          description: The unique identifier of the employee
          schema:
            type: string
          example: 7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8
      responses:
        '204':
          description: Employee successfully blocked
        '404':
          description: Not Found - The employee ID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Employee not found
        '409':
          description: The employee cannot be blocked because they are not in a valid state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Employee with invalid state removed
        '500':
          description: Internal Server Error - Something went wrong on our end
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Internal server error
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
      example:
        message: 'Bad request: Invalid field value'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````