---
agentTools:
  projectIndex: https://kenjo.readme.io/llms.txt
---

# Update the account section for a given employee id.

This endpoint updates the employee **account** section for a given employee id. The operation only updates the fields provided in the body.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Kenjo API",
    "description": "Before starting to use the Kenjo API, you have to request the API activation for a sandbox or production environment to the Kenjo Customer Success team. After that, an admin user has to go to *Settings > Integrations > API keys*, to generate the **API Key**. Follow the steps described in the **Autentication section** of this document. <br>The API key is needed to request the bearer token. Each endpoint callout requires a valid bearer token in the Authorization header. Once the token is retrieved, it will be useful during the time limit indicated by the 'expiration date'.",
    "termsOfService": "https://www.kenjo.io/legal/terms-and-conditions",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sandbox-api.kenjo.io/api/v1",
      "description": "Sandbox environment"
    },
    {
      "url": "https://api.kenjo.io/api/v1",
      "description": "Production environment"
    }
  ],
  "tags": [
    {
      "name": "Employees",
      "description": "Operations to manage employees in Kenjo."
    }
  ],
  "components": {
    "responses": {
      "badRequest": {
        "description": "BAD REQUEST. This is a wrong request in the client side due to invalid body or params.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "number"
                },
                "message": {
                  "type": "string"
                }
              },
              "example": {
                "code": 400,
                "message": "The param 'id' is not valid."
              }
            }
          }
        }
      },
      "unauthorized": {
        "description": "UNAUTHORIZED. The Authorization header is incorrect, not provided or the token expired."
      }
    },
    "parameters": {
      "authorization": {
        "in": "header",
        "name": "Authorization",
        "description": "A valid bearer token.",
        "schema": {
          "type": "string",
          "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5rZW5qby5pbyIsInN1YiI6IjYwZjBhOTE2MjE0OTg3MjU2YmU5YzhmZiIsImF1ZCI6Imh0dHBzOi8vYXBpLmtlbmpvLmlvIiwiaWF0IjoxNjI2Mzg1MTE1LCJuYmYiOjE2MjYzODUxMTUsImV4cCI6MTYyNjU1NzkxNSwiYWNjZXNzVHlwZSI6IkFwaUFjY2VzcyIsInNfb3JnSWQiOiI2MGYwNGVhN2RmN2JhMjFlY2U0YmYzYzIifQ.cxG_7dIS-VbmDXdJuLkekoyuyCIzQG2fMcgc0nkfbWE8cihhcb5FnALbQkjU9b5-qVcEoMHZlSuUA-jMEBMMVQ"
        },
        "required": true
      }
    }
  },
  "paths": {
    "/employees/{employeeId}/accounts": {
      "put": {
        "summary": "Update the account section for a given employee id.",
        "description": "This endpoint updates the employee **account** section for a given employee id. The operation only updates the fields provided in the body.",
        "tags": [
          "Employees"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "employeeId",
            "required": true,
            "description": "The _id of the employee to update.",
            "schema": {
              "type": "string",
              "example": "60a2db290da29e126a18789a"
            }
          },
          {
            "in": "header",
            "$ref": "#/components/parameters/authorization"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "The employee email in Kenjo. This is an unique identifier and required.",
                    "example": "john@acme.io"
                  },
                  "externalId": {
                    "type": "string",
                    "description": "The employee external id for integration proposals. This value must be unique.",
                    "example": "E-000001"
                  },
                  "language": {
                    "type": "string",
                    "description": "The employee language. Only is valid one of the following values 'en' (english), 'es' (spanish) or 'de' (german).",
                    "example": "en"
                  }
                }
              },
              "example": {
                "email": "john@acme.io,",
                "externalId": "E-000001",
                "language": "en"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string",
                      "description": "The employee Kenjo *_id*.",
                      "example": "50a2db290da29e126a187843"
                    },
                    "email": {
                      "type": "string",
                      "description": "The employee email in Kenjo. This is an unique identifier and required.",
                      "example": "john@acme.io"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The employee external id for integration proposals.",
                      "example": "E-000001"
                    },
                    "language": {
                      "type": "string",
                      "description": "The employee language in integrations.",
                      "example": "es"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 207,
      "2": 66,
      "3": 151,
      "4": 39,
      "5": 216,
      "6": 106,
      "7": 224,
      "8": 133,
      "9": 48,
      "10": 201,
      "11": 174
    }
  }
}
```