---
title: "Update the site associated with agent"
method: PATCH
path: "/org/agents/{agent_id}"
tags: ["Organization"]
---

# Update the site associated with agent

`PATCH /org/agents/{agent_id}`

## Path parameters

- `agent_id` string, uuid, required

## Request body

- AgentSiteID
  - `site_id` string, uuid, required

## Response `200`

agent details

- Agent
  - `id` string, uuid, required
  - `client_id` string, uuid
  - `organization_id` string, uuid
  - `created_at` integer
  - `updated_at` integer
  - `host_id` string
  - `hub_id` string, uuid
  - `name` string, hostname
  - `site_id` string, uuid
  - `last_checkin` integer
  - `os` string
  - `arch` string
  - `version` string
  - `external_ip` string
  - `internal_ip` string
  - `system_info` object
  - `connected` boolean
  - `inactive` boolean
  - `deactivated_at` integer

## Other responses

- `401` — Access token is missing or invalid
- `404` — Resource not found

## Changes

- **2020-02-10** `1982af32482c` — 1 info
  - the endpoint scheme security `bearerAuth` was added to the API
- **2020-01-16** `0cd287ac6169` — 4 breaking
  - the `created_at` response's property type/format changed from `integer`/`int64` to `number`/`int64` for status `200`
  - the `deactivated_at` response's property type/format changed from `integer`/`int64` to `number`/`int64` for status `200`
  - the `last_checkin` response's property type/format changed from `integer`/`int64` to `number`/`int64` for status `200`
  - the `updated_at` response's property type/format changed from `integer`/`int64` to `number`/`int64` for status `200`

[Change history](https://skmtc.dev/rumble/apis/rumble-api-deprecated/changes/org/agents/:agent_id/patch.md)

---

[API](https://skmtc.dev/rumble/apis/rumble-api-deprecated.md) · [All operations](https://skmtc.dev/rumble/apis/rumble-api-deprecated/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rumble/rumble-api-deprecated/revisions/7c193c1fcd5c/schema)
