swap

Exchange two items' positions.

Both items must exist. Unlike `move`, neither destination needs to be free — that is the point.

In Inventory & stash.

Request

POST /api/v1/sessions/{accountKey}/actions/swap

Parameters

NameTypeRequiredDescription
src_uidstringyesFirst item.
dst_uidstringyesSecond item.
src_invintegeryesFirst item's container.
src_slotintegeryesFirst item's slot.
dst_invintegeryesSecond item's container.
dst_slotintegeryesSecond item's slot.

Example request

{
  "src_uid": "630211546215118851", "src_inv": 3, "src_slot": 5,
  "dst_uid": "630211546215118853", "dst_inv": 3, "dst_slot": 6
}

Response

{ "ok": true }

Example response

{ "ok": true }

Errors

CodeWhen
missing_fieldEither uid was absent or unparseable.
action_failedThe send failed.
plan_limitNot on the free plan.

See also

DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.