# Porkbun API v3 — Link in Bio

> A Link in Bio page: a single page of links, served on the domain (or, for the free plan that comes with .com registrations, forwarded to `<domain>.l.ink`). Edits made here show up immediately in the page and in the editor on porkbun.com.

• **Turn one on:** free with `/linkinbio/create` (50 links), or paid with `/hosting/create` and sku `PIXIELINKSM1` ($3/month) or `PIXIELINKSY1` ($30/year) for 1000 links plus scheduling, animation, passcode protection and analytics IDs. Buying a paid plan over a free page keeps its content. Cancelling a paid plan (`/hosting/delete`) takes the page down; its content is archived (support can restore it), and `/linkinbio/create` starts a new free page from placeholder content. A free page can't be turned off through the API (`/hosting/delete` returns `NOT_SUPPORTED_FOR_PRODUCT`); to stop showing it, point the domain somewhere else.
• **Edit it:** `get` returns everything with link ids; then `updateProfile`, `addLink`, `editLink`, `deleteLink`, `reorderLinks`, `updateSocials`, `updateAppearance`, `updateSettings`. Reading needs the `read` permission, editing `hosting`.

Not available with sandbox keys.

**Site-share keys** (`/apikey/share`, permission `site`, one domain) can read and edit the page, but not turn one on (`/linkinbio/create`) or buy or cancel a plan.

Part of the Porkbun API v3.109. Topic index: https://porkbun.com/llms · Full reference: https://porkbun.com/llms-full.txt · Overview: https://porkbun.com/llms.txt · OpenAPI spec: https://porkbun.com/api/json/v3/spec

**Auth:** send `X-API-Key` / `X-Secret-API-Key` headers (preferred) or `apikey` / `secretapikey` in the JSON body. Create keys at https://porkbun.com/account/api

---

# Endpoints

## POST /api/json/v3/hosting/create/{domain}

**Buy a hosting plan (static, WordPress or paid Link in Bio)**

**Applies to:** Secure Static Hosting, Cloud for WordPress and paid Link in Bio. The `sku` decides which; list them with `/hosting/plans`.

Buys a hosting plan for a domain in the account. Send the plan's `sku`, and its `price` from `/hosting/plans` as `acknowledgedCost`, which confirms the person was told the price.

**Price and trial:** the first time a domain gets a product, it starts with a **15-day free trial** ($0 now) and then **auto-renews** at the plan price. One trial per domain per product: buying the same product again after cancelling is charged immediately, to account credit, in USDC with `"payWith": "usdc"` (HTTP 402, then repeat with `PAYMENT-SIGNATURE`; kept as account credit if provisioning fails), or by card with `"payWith": "card"` (a hold, captured only if provisioning succeeds). Charges count toward the monthly API spend limit.

**Nameservers:** the domain is switched to Porkbun nameservers if it isn't on them already; send `agreeToNameserverChange: true` to allow that.

**By product:**
- **Secure Static Hosting** (`PIXIESECURESTATIC…`): setup can take a moment; if `status` is `PENDING`, poll `/hosting/get` until `ACTIVE`, then upload with `/hosting/deploy`.
- **Cloud for WordPress** (`CLOUDWORDPRESS…`): a managed WordPress site. Edit its content with `/hosting/wpRequest` and `/hosting/wpUploadMedia` (no WordPress password needed), or mint REST API credentials with `/hosting/createWpCredentials` for your own code; the file endpoints don't apply.
- **Link in Bio** (`PIXIELINKSM1` monthly, `PIXIELINKSY1` yearly): a paid page of links (1000 links and every feature). Over a free Link in Bio page (most .com domains registered at Porkbun have one) it upgrades the page and keeps its title, links and settings. For a free page, use `/linkinbio/create` instead. Edit the page with the `/linkinbio` endpoints.

The free Link in Bio page and the free WordPress preview that come with a domain never block a purchase: the product you buy replaces them.

The call can take 30 seconds or more while the site is set up; wait for it rather than retrying (an `Idempotency-Key` makes a retry safe). Supports `dryRun`. **Rate limit:** 10 purchases per account per hour (`dryRun` calls are free).

