---
title: "Update peer"
method: PUT
path: "/api/ab/peer/update/{ab}"
tags: ["address book"]
---

# Update peer

`PUT /api/ab/peer/update/{ab}`

This function is an API endpoint that updates a peer in an address book.

## Parameters

- `ab`: The identifier of the address book.

- `request`: A JSON object containing the updated peer information.

## Returns

If successful, this function returns an `ActionResponse::Empty` object.

## Path parameters

- `ab` string, required

## Request body

- AbPeer
  - `id` string, required
  - `hash` string, nullable
  - `password` string, nullable
  - `username` string, nullable
  - `hostname` string, nullable
  - `platform` string, nullable
  - `alias` string, nullable
  - `tags` string[], nullable
  - `forceAlwaysRelay` boolean, nullable
  - `rdpPort` string, nullable
  - `rdpUsername` string, nullable
  - `loginName` string, nullable
  - `same_server` boolean, nullable

## Response `200`

\
            # [200 OK](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200)  
            This response is given when the request is successful.  
            The body is empty if there is no error,  
            The body contains a json object with the error {"error":"Error message"}

## Other responses

- `401`
- `422` — # [422 Unprocessable Entity](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422) This response is given when you request body is not correctly formatted.

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
