---
title: "Update a robot account"
method: PUT
path: "/robots/{robot_id}"
tags: ["robot"]
---

# Update a robot account

`PUT /robots/{robot_id}`

This endpoint updates specific robot account information by robot ID.

## Path parameters

- `robot_id` integer, required

## Headers

- `X-Request-Id` string

## Request body

- Robot
  - `id` integer — The ID of the robot
  - `name` string — The name of the robot
  - `description` string — The description of the robot
  - `secret` string — The secret of the robot
  - `level` string — The level of the robot, project or system
  - `duration` integer, nullable — The duration of the robot in days, duration must be either -1(Never) or a positive integer
  - `editable` boolean — The editable status of the robot
  - `disable` boolean — The disable status of the robot
  - `expires_at` integer — The expiration date of the robot
  - `permissions` RobotPermission[]
    - `kind` string — The kind of the permission
    - `namespace` string — The namespace of the permission
    - `access` Access[]
      - `resource` string — The resource of the access. Possible resources are listed here for system and project level https://github.com/goharbor/harbor/blob/main/src/common/rbac/const.go
      - `action` string — The action of the access. Possible actions are *, pull, push, create, read, update, delete, list, operate, scanner-pull and stop.
      - `effect` string — The effect of the access
  - `creator_type` string — The type of the robot creator, like local(harbor_user) or robot.
  - `creator_ref` integer — The reference of the robot creator, like the id of harbor user.
  - `creation_time` string, date-time — The creation time of the robot.
  - `update_time` string, date-time — The update time of the robot.

## Response `200`

Success

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `409` — Conflict
- `500` — Internal server error

---

[API](https://skmtc.dev/cerit/apis/harbor-api.md) · [All operations](https://skmtc.dev/cerit/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cerit/harbor-api/revisions/62d78801f8df/schema)
