Rename a department

API Method: PUT /api/teams/departments

**Description:**This endpoint allows an authorized user (typically an Owner or a Partner) to rename an existing department and optionally update its description. Departments are organizational entities used to group sub-users within a company, and this API supports maintaining and customizing the structure as teams evolve.

Departments are created by Owners or Partners users on behalf of Authors. These entities are used exclusively for managing sub-user roles and permissions, helping to define internal access boundaries. Department names may vary depending on the company, and can reflect functional units or behavior-based groupings (e.g., where problematic users are segregated).

Purpose:

  • Rename a department
  • Update its description (optional)
⚠️

Departments are only used for sub-user management and are not exposed to end customers.


Request:

  • Method: PUT

  • Endpoint: https://api.banking.netevia.dev/api/teams/departments

  • Headers:

    • Authorization: Bearer <access_token> (required)
    • Content-Type: application/json

Body Parameters:

{
  "departmentId": 0,
  "name": "string",
  "description": "string or null"
}
  • departmentId (int32, required) – Unique ID of the department to rename.
  • name (string, required) – New name for the department (1–128 characters).
  • description (string or null, optional) – Optional description of the department.

Response:

  • Status Code: 200 OK
  • Content Type: application/json
  • Response Body:
{
  "id": 0,
  "name": "string",
  "description": "string",
  "creator": {
    "id": 0,
    "name": "string"
  },
  "authorizedUserCount": 0
}

Fields:

  • id – ID of the updated department.
  • name – Updated department name.
  • description – Updated description (or null).
  • creator – Object with creator’s id and name.
  • authorizedUserCount – Number of sub-users assigned to this department.

Error Responses:

  • 400 Bad Request – Invalid input (e.g., missing name or invalid departmentId).
  • 401 Unauthorized – Missing or invalid access token.
  • 403 Forbidden – User does not have permission to update the department.
  • 404 Not Found – Department not found.
  • 500 Internal Server Error – Unexpected server error.

**Use Case Example:**When reorganizing your internal team structure, you may want to rename the "Support Team" department to "Customer Success" and update the description accordingly. This endpoint allows you to make such updates dynamically.

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!