**Key permission needed:** `purchase`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `sku` | string | yes | The hosting plan SKU to provision. Discover the provisionable SKUs (and each one’s price/interval/trial) via GET /hosting/plans, then pass the row’s `sku`. Families: Secure Static Hosting `PIXIESECURESTATIC…`, Cloud for WordPress `CLOUDWORDPRESS…`, and paid Link in Bio `PIXIELINKSM1` ($3/month) or `PIXIELINKSY1` ($30/year). |
| `acknowledgedCost` | integer | yes | The plan's `price` in cents, from the same `/hosting/plans` row as the `sku` (e.g. 300 for `PIXIELINKSM1` or `PIXIESECURESTATICM2`, 1200 for `CLOUDWORDPRESSM1`), to confirm the account holder understands the auto-renew / charge. Mismatch returns COST_ACKNOWLEDGMENT_REQUIRED. |
| `agreeToTerms` | string | yes |  |
| `agreeToNameserverChange` | boolean | no | Required (true) when the domain is not already on Porkbun nameservers — provisioning will switch them. |
| `payWith` | string | no | Optional. `"usdc"` pays for this purchase directly in USDC on Base over x402 instead of from account credit. The first call answers HTTP 402 (`PAYMENT_REQUIRED`) with Coinbase's terms in the `PAYMENT-REQUIRED` header and charges nothing; an x402 client pays and repeats the same request with a `PAYMENT-SIGNATURE` header, and the purchase completes in that call. If it then fails, the payment stays on the account as account credit; it is not sent back to the wallet. If your wallet pays URLs itself instead, pay the 402's `x402Url` (or have a person pay `payUrl`) and repeat the request with `usdcCheckoutId`. See the guide: https://porkbun.com/llms/guides/pay-with-usdc-x402. `"card"` pays by card through a Stripe Link agent wallet over MPP instead, with a real hold: the 402 carries a single-use `payUrl` and a `cardPaymentId`; pay the link (it authorizes, not charges), then repeat with `cardPaymentId`; the hold is captured if the purchase succeeds and released if it fails. Guide: https://porkbun.com/llms/guides/pay-with-card-mpp |
| `usdcCheckoutId` | string | no | With `payWith: "usdc"`: the `checkoutId` from an earlier `PAYMENT_REQUIRED`, once its `x402Url` or `payUrl` has been paid. Send it with otherwise the same request; the purchase completes if the checkout is paid and was opened for this purchase. |
| `cardPaymentId` | string | no | With `payWith: "card"`: the `cardPaymentId` from an earlier `PAYMENT_REQUIRED`, once its `payUrl` has been paid (the card is then held). Send it with otherwise the same request; the hold is captured if the purchase succeeds and released if not. |
| `dryRun` | boolean | no | Validate + preview without provisioning or charging. |

```bash
curl -X POST https://api.porkbun.com/api/json/v3/hosting/create/example.com \
  -H 'Content-Type: application/json' \
  -d '{"apikey":"pk1_...","secretapikey":"sk1_...","sku":"PIXIELINKSM1","acknowledgedCost":300,"agreeToTerms":"yes"}'
```

Response fields:

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `orderId` | integer |  |
| `hosting` | object |  |
| `charged` | integer | Cents captured now (0 on the free trial). |
| `cost` | object |  |
| `message` | string |  |

## POST /api/json/v3/hosting/delete/{domain}

**Cancel a hosting plan**

**Applies to:** Secure Static Hosting, Cloud for WordPress and paid Link in Bio.

Cancels the hosting on a domain now. To let a plan run to the end of its term instead, turn auto-renew off with `/hosting/updateAutoRenew`.

**By product:**
- **Secure Static Hosting and Cloud for WordPress:** the site is taken down (Porkbun schedules the teardown). The domain has used its free trial, so buying the same product again later is charged.
- **Link in Bio:** a paid page is taken down too. Its content is archived, not deleted (support can restore it); `/linkinbio/create` starts a new free page from placeholder content. A free page has nothing to cancel and returns `NOT_SUPPORTED_FOR_PRODUCT`; free pages can't be turned off through the API.

