---
title: "Connect the plugin with a code (plugin)"
method: POST
path: "/wordpress/connect"
tags: ["WordPress"]
---

# Connect the plugin with a code (plugin)

`POST /wordpress/connect`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/wordpress/connect`
- Auth: none required

Called by the Hypamoon Connect plugin, not by you. Exchanges the one-time code for the plugin's own token (hm_wp_...), bound to this project and this WordPress site. Limited per IP address. The token is valid for 30 days and can be revoked. Answers with the token (shown once), the connection id, the project, and the limits: 200 records and 3 MB per batch, 50000 records and 200 MB per round.

## Request body

- object
  - `code` string, required: The one-time code of 8 characters, like ABCD-EF23 (dashes, spaces and case do not matter).
  - `site_url` string, required: The address of the WordPress site (home_url), like https://www.example.com.
  - `site_name` string, nullable: The name of the WordPress site.
  - `wordpress_version` string, nullable: The WordPress version, like 6.6.2.
  - `plugin_version` string, nullable: The version of Hypamoon Connect, like 1.0.0.

## Response `200`

The token, the connection, the project and the limits.

## Other responses

- `400`: Bad Request: invalid_json.
- `404`: Not Found: not_found.
- `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)
