---
title: "Change the selection (plugin)"
method: PUT
path: "/wordpress/connection/selection"
tags: ["WordPress"]
---

# Change the selection (plugin)

`PUT /wordpress/connection/selection`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/wordpress/connection/selection`
- Auth: HTTP bearer

Called by the plugin when the admin changes the checkboxes in WordPress. Send the version it showed; a newer one gives 409.

## Request body

- object
  - `items` object: Per inventory key (like content:post, orders or form_entries:wpforms:12) what moves. Keys you leave out keep their current choice.
  - `version` integer, nullable: The selection version you showed the user (selection.version). If it changed meanwhile, nothing changes (409). Leave it out to change it anyway.
  - `from_suggestion` boolean, nullable: true: apply the open suggestion of suggest_wordpress_selection (items, if given, go on top of it).
  - `include_personal_data` boolean, nullable: Only after the user explicitly said yes to the question this route returns (409 with question): true turns on the kinds of data with personal data in this change; false leaves them off and saves the rest.
  - `confirm_text` string, nullable: With include_personal_data true: the user's answer to the question, word for word. It is kept in the audit log.
  - `start_round` boolean, nullable: true: Hypamoon wakes the plugin right away (plugin 1.4.2 and later, plugin_woken in the answer) and it starts sending this selection; otherwise it starts the next time it checks in (when the admin opens Tools > Hypamoon, or within a few minutes by WP-cron).

## Response `200`

The new selection.

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized.
- `403`: Forbidden: forbidden.
- `409`: Conflict: conflict.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