**Errors:** `HOSTING_NOT_FOUND`, `NOT_SUPPORTED_FOR_PRODUCT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Response fields (BasicResponse):

| Field | Type | Description |
|---|---|---|
| `warnings` | string[] | Advisory, and present only when there is something to say. It never means the call failed. The one to handle: a DNS write is accepted and stored even when the domain is NOT delegated to our nameservers -- we keep the zone ready in case the delegation comes back -- so the write changed nothing that resolves, and this field says so. Show these to the user as written. |
| `status` | string |  |
| `message` | string | Human-readable message. Present on ERROR, sometimes on SUCCESS. |
| `code` | string | Machine-readable error code. Present when status is ERROR. |

## GET /api/json/v3/linkinbio/get/{domain}

**Get a Link in Bio page**

The page on a domain: its public URL, plan and what the plan allows, profile, links in display order (with ids), social icons, appearance and settings. Use it before editing, and to read link ids.

**Errors:** `LINKINBIO_NOT_FOUND` (no page; the message says what the domain has instead).

**Key permission needed:** `read`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |
| `X-API-Key` | header | no |  |
| `X-Secret-API-Key` | header | no |  |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/get/{domain}

**Get a Link in Bio page**

The page on a domain: its public URL, plan and what the plan allows, profile, links in display order (with ids), social icons, appearance and settings. Use it before editing, and to read link ids.

**Errors:** `LINKINBIO_NOT_FOUND` (no page; the message says what the domain has instead).

**Key permission needed:** `read`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/create/{domain}

**Turn on a free Link in Bio page**

Turns on a free page served on the domain itself (plan PIXIELINKS2M1: up to 50 links; no scheduling, animation, passcode protection or analytics IDs). Free, nothing is ordered. It starts with a placeholder title, bio and link: replace them with `updateProfile`, `editLink` and `addLink`.

The domain is pointed at the page with DNS records, which needs Porkbun nameservers: if the domain uses other ones, send `agreeToNameserverChange: true` to switch them. A free WordPress preview on the domain is replaced; any other hosting is not (`HOSTING_ALREADY_EXISTS`).

Many .com domains registered at Porkbun already have a free page, forwarded to `<domain>.l.ink`; check with `get` first. For a paid plan (1000 links, every feature), use `/hosting/create` with sku `PIXIELINKSM1` or `PIXIELINKSY1`: it upgrades an existing free page and keeps its content. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `LINKINBIO_ALREADY_EXISTS`, `HOSTING_ALREADY_EXISTS`, `NAMESERVER_CHANGE_REQUIRED`, `LINKINBIO_CREATE_FAILED`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `agreeToNameserverChange` | boolean | no | Required when the domain is not on Porkbun nameservers. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/updateProfile/{domain}

**Update the page title, bio and avatar**

Only the fields sent change; an empty title or bio removes it. `avatar` is a base64 JPEG or PNG (a `data:` URL works too), up to 5 MB and 4000x4000; null removes it. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `INVALID_INPUT`, `LINKINBIO_SAVE_FAILED`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `title` | string | no | Up to 100 characters. |
| `bio` | string | no | Up to 500 characters. |
| `avatar` | string | no | Base64 JPEG or PNG, or null to remove. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/addLink/{domain}

**Add a link**

Adds a link, featured link or category heading. `position`: `bottom` (default) or `top`. Returns the new link (with its id) and the page. Fields marked "paid plans" return `FEATURE_NOT_IN_PLAN` on the free on-domain plan, and nothing is saved. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `LINK_LIMIT_REACHED`, `DUPLICATE_LINK` (same title and URL as another link), `FEATURE_NOT_IN_PLAN`, `INVALID_INPUT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | no | `link` (default), `featured` or `category` (a heading; no url). |
| `title` | string | yes | Up to 255 characters. |
| `url` | string | no | http(s) address, up to 255 characters; a bare host gets https:// added. Not for a category. |
| `enabled` | boolean | no | Default true. |
| `startDate` | string | no | Show from this time: YYYY-MM-DD, or ISO 8601; UTC unless an offset is given. null clears it. Paid plans. |
| `endDate` | string | no | Hide after this time; same format. Paid plans. |
| `animation` | string | no | `pulse`, `bounce`, `shake`, or null for none. Paid plans. |
| `protection` | object | no | null removes it. `code` (passcode; paid plans) needs value; `birthday` takes value 18, 21 or 25; `sensitive` shows a warning. |
| `position` | string | no |  |

