---
title: "PUT Swap"
method: PUT
path: "/swap/{trade}"
---

# PUT Swap

`PUT /swap/{trade}`

## Request

- Base URL: `https://www.humanity.com/api/v2`
- URL: `https://www.humanity.com/api/v2/swap/{trade}`
- Auth: API key in query parameter `access_token`

/swap/:trade
Permission level: 5

## Path parameters

- `trade` integer, required

## Request body `application/x-www-form-urlencoded`

- object
  - `action` string, required: enum[activate,deactivate,cancel,accept,reject]
  - `user` integer: user id
  - `shift_for_swap` integer

## Response `200`

200

- object
  - `status` integer
  - `data` string
  - `error` unknown

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `ffb87b44c733`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/humanity-com/apis/humanity/changes/swap/:trade/put.md)

---

[API](https://skmtc.dev/humanity-com/apis/humanity.md) - [All operations](https://skmtc.dev/humanity-com/apis/humanity/llms.txt) - [OpenAPI document](https://skmtc.dev/humanity-com/apis/humanity/revisions/ffb87b44c733?raw)