Response fields (LinkInBioLinkResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `link` | object | One entry on the page, in display order. |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/editLink/{domain}

**Edit a link**

Changes any of a link's fields; `id` is required and only the fields sent change. Set `enabled: false` to hide a link without deleting it. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `LINK_NOT_FOUND`, `DUPLICATE_LINK`, `FEATURE_NOT_IN_PLAN`, `INVALID_INPUT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | no | `link` (default), `featured` or `category` (a heading; no url). |
| `title` | string | no | Up to 255 characters. |
| `url` | string | no | http(s) address, up to 255 characters; a bare host gets https:// added. Not for a category. |
| `enabled` | boolean | no | Default true. |
| `startDate` | string | no | Show from this time: YYYY-MM-DD, or ISO 8601; UTC unless an offset is given. null clears it. Paid plans. |
| `endDate` | string | no | Hide after this time; same format. Paid plans. |
| `animation` | string | no | `pulse`, `bounce`, `shake`, or null for none. Paid plans. |
| `protection` | object | no | null removes it. `code` (passcode; paid plans) needs value; `birthday` takes value 18, 21 or 25; `sensitive` shows a warning. |
| `id` | integer | yes | From `get`. |

Response fields (LinkInBioLinkResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `link` | object | One entry on the page, in display order. |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/deleteLink/{domain}

**Delete a link**

Deletes a link with its image, animation and protection. To hide a link instead, use editLink with `enabled: false`. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `LINK_NOT_FOUND`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | From `get`. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/reorderLinks/{domain}

**Reorder links**

`ids` lists every link id on the page, once each, in the order to show them. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `INVALID_INPUT` (the message lists the current ids).

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `ids` | integer[] | yes | Every link id, in display order. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/updateSocials/{domain}

**Update social icons**

`location` (`top` or `bottom`) and `socials`, an object of email, instagram, facebook, tiktok, youtube, twitter and linkedin: a handle or a profile URL. Only the keys sent change; "" or null removes one. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `INVALID_INPUT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `location` | string | no |  |
| `socials` | object | no |  |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/updateAppearance/{domain}

**Update the page appearance**

Only the keys sent change; null resets one to the editor default. `preset` applies a ready-made look in the editor; set individual colours to fine-tune. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `INVALID_INPUT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `preset` | string | no |  |
| `fontFamily` | string | no |  |
| `buttonStyle` | string | no |  |
| `radius` | integer | no | Button corner radius in pixels, 0-50. |
| `pageBackgroundMode` | string | no | `gradient` blends pageBackgroundColor into pageBackgroundColor2. |
| `textAlign` | string | no |  |
| `pageBackgroundColor` | string | no | Hex colour, e.g. #1b5a8a. |
| `pageBackgroundColor2` | string | no | Hex colour, e.g. #1b5a8a. |
| `pageColor` | string | no | Hex colour, e.g. #1b5a8a. |
| `boxBackgroundColor` | string | no | Hex colour, e.g. #1b5a8a. |
| `borderColor` | string | no | Hex colour, e.g. #1b5a8a. |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/linkinbio/updateSettings/{domain}

**Update page settings**

`sensitiveContent`: a warning (`generic`) or an age check (`18`, `21`, `25`) shown before the page, or null to turn it off. `analytics`: tracking IDs (googleAnalyticsId, facebookPixelId, twitterPixelId, tikTokPixelId) and UTM parameters (utmSource, utmMedium) added to outgoing links; paid plans; "" removes one. The mailing-list signup form is set up in the editor only. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `FEATURE_NOT_IN_PLAN`, `INVALID_INPUT`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `sensitiveContent` | string | no |  |
| `analytics` | object | no |  |

Response fields (LinkInBioResponse):

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `linkInBio` | object |  |

## POST /api/json/v3/hosting/updateAutoRenew/{domain}

**Turn hosting auto-renew on or off**

**Applies to:** Secure Static Hosting, Cloud for WordPress and paid Link in Bio.

The same switch as on the hosting page on porkbun.com. Off: the plan stays active until `expireDate` and is not charged again (a trial ends without a charge); after that the hosting is removed (a Link in Bio page is taken down; its content is archived). On: it renews before `expireDate` at the plan price. `GET /hosting/get` shows the current setting (`autoRenew`).

Free plans never renew, so they return `NOT_SUPPORTED_FOR_PRODUCT`. Supports `dryRun`. Not available with sandbox keys.

**Errors:** `HOSTING_NOT_FOUND`, `NOT_SUPPORTED_FOR_PRODUCT`, `INVALID_INPUT`, `UPDATE_FAILED`.

**Key permission needed:** `hosting`

| Parameter | In | Required | Description |
|---|---|---|---|
| `domain` | path | yes |  |
| `Idempotency-Key` | header | no | Optional, recommended on every purchase and write. Send a unique value (a UUID) per intended operation. Repeating the request with the same key and an identical body within 24 hours returns the original response instead of doing it again, so a retry after a timeout cannot double-charge or double-apply. The same key with a different body returns 409 IDEMPOTENCY_KEY_MISMATCH; while the first request is still running, 409 IDEMPOTENCY_KEY_IN_USE. |

Request body fields:

| Field | Type | Required | Description |
|---|---|---|---|
| `autoRenew` | boolean | yes | true to renew automatically, false to let the plan end at expireDate. |

Response fields:

| Field | Type | Description |
|---|---|---|
| `status` | string |  |
| `domain` | string |  |
| `product` | string |  |
| `autoRenew` | boolean |  |
| `isTrial` | boolean |  |
| `expireDate` | string | When the current term (or trial) ends. |
| `cost` | object |  |
| `message` | string | What happens next, in words to relay to the user. |

---

## More

- Short overview (start here): https://porkbun.com/llms.txt
- Guides (how-tos): https://porkbun.com/llms/guides
- Help articles (knowledge base) as Markdown: https://porkbun.com/llms/kb
- Topic index: https://porkbun.com/llms
- Full reference (one file): https://porkbun.com/llms-full.txt
- OpenAPI spec (full schemas): https://porkbun.com/api/json/v3/spec
- Official MCP server: https://porkbun.com/mcp (`npx -y @porkbunllc/mcp-server`)
- Create API keys: https://porkbun.com/account/api
