@distilled.cloud/porkbun 1.0.0-rc.13 → 1.0.0-rc.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  import * as S from "@distilled.cloud/core/schema";
2
3
  import * as Redacted from "effect/Redacted";
3
- import * as API from "@distilled.cloud/core/api";
4
4
  import { type PorkbunOpError, type PorkbunOpContext } from "../protocol.ts";
5
5
  export type { PorkbunOpError, PorkbunOpContext };
6
6
  declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest", {
@@ -13,6 +13,16 @@ declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest",
13
13
  });
14
14
  export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
15
15
  }
16
+ declare const Conflict_base: S.Class<Conflict, S.TaggedStruct<"Conflict", {
17
+ readonly code: any;
18
+ readonly message: any;
19
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
20
+ "@distilled.cloud/error/categories": {
21
+ ConflictError: true;
22
+ };
23
+ });
24
+ export declare class Conflict extends /*@__PURE__*/ Conflict_base {
25
+ }
16
26
  declare const Forbidden_base: S.Class<Forbidden, S.TaggedStruct<"Forbidden", {
17
27
  readonly code: any;
18
28
  readonly message: any;
@@ -33,6 +43,41 @@ declare const NotFound_base: S.Class<NotFound, S.TaggedStruct<"NotFound", {
33
43
  });
34
44
  export declare class NotFound extends /*@__PURE__*/ NotFound_base {
35
45
  }
46
+ export interface AccountVerifyPhoneConfirmRequest {
47
+ /** The code the person received, exactly as texted. Case does not matter. */
48
+ code: string;
49
+ }
50
+ export declare const AccountVerifyPhoneConfirmRequest: S.Schema<AccountVerifyPhoneConfirmRequest>;
51
+ export interface AccountVerifyPhoneConfirmResponse {
52
+ status?: string;
53
+ verified?: boolean;
54
+ alreadyVerified?: boolean;
55
+ emailVerified?: boolean;
56
+ message?: string;
57
+ }
58
+ export declare const AccountVerifyPhoneConfirmResponse: S.Schema<AccountVerifyPhoneConfirmResponse>;
59
+ /** `call` reads the code out by voice, for when a text does not arrive. */
60
+ export type AccountVerifyPhoneSendRequestChannel = "sms" | "call";
61
+ export declare const AccountVerifyPhoneSendRequestChannel: any;
62
+ export interface AccountVerifyPhoneSendRequest {
63
+ /** `call` reads the code out by voice, for when a text does not arrive. */
64
+ channel?: AccountVerifyPhoneSendRequestChannel | (string & {});
65
+ dryRun?: boolean;
66
+ }
67
+ export declare const AccountVerifyPhoneSendRequest: S.Schema<AccountVerifyPhoneSendRequest>;
68
+ export interface AccountVerifyPhoneSendResponse {
69
+ status?: string;
70
+ sent?: boolean;
71
+ codeAlreadySent?: boolean;
72
+ alreadyVerified?: boolean;
73
+ channel?: string;
74
+ /** The number, masked (`+1 ••• 42`). */
75
+ sentTo?: string;
76
+ expiresInMinutes?: number;
77
+ retryAfterSeconds?: number;
78
+ message?: string;
79
+ }
80
+ export declare const AccountVerifyPhoneSendResponse: S.Schema<AccountVerifyPhoneSendResponse>;
36
81
  /** PKCE challenge method. Only S256 is supported. */
37
82
  export type ApikeyRequestRequestCodeChallengeMethod = "S256";
38
83
  export declare const ApikeyRequestRequestCodeChallengeMethod: any;
@@ -66,6 +111,212 @@ export interface ApikeyRequestResponse {
66
111
  message?: string;
67
112
  }
68
113
  export declare const ApikeyRequestResponse: S.Schema<ApikeyRequestResponse>;
114
+ /** Domains to check, e.g. ["example.com", "example.net"]. Duplicates are removed. */
115
+ export type BulkDomainCheckDomainRequestDomainsList = Array<string>;
116
+ export declare const BulkDomainCheckDomainRequestDomainsList: S.Schema<BulkDomainCheckDomainRequestDomainsList>;
117
+ export interface BulkDomainCheckDomainRequest {
118
+ /** Domains to check, e.g. ["example.com", "example.net"]. Duplicates are removed. */
119
+ domains: BulkDomainCheckDomainRequestDomainsList;
120
+ }
121
+ export declare const BulkDomainCheckDomainRequest: S.Schema<BulkDomainCheckDomainRequest>;
122
+ /** Keyed by domain name; each value has the same shape as the single-check `response` object */
123
+ export type BulkDomainCheckDomainResponseDomainsMap = {
124
+ [key: string]: unknown | undefined;
125
+ };
126
+ export declare const BulkDomainCheckDomainResponseDomainsMap: S.Schema<BulkDomainCheckDomainResponseDomainsMap>;
127
+ /** The registry did not answer for these. NOT a statement of availability - retry them. */
128
+ export type BulkDomainCheckDomainResponseUnresolvedList = Array<string>;
129
+ export declare const BulkDomainCheckDomainResponseUnresolvedList: S.Schema<BulkDomainCheckDomainResponseUnresolvedList>;
130
+ /** Entries that could not be checked, each with a reason */
131
+ export type BulkDomainCheckDomainResponseInvalidList = Array<unknown>;
132
+ export declare const BulkDomainCheckDomainResponseInvalidList: S.Schema<BulkDomainCheckDomainResponseInvalidList>;
133
+ export interface BulkDomainCheckDomainResponse {
134
+ status?: string;
135
+ /** How many domains were answered */
136
+ checked?: number;
137
+ /** Keyed by domain name; each value has the same shape as the single-check `response` object */
138
+ domains?: BulkDomainCheckDomainResponseDomainsMap;
139
+ /** The registry did not answer for these. NOT a statement of availability - retry them. */
140
+ unresolved?: BulkDomainCheckDomainResponseUnresolvedList;
141
+ /** Entries that could not be checked, each with a reason */
142
+ invalid?: BulkDomainCheckDomainResponseInvalidList;
143
+ /** Bulk budget usage; `countedIn` is "domains" */
144
+ limits?: unknown;
145
+ }
146
+ export declare const BulkDomainCheckDomainResponse: S.Schema<BulkDomainCheckDomainResponse>;
147
+ /** 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 */
148
+ export type CloseoutBuyRequestPayWith = "usdc";
149
+ export declare const CloseoutBuyRequestPayWith: any;
150
+ export interface CloseoutBuyRequest {
151
+ domain: string;
152
+ /** Exact totalPrice in integer US cents, from /closeout/get/{domain}. Use 0 only with dryRun to request a quote. */
153
+ cost: number;
154
+ /** 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 */
155
+ payWith?: CloseoutBuyRequestPayWith | (string & {});
156
+ /** 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. */
157
+ usdcCheckoutId?: string;
158
+ /** Validate and price without charging or claiming. */
159
+ dryRun?: boolean;
160
+ }
161
+ export declare const CloseoutBuyRequest: S.Schema<CloseoutBuyRequest>;
162
+ export interface CloseoutBuyResponse {
163
+ status?: string;
164
+ domain?: string;
165
+ orderId?: number;
166
+ closeoutId?: number;
167
+ closeoutPrice?: number;
168
+ renewalPrice?: number;
169
+ totalPrice?: number;
170
+ message?: string;
171
+ }
172
+ export declare const CloseoutBuyResponse: S.Schema<CloseoutBuyResponse>;
173
+ export interface CloudflareCreateRecordRequest {
174
+ domain: string;
175
+ /** A, AAAA, CNAME, TXT, MX, NS, PTR or SPF for a plain `content` value. Structured types (SRV, CAA, TLSA…) need `data` instead. */
176
+ type: string;
177
+ /** `@` for the apex, a bare label (`www`) is expanded, or a full hostname. */
178
+ name?: string;
179
+ /** The value the record points at. */
180
+ content?: string;
181
+ /** 1 = automatic (Cloudflare's default), otherwise 60–86400. */
182
+ ttl?: number;
183
+ /** Required for MX; lower is preferred. */
184
+ priority?: number;
185
+ /** Orange cloud. A/AAAA/CNAME only. */
186
+ proxied?: boolean;
187
+ /** Free-text note stored on the record (100 chars). */
188
+ comment?: string;
189
+ /** Structured value for record types Cloudflare models as an object (SRV, CAA…), passed through as given. */
190
+ data?: unknown;
191
+ dryRun?: boolean;
192
+ }
193
+ export declare const CloudflareCreateRecordRequest: S.Schema<CloudflareCreateRecordRequest>;
194
+ export type CloudflareCreateRecordResponse = unknown;
195
+ export declare const CloudflareCreateRecordResponse: S.Schema<CloudflareCreateRecordResponse>;
196
+ export interface CloudflareDeleteRecordRequest {
197
+ domain: string;
198
+ /** Cloudflare record id from /cloudflare/getRecords. */
199
+ recordId: string;
200
+ dryRun?: boolean;
201
+ }
202
+ export declare const CloudflareDeleteRecordRequest: S.Schema<CloudflareDeleteRecordRequest>;
203
+ export type CloudflareDeleteRecordResponse = unknown;
204
+ export declare const CloudflareDeleteRecordResponse: S.Schema<CloudflareDeleteRecordResponse>;
205
+ export interface CloudflareEditRecordRequest {
206
+ domain: string;
207
+ /** Cloudflare record id from /cloudflare/getRecords. */
208
+ recordId: string;
209
+ /** A, AAAA, CNAME, TXT, MX, NS, PTR or SPF for a plain `content` value. Structured types (SRV, CAA, TLSA…) need `data` instead. */
210
+ type?: string;
211
+ /** `@` for the apex, a bare label (`www`) is expanded, or a full hostname. */
212
+ name?: string;
213
+ /** The value the record points at. */
214
+ content?: string;
215
+ /** 1 = automatic (Cloudflare's default), otherwise 60–86400. */
216
+ ttl?: number;
217
+ /** Required for MX; lower is preferred. */
218
+ priority?: number;
219
+ /** Orange cloud. A/AAAA/CNAME only. */
220
+ proxied?: boolean;
221
+ /** Free-text note stored on the record (100 chars). */
222
+ comment?: string;
223
+ /** Structured value for record types Cloudflare models as an object (SRV, CAA…), passed through as given. */
224
+ data?: unknown;
225
+ dryRun?: boolean;
226
+ }
227
+ export declare const CloudflareEditRecordRequest: S.Schema<CloudflareEditRecordRequest>;
228
+ export type CloudflareEditRecordResponse = unknown;
229
+ export declare const CloudflareEditRecordResponse: S.Schema<CloudflareEditRecordResponse>;
230
+ export interface CloudflareGetConnectionRequest {
231
+ }
232
+ export declare const CloudflareGetConnectionRequest: S.Schema<CloudflareGetConnectionRequest>;
233
+ export type CloudflareGetConnectionResponse = unknown;
234
+ export declare const CloudflareGetConnectionResponse: S.Schema<CloudflareGetConnectionResponse>;
235
+ export interface CloudflareGetQueueRequest {
236
+ }
237
+ export declare const CloudflareGetQueueRequest: S.Schema<CloudflareGetQueueRequest>;
238
+ export type CloudflareGetQueueResponse = unknown;
239
+ export declare const CloudflareGetQueueResponse: S.Schema<CloudflareGetQueueResponse>;
240
+ export interface CloudflareGetRecordsRequest {
241
+ domain: string;
242
+ }
243
+ export declare const CloudflareGetRecordsRequest: S.Schema<CloudflareGetRecordsRequest>;
244
+ export type CloudflareGetRecordsResponse = unknown;
245
+ export declare const CloudflareGetRecordsResponse: S.Schema<CloudflareGetRecordsResponse>;
246
+ export interface CloudflareGetZoneRequest {
247
+ domain: string;
248
+ }
249
+ export declare const CloudflareGetZoneRequest: S.Schema<CloudflareGetZoneRequest>;
250
+ export type CloudflareGetZoneResponse = unknown;
251
+ export declare const CloudflareGetZoneResponse: S.Schema<CloudflareGetZoneResponse>;
252
+ export interface CloudflareGetZoneSettingsRequest {
253
+ domain: string;
254
+ }
255
+ export declare const CloudflareGetZoneSettingsRequest: S.Schema<CloudflareGetZoneSettingsRequest>;
256
+ export type CloudflareGetZoneSettingsResponse = unknown;
257
+ export declare const CloudflareGetZoneSettingsResponse: S.Schema<CloudflareGetZoneSettingsResponse>;
258
+ export interface CloudflareInventoryRequest {
259
+ }
260
+ export declare const CloudflareInventoryRequest: S.Schema<CloudflareInventoryRequest>;
261
+ export type CloudflareInventoryResponse = unknown;
262
+ export declare const CloudflareInventoryResponse: S.Schema<CloudflareInventoryResponse>;
263
+ export interface CloudflareRollbackRequest {
264
+ domain: string;
265
+ }
266
+ export declare const CloudflareRollbackRequest: S.Schema<CloudflareRollbackRequest>;
267
+ export type CloudflareRollbackResponse = unknown;
268
+ export declare const CloudflareRollbackResponse: S.Schema<CloudflareRollbackResponse>;
269
+ /** Optional. Limit to these names; "@" = apex, bare labels are expanded. */
270
+ export type CloudflareSetProxyRequestRecordsList = Array<string>;
271
+ export declare const CloudflareSetProxyRequestRecordsList: S.Schema<CloudflareSetProxyRequestRecordsList>;
272
+ export interface CloudflareSetProxyRequest {
273
+ domain: string;
274
+ /** true = proxy through Cloudflare (orange cloud); false = DNS-only (grey cloud). */
275
+ enabled: boolean;
276
+ /** Optional. Limit to these names; "@" = apex, bare labels are expanded. */
277
+ records?: CloudflareSetProxyRequestRecordsList;
278
+ dryRun?: boolean;
279
+ }
280
+ export declare const CloudflareSetProxyRequest: S.Schema<CloudflareSetProxyRequest>;
281
+ export type CloudflareSetProxyResponse = unknown;
282
+ export declare const CloudflareSetProxyResponse: S.Schema<CloudflareSetProxyResponse>;
283
+ export type CloudflareSetZoneSettingsRequestSsl = "off" | "flexible" | "full" | "strict";
284
+ export declare const CloudflareSetZoneSettingsRequestSsl: any;
285
+ export type CloudflareSetZoneSettingsRequestAlwaysUseHttps = "on" | "off";
286
+ export declare const CloudflareSetZoneSettingsRequestAlwaysUseHttps: any;
287
+ export type CloudflareSetZoneSettingsRequestAutomaticHttpsRewrites = "on" | "off";
288
+ export declare const CloudflareSetZoneSettingsRequestAutomaticHttpsRewrites: any;
289
+ export type CloudflareSetZoneSettingsRequestMinTlsVersion = "1.0" | "1.1" | "1.2" | "1.3";
290
+ export declare const CloudflareSetZoneSettingsRequestMinTlsVersion: any;
291
+ export type CloudflareSetZoneSettingsRequestDevelopmentMode = "on" | "off";
292
+ export declare const CloudflareSetZoneSettingsRequestDevelopmentMode: any;
293
+ export type CloudflareSetZoneSettingsRequestCacheLevel = "aggressive" | "basic" | "simplified";
294
+ export declare const CloudflareSetZoneSettingsRequestCacheLevel: any;
295
+ export interface CloudflareSetZoneSettingsRequest {
296
+ domain: string;
297
+ ssl?: CloudflareSetZoneSettingsRequestSsl | (string & {});
298
+ always_use_https?: CloudflareSetZoneSettingsRequestAlwaysUseHttps | (string & {});
299
+ automatic_https_rewrites?: CloudflareSetZoneSettingsRequestAutomaticHttpsRewrites | (string & {});
300
+ min_tls_version?: CloudflareSetZoneSettingsRequestMinTlsVersion | (string & {});
301
+ development_mode?: CloudflareSetZoneSettingsRequestDevelopmentMode | (string & {});
302
+ cache_level?: CloudflareSetZoneSettingsRequestCacheLevel | (string & {});
303
+ dryRun?: boolean;
304
+ }
305
+ export declare const CloudflareSetZoneSettingsRequest: S.Schema<CloudflareSetZoneSettingsRequest>;
306
+ export type CloudflareSetZoneSettingsResponse = unknown;
307
+ export declare const CloudflareSetZoneSettingsResponse: S.Schema<CloudflareSetZoneSettingsResponse>;
308
+ /** Domain names to move. A comma-separated string is also accepted. */
309
+ export type ConnectCloudflareRequestDomainsList = Array<string>;
310
+ export declare const ConnectCloudflareRequestDomainsList: S.Schema<ConnectCloudflareRequestDomainsList>;
311
+ export interface ConnectCloudflareRequest {
312
+ /** Domain names to move. A comma-separated string is also accepted. */
313
+ domains: ConnectCloudflareRequestDomainsList;
314
+ /** Validate and return per-domain verdicts without queueing. */
315
+ dryRun?: boolean;
316
+ }
317
+ export declare const ConnectCloudflareRequest: S.Schema<ConnectCloudflareRequest>;
318
+ export type ConnectCloudflareResponse = unknown;
319
+ export declare const ConnectCloudflareResponse: S.Schema<ConnectCloudflareResponse>;
69
320
  export interface CreateAccountInviteRequest {
70
321
  /** Email address to pre-fill on the registration form (optional) */
71
322
  email?: string;
@@ -104,15 +355,22 @@ export interface CreateDnsRequest {
104
355
  dryRun?: boolean;
105
356
  }
106
357
  export declare const CreateDnsRequest: S.Schema<CreateDnsRequest>;
358
+ /** 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. */
359
+ export type DnsWriteWarnings = Array<string>;
360
+ export declare const DnsWriteWarnings: S.Schema<DnsWriteWarnings>;
107
361
  export interface CreateDnsResponse {
108
362
  status?: string;
109
363
  /** The numeric ID of the newly created record */
110
364
  id?: string;
365
+ warnings?: DnsWriteWarnings;
111
366
  }
112
367
  export declare const CreateDnsResponse: S.Schema<CreateDnsResponse>;
113
368
  /** Must be 'yes' or '1' to confirm agreement to the Domain Name Registration Agreement, Product Terms of Service, Privacy Policy, and automatic renewal terms. */
114
369
  export type CreateDomainRequestAgreeToTerms = "yes" | "1";
115
370
  export declare const CreateDomainRequestAgreeToTerms: any;
371
+ /** 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 */
372
+ export type CreateDomainRequestPayWith = "usdc";
373
+ export declare const CreateDomainRequestPayWith: any;
116
374
  export interface CreateDomainRequest {
117
375
  domain: string;
118
376
  /** The registration cost in pennies (USD cents). Must exactly equal the total price for the domain at its minimum registration duration. Obtain this from /domain/checkDomain first. */
@@ -121,7 +379,11 @@ export interface CreateDomainRequest {
121
379
  agreeToTerms: CreateDomainRequestAgreeToTerms | (string & {});
122
380
  /** Optional. Override WHOIS privacy for this registration. When omitted, the account-level default is used (set under Account Security Settings on porkbun.com/account — defaults to enabled). Pass `true` to force-enable privacy or `false` to register with public contact info. Strings `"on"`/`"off"`, `"true"`/`"false"`, `"yes"`/`"no"`, `"1"`/`"0"` are also accepted. Has no effect on TLDs that don't support WHOIS privacy (privacy stays off regardless). */
123
381
  whoisPrivacy?: boolean;
124
- /** Optional. When true, runs all pre-flight validation (availability, pricing, cost match, eligibility, funds, spend limit) and returns a preview with `dryRun: true` and `wouldSucceed` WITHOUT creating an order or charging. Nothing is registered and the rate-limit budget is not consumed. Use it to safely confirm an operation before committing. */
382
+ /** 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 */
383
+ payWith?: CreateDomainRequestPayWith | (string & {});
384
+ /** 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. */
385
+ usdcCheckoutId?: string;
386
+ /** Optional. When true, runs all pre-flight validation (availability, pricing, cost match, eligibility, funds, monthly spend limit, including the $100 default when none is set) and returns a preview with `dryRun: true` and `wouldSucceed` WITHOUT creating an order or charging. Nothing is registered and the rate-limit budget is not consumed. Use it to safely confirm an operation before committing. */
125
387
  dryRun?: boolean;
126
388
  }
127
389
  export declare const CreateDomainRequest: S.Schema<CreateDomainRequest>;
@@ -220,6 +482,9 @@ export type CreateHostingRequestSku = "PIXIESECURESTATICM2" | "PIXIESECURESTATIC
220
482
  export declare const CreateHostingRequestSku: any;
221
483
  export type CreateHostingRequestAgreeToTerms = "yes";
222
484
  export declare const CreateHostingRequestAgreeToTerms: any;
485
+ /** 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 */
486
+ export type CreateHostingRequestPayWith = "usdc";
487
+ export declare const CreateHostingRequestPayWith: any;
223
488
  export interface CreateHostingRequest {
224
489
  domain: string;
225
490
  /** 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`. Currently Secure Static Hosting: PIXIESECURESTATICM2 ($3.00/mo) or PIXIESECURESTATICY2 ($30.00/yr). */
@@ -229,6 +494,10 @@ export interface CreateHostingRequest {
229
494
  agreeToTerms: CreateHostingRequestAgreeToTerms | (string & {});
230
495
  /** Required (true) when the domain is not already on Porkbun nameservers — provisioning will switch them. */
231
496
  agreeToNameserverChange?: boolean;
497
+ /** 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 */
498
+ payWith?: CreateHostingRequestPayWith | (string & {});
499
+ /** 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. */
500
+ usdcCheckoutId?: string;
232
501
  /** Validate + preview without provisioning or charging. */
233
502
  dryRun?: boolean;
234
503
  }
@@ -267,7 +536,7 @@ export declare const CreateHostingResponse: S.Schema<CreateHostingResponse>;
267
536
  export type CreateWebhookRequestEventsList = Array<string>;
268
537
  export declare const CreateWebhookRequestEventsList: S.Schema<CreateWebhookRequestEventsList>;
269
538
  export interface CreateWebhookRequest {
270
- /** HTTPS URL to deliver events to. */
539
+ /** HTTPS endpoint that receives the signed POST. Port 443 only, and the hostname must resolve to a public internet address — private/loopback/reserved targets are refused. */
271
540
  url: string;
272
541
  /** Event types to subscribe to. Omit, or pass ["*"], for all events. Prefix wildcards like "dns.*" are allowed. */
273
542
  events?: CreateWebhookRequestEventsList;
@@ -316,6 +585,7 @@ export declare const DeleteDnsRequest: S.Schema<DeleteDnsRequest>;
316
585
  export type BasicResponseStatus = "SUCCESS" | "ERROR";
317
586
  export declare const BasicResponseStatus: any;
318
587
  export interface BasicResponse {
588
+ warnings?: DnsWriteWarnings;
319
589
  status: BasicResponseStatus;
320
590
  /** Human-readable message. Present on ERROR, sometimes on SUCCESS. */
321
591
  message?: string;
@@ -365,6 +635,11 @@ export interface DeployHostingResponse {
365
635
  skipped?: DeployHostingResponseSkippedList;
366
636
  }
367
637
  export declare const DeployHostingResponse: S.Schema<DeployHostingResponse>;
638
+ export interface DisconnectCloudflareRequest {
639
+ }
640
+ export declare const DisconnectCloudflareRequest: S.Schema<DisconnectCloudflareRequest>;
641
+ export type DisconnectCloudflareResponse = unknown;
642
+ export declare const DisconnectCloudflareResponse: S.Schema<DisconnectCloudflareResponse>;
368
643
  export interface DnsCreateDnssecRecordRequest {
369
644
  domain: string;
370
645
  /** DNSSEC key tag */
@@ -387,6 +662,17 @@ export interface DnsCreateDnssecRecordRequest {
387
662
  keyDataPubKey?: string;
388
663
  }
389
664
  export declare const DnsCreateDnssecRecordRequest: S.Schema<DnsCreateDnssecRecordRequest>;
665
+ export type DnsCreateDnssecRecordResponseStatus = "SUCCESS" | "ERROR";
666
+ export declare const DnsCreateDnssecRecordResponseStatus: any;
667
+ export interface DnsCreateDnssecRecordResponse {
668
+ warnings?: DnsWriteWarnings;
669
+ status: DnsCreateDnssecRecordResponseStatus;
670
+ /** Human-readable message. Present on ERROR, sometimes on SUCCESS. */
671
+ message?: string;
672
+ /** Machine-readable error code. Present when status is ERROR. */
673
+ code?: string;
674
+ }
675
+ export declare const DnsCreateDnssecRecordResponse: S.Schema<DnsCreateDnssecRecordResponse>;
390
676
  export interface DnsDeleteByNameTypeRequest {
391
677
  domain: string;
392
678
  type: string;
@@ -400,6 +686,45 @@ export interface DnsDeleteDnssecRecordRequest {
400
686
  keytag: string;
401
687
  }
402
688
  export declare const DnsDeleteDnssecRecordRequest: S.Schema<DnsDeleteDnssecRecordRequest>;
689
+ export interface DnsDiffRequest {
690
+ domain: string;
691
+ /** A restore point id from GET /dns/history/{domain}. */
692
+ snapshotId: number;
693
+ }
694
+ export declare const DnsDiffRequest: S.Schema<DnsDiffRequest>;
695
+ export interface DnsDiffResponseSnapshot {
696
+ id?: number;
697
+ takenAt?: string;
698
+ reason?: string;
699
+ }
700
+ export declare const DnsDiffResponseSnapshot: S.Schema<DnsDiffResponseSnapshot>;
701
+ export interface DnsHistoryRecord {
702
+ /** Fully qualified. */
703
+ name?: string;
704
+ type?: string;
705
+ /** For masked records (parking, ALIAS, HTTPS) this is the value you configured, not the internal host it resolves to. */
706
+ content?: string;
707
+ ttl?: number;
708
+ prio?: number | null;
709
+ }
710
+ export declare const DnsHistoryRecord: S.Schema<DnsHistoryRecord>;
711
+ /** In the restore point, not live. A restore adds these back. */
712
+ export type DnsDiffResponseMissingList = Array<DnsHistoryRecord>;
713
+ export declare const DnsDiffResponseMissingList: S.Schema<DnsDiffResponseMissingList>;
714
+ /** Live, not in the restore point. A restore leaves these alone unless prune is true. */
715
+ export type DnsDiffResponseExtraList = Array<DnsHistoryRecord>;
716
+ export declare const DnsDiffResponseExtraList: S.Schema<DnsDiffResponseExtraList>;
717
+ export interface DnsDiffResponse {
718
+ status?: string;
719
+ domain?: string;
720
+ snapshot?: DnsDiffResponseSnapshot;
721
+ /** In the restore point, not live. A restore adds these back. */
722
+ missing?: DnsDiffResponseMissingList;
723
+ /** Live, not in the restore point. A restore leaves these alone unless prune is true. */
724
+ extra?: DnsDiffResponseExtraList;
725
+ inSync?: boolean;
726
+ }
727
+ export declare const DnsDiffResponse: S.Schema<DnsDiffResponse>;
403
728
  export interface DnsEditByNameTypeRequest {
404
729
  domain: string;
405
730
  type: string;
@@ -439,6 +764,78 @@ export interface DnsGetDnssecRecordsResponse {
439
764
  records?: DnsGetDnssecRecordsResponseRecordsMap;
440
765
  }
441
766
  export declare const DnsGetDnssecRecordsResponse: S.Schema<DnsGetDnssecRecordsResponse>;
767
+ export interface DnsHistoryRequest {
768
+ domain: string;
769
+ }
770
+ export declare const DnsHistoryRequest: S.Schema<DnsHistoryRequest>;
771
+ export interface DnsHistoryResponseRestorePointsItem {
772
+ /** Pass this to /dns/diff and /dns/restore. */
773
+ id?: number;
774
+ takenAt?: string;
775
+ /** Why it was taken: before-create, before-edit, before-delete, before-wipe, before-restore-{id}, or a reason supplied by support. */
776
+ reason?: string;
777
+ /** auto (taken by the platform before a write), api, cli or archiveDns. */
778
+ source?: string;
779
+ /** The size of the zone AS IT WAS at that moment, not now. */
780
+ recordCount?: number;
781
+ /** True when the live zone is identical to this point, so you can see where you are without diffing. */
782
+ matchesLive?: boolean;
783
+ }
784
+ export declare const DnsHistoryResponseRestorePointsItem: S.Schema<DnsHistoryResponseRestorePointsItem>;
785
+ /** Newest first, up to 50. */
786
+ export type DnsHistoryResponseRestorePointsList = Array<DnsHistoryResponseRestorePointsItem>;
787
+ export declare const DnsHistoryResponseRestorePointsList: S.Schema<DnsHistoryResponseRestorePointsList>;
788
+ export interface DnsHistoryResponse {
789
+ status?: string;
790
+ domain?: string;
791
+ /** Newest first, up to 50. */
792
+ restorePoints?: DnsHistoryResponseRestorePointsList;
793
+ }
794
+ export declare const DnsHistoryResponse: S.Schema<DnsHistoryResponse>;
795
+ export type DnsPreflightRequestIntent = "general" | "move-nameservers" | "transfer-out" | "enable-dnssec";
796
+ export declare const DnsPreflightRequestIntent: any;
797
+ export interface DnsPreflightRequest {
798
+ domain: string;
799
+ /** What you are about to do. One of general, move-nameservers, transfer-out, enable-dnssec. May also be sent in the request body. */
800
+ intent?: DnsPreflightRequestIntent | (string & {});
801
+ }
802
+ export declare const DnsPreflightRequest: S.Schema<DnsPreflightRequest>;
803
+ /** Check ids that will break something. Read these first. */
804
+ export type DnsPreflightResponseBlockersList = Array<string>;
805
+ export declare const DnsPreflightResponseBlockersList: S.Schema<DnsPreflightResponseBlockersList>;
806
+ /** Will not break outright, but usually what the customer asks about next. */
807
+ export type DnsPreflightResponseWarningsList = Array<string>;
808
+ export declare const DnsPreflightResponseWarningsList: S.Schema<DnsPreflightResponseWarningsList>;
809
+ export type DnsPreflightResponseChecksItemSeverity = "blocker" | "warning" | "info";
810
+ export declare const DnsPreflightResponseChecksItemSeverity: any;
811
+ export interface DnsPreflightResponseChecksItem {
812
+ id?: string;
813
+ severity?: DnsPreflightResponseChecksItemSeverity;
814
+ ok?: boolean;
815
+ title?: string;
816
+ /** The reasoning, including the rule it comes from. */
817
+ detail?: string;
818
+ /** What to do about it. Absent on checks that passed. */
819
+ next_action?: string;
820
+ }
821
+ export declare const DnsPreflightResponseChecksItem: S.Schema<DnsPreflightResponseChecksItem>;
822
+ /** Every check that ran, passing ones included, so a caller can show what was verified rather than only what failed. */
823
+ export type DnsPreflightResponseChecksList = Array<DnsPreflightResponseChecksItem>;
824
+ export declare const DnsPreflightResponseChecksList: S.Schema<DnsPreflightResponseChecksList>;
825
+ export interface DnsPreflightResponse {
826
+ status?: string;
827
+ domain?: string;
828
+ intent?: string;
829
+ /** True only when there are no blockers AND no warnings. */
830
+ safe?: boolean;
831
+ /** Check ids that will break something. Read these first. */
832
+ blockers?: DnsPreflightResponseBlockersList;
833
+ /** Will not break outright, but usually what the customer asks about next. */
834
+ warnings?: DnsPreflightResponseWarningsList;
835
+ /** Every check that ran, passing ones included, so a caller can show what was verified rather than only what failed. */
836
+ checks?: DnsPreflightResponseChecksList;
837
+ }
838
+ export declare const DnsPreflightResponse: S.Schema<DnsPreflightResponse>;
442
839
  export interface DnsRetrieveByIdRequest {
443
840
  domain: string;
444
841
  /** Numeric DNS record ID */
@@ -482,6 +879,31 @@ export interface DnsRetrieveByNameTypeRequest {
482
879
  subdomain: string;
483
880
  }
484
881
  export declare const DnsRetrieveByNameTypeRequest: S.Schema<DnsRetrieveByNameTypeRequest>;
882
+ export interface DnsScanRequest {
883
+ domain: string;
884
+ }
885
+ export declare const DnsScanRequest: S.Schema<DnsScanRequest>;
886
+ export interface DnsRecordInput {
887
+ /** Subdomain prefix only, or empty string for the apex. `@` and a fully-qualified name are both accepted and normalised. */
888
+ name?: string;
889
+ /** Record type. NS and SOA are ignored on import. */
890
+ type?: string;
891
+ content?: string;
892
+ /** Raised to the API minimum if lower. */
893
+ ttl?: number;
894
+ /** Priority, for MX and SRV. */
895
+ prio?: number | null;
896
+ }
897
+ export declare const DnsRecordInput: S.Schema<DnsRecordInput>;
898
+ export type DnsScanResponseRecordsList = Array<DnsRecordInput>;
899
+ export declare const DnsScanResponseRecordsList: S.Schema<DnsScanResponseRecordsList>;
900
+ export interface DnsScanResponse {
901
+ status?: string;
902
+ domain?: string;
903
+ recordCount?: number;
904
+ records?: DnsScanResponseRecordsList;
905
+ }
906
+ export declare const DnsScanResponse: S.Schema<DnsScanResponse>;
485
907
  /** Redirect kind. 'permanent' = HTTP 301; 'temporary' = HTTP 302 (default); 'masked' = loads the destination in a frame (URL masking). For a precise code — including a 307 temporary redirect — use `redirectType`. */
486
908
  export type DomainAddUrlForwardRequestType = "temporary" | "permanent" | "masked";
487
909
  export declare const DomainAddUrlForwardRequestType: any;
@@ -510,6 +932,26 @@ export interface DomainAddUrlForwardRequest {
510
932
  wildcard: DomainAddUrlForwardRequestWildcard | (string & {});
511
933
  }
512
934
  export declare const DomainAddUrlForwardRequest: S.Schema<DomainAddUrlForwardRequest>;
935
+ export interface DomainCancelTransferRequest {
936
+ /** Domain name. */
937
+ domain: string;
938
+ }
939
+ export declare const DomainCancelTransferRequest: S.Schema<DomainCancelTransferRequest>;
940
+ export interface DomainCancelTransferResponse {
941
+ status?: string;
942
+ domain?: string;
943
+ cancelled?: boolean;
944
+ previousStatus?: string;
945
+ transferStatus?: string;
946
+ withdrawnAtRegistry?: boolean;
947
+ registryResultCode?: string;
948
+ registryCode?: string;
949
+ refunded?: boolean;
950
+ refundAmount?: number;
951
+ orderId?: number;
952
+ message?: string;
953
+ }
954
+ export declare const DomainCancelTransferResponse: S.Schema<DomainCancelTransferResponse>;
513
955
  export interface DomainCheckDomainRequest {
514
956
  domain: string;
515
957
  }
@@ -690,6 +1132,26 @@ export interface DomainGetRegistrationRequirementsResponse {
690
1132
  notApiRegisterableReason?: string;
691
1133
  }
692
1134
  export declare const DomainGetRegistrationRequirementsResponse: S.Schema<DomainGetRegistrationRequirementsResponse>;
1135
+ export interface DomainGetTransferSetupRequest {
1136
+ /** Domain name. */
1137
+ domain: string;
1138
+ }
1139
+ export declare const DomainGetTransferSetupRequest: S.Schema<DomainGetTransferSetupRequest>;
1140
+ export type DomainGetTransferSetupResponsePorkbunNameserversList = Array<string>;
1141
+ export declare const DomainGetTransferSetupResponsePorkbunNameserversList: S.Schema<DomainGetTransferSetupResponsePorkbunNameserversList>;
1142
+ export interface DomainGetTransferSetupResponse {
1143
+ status?: string;
1144
+ domain?: string;
1145
+ transfer?: unknown;
1146
+ held?: number;
1147
+ zoneReady?: number;
1148
+ recordCount?: number;
1149
+ delegation?: unknown;
1150
+ dnssec?: number;
1151
+ nextStep?: unknown;
1152
+ porkbunNameservers?: DomainGetTransferSetupResponsePorkbunNameserversList;
1153
+ }
1154
+ export declare const DomainGetTransferSetupResponse: S.Schema<DomainGetTransferSetupResponse>;
693
1155
  export interface DomainGetUrlForwardingRequest {
694
1156
  domain: string;
695
1157
  }
@@ -725,6 +1187,19 @@ export interface GetUrlForwardingResponse {
725
1187
  forwards: GetUrlForwardingResponseForwardsList;
726
1188
  }
727
1189
  export declare const GetUrlForwardingResponse: S.Schema<GetUrlForwardingResponse>;
1190
+ export interface DomainStartTransferRequest {
1191
+ /** Domain name. */
1192
+ domain: string;
1193
+ /** Release even though the zone is empty. Use only when the domain needs no DNS here. */
1194
+ force?: boolean;
1195
+ }
1196
+ export declare const DomainStartTransferRequest: S.Schema<DomainStartTransferRequest>;
1197
+ export interface DomainStartTransferResponse {
1198
+ status?: string;
1199
+ domain?: string;
1200
+ message?: string;
1201
+ }
1202
+ export declare const DomainStartTransferResponse: S.Schema<DomainStartTransferResponse>;
728
1203
  /** Auto-renew status to set */
729
1204
  export type DomainUpdateAutoRenewRequestStatus = "on" | "off";
730
1205
  export declare const DomainUpdateAutoRenewRequestStatus: any;
@@ -799,6 +1274,22 @@ export interface DomainUpdateNsRequest {
799
1274
  ns: DomainUpdateNsRequestNsList;
800
1275
  }
801
1276
  export declare const DomainUpdateNsRequest: S.Schema<DomainUpdateNsRequest>;
1277
+ export interface DomainUpdateTransferAuthCodeRequest {
1278
+ /** Domain name. */
1279
+ domain: string;
1280
+ /** The replacement authorization code, exactly as the losing registrar issued it. Never interpolate this into a shell command. */
1281
+ authCode: string;
1282
+ }
1283
+ export declare const DomainUpdateTransferAuthCodeRequest: S.Schema<DomainUpdateTransferAuthCodeRequest>;
1284
+ export interface DomainUpdateTransferAuthCodeResponse {
1285
+ status?: string;
1286
+ domain?: string;
1287
+ authCodeValid?: boolean;
1288
+ previousStatus?: string;
1289
+ transferStatus?: string;
1290
+ message?: string;
1291
+ }
1292
+ export declare const DomainUpdateTransferAuthCodeResponse: S.Schema<DomainUpdateTransferAuthCodeResponse>;
802
1293
  /** DNS record type */
803
1294
  export type EditDnsRequestType = "A" | "AAAA" | "MX" | "CNAME" | "ALIAS" | "TXT" | "NS" | "SRV" | "TLSA" | "CAA" | "SSHFP" | "HTTPS" | "SVCB";
804
1295
  export declare const EditDnsRequestType: any;
@@ -809,9 +1300,9 @@ export interface EditDnsRequest {
809
1300
  /** Subdomain for the record. Do not include the domain name itself. */
810
1301
  name?: string;
811
1302
  /** DNS record type */
812
- type: EditDnsRequestType | (string & {});
1303
+ type?: EditDnsRequestType | (string & {});
813
1304
  /** The record value */
814
- content: string;
1305
+ content?: string;
815
1306
  /** Time to live in seconds (optional) */
816
1307
  ttl?: number;
817
1308
  /** Priority for MX/SRV records (optional) */
@@ -869,7 +1360,7 @@ export declare const GetApiSettingsRequest: S.Schema<GetApiSettingsRequest>;
869
1360
  export type ApiSettingsResponseStatus = "SUCCESS" | "ERROR";
870
1361
  export declare const ApiSettingsResponseStatus: any;
871
1362
  export interface ApiSettingsResponseSettings {
872
- /** Maximum API spend per calendar month in cents. `null` means no limit. */
1363
+ /** The monthly spend limit the account holder set, in cents. `null` means none is set; `spendLimit` shows what is actually enforced. */
873
1364
  monthlySpendLimit?: number | null;
874
1365
  /** Send an alert email when balance drops below this amount (cents). `null` = disabled. */
875
1366
  lowBalanceAlert?: number | null;
@@ -881,13 +1372,72 @@ export interface ApiSettingsResponseSettings {
881
1372
  topupAmount?: number | null;
882
1373
  }
883
1374
  export declare const ApiSettingsResponseSettings: S.Schema<ApiSettingsResponseSettings>;
1375
+ /** `account`: the account holder's own limit. `default`: none set, so the $100 default applies. `none`: none set and the account bought over the API before the default existed (2026-10-03), so purchases are not capped. */
1376
+ export type ApiSettingsResponseSpendLimitSource = "account" | "default" | "none";
1377
+ export declare const ApiSettingsResponseSpendLimitSource: any;
1378
+ /** The monthly cap on API purchases actually enforced (registrations, renewals, transfers, closeouts, paid hosting). */
1379
+ export interface ApiSettingsResponseSpendLimit {
1380
+ /** Cents. `null` means no cap. */
1381
+ limit?: number | null;
1382
+ /** `account`: the account holder's own limit. `default`: none set, so the $100 default applies. `none`: none set and the account bought over the API before the default existed (2026-10-03), so purchases are not capped. */
1383
+ source?: ApiSettingsResponseSpendLimitSource;
1384
+ /** API spending this calendar month, in cents. */
1385
+ spent?: number;
1386
+ /** Cents left this month, or `null` with no cap. */
1387
+ remaining?: number | null;
1388
+ }
1389
+ export declare const ApiSettingsResponseSpendLimit: S.Schema<ApiSettingsResponseSpendLimit>;
1390
+ export type ApiSettingsResponseTopupLimitSource = "account" | "default";
1391
+ export declare const ApiSettingsResponseTopupLimitSource: any;
1392
+ /** The monthly cap on credit added over the API: card top-ups, auto top-ups set off by an API purchase, MPP and USDC together. */
1393
+ export interface ApiSettingsResponseTopupLimit {
1394
+ /** Cents: the monthly spend limit, or $100 when none is set. */
1395
+ limit?: number;
1396
+ source?: ApiSettingsResponseTopupLimitSource;
1397
+ /** Credit added over the API this calendar month, in cents. */
1398
+ added?: number | null;
1399
+ }
1400
+ export declare const ApiSettingsResponseTopupLimit: S.Schema<ApiSettingsResponseTopupLimit>;
884
1401
  export interface ApiSettingsResponse {
885
1402
  status?: ApiSettingsResponseStatus;
886
1403
  settings?: ApiSettingsResponseSettings;
887
1404
  /** Total API spend in the current calendar month, in cents. */
888
1405
  monthlySpend?: number;
1406
+ /** The monthly cap on API purchases actually enforced (registrations, renewals, transfers, closeouts, paid hosting). */
1407
+ spendLimit?: ApiSettingsResponseSpendLimit;
1408
+ /** The monthly cap on credit added over the API: card top-ups, auto top-ups set off by an API purchase, MPP and USDC together. */
1409
+ topupLimit?: ApiSettingsResponseTopupLimit;
889
1410
  }
890
1411
  export declare const ApiSettingsResponse: S.Schema<ApiSettingsResponse>;
1412
+ export interface GetAutoTopupRequest {
1413
+ }
1414
+ export declare const GetAutoTopupRequest: S.Schema<GetAutoTopupRequest>;
1415
+ /** Advisory. Present when the settings cannot do anything as they stand, e.g. no payment method is saved. */
1416
+ export type AutoTopupResponseWarningsList = Array<string>;
1417
+ export declare const AutoTopupResponseWarningsList: S.Schema<AutoTopupResponseWarningsList>;
1418
+ export interface AutoTopupResponse {
1419
+ status?: string;
1420
+ enabled?: boolean;
1421
+ /** Balance in cents below which a top-up fires; null when auto top-up is off. */
1422
+ threshold?: number | null;
1423
+ /** Configured amount to add, in cents; null when never set. */
1424
+ amount?: number | null;
1425
+ /** What POST /account/topup would charge right now: the configured amount, or the $50 default. */
1426
+ effectiveAmount?: number;
1427
+ /** The platform default used when the account has configured nothing. */
1428
+ defaultAmount?: number;
1429
+ /** False means nothing can be charged and auto top-up cannot fire, whatever the settings say. */
1430
+ paymentMethodOnFile?: boolean;
1431
+ /** Current account credit, in cents. */
1432
+ balance?: number;
1433
+ chargesToday?: number;
1434
+ chargesThisMonth?: number;
1435
+ maxChargesPerDay?: number;
1436
+ maxChargesPerMonth?: number;
1437
+ /** Advisory. Present when the settings cannot do anything as they stand, e.g. no payment method is saved. */
1438
+ warnings?: AutoTopupResponseWarningsList;
1439
+ }
1440
+ export declare const AutoTopupResponse: S.Schema<AutoTopupResponse>;
891
1441
  export interface GetBalanceRequest {
892
1442
  }
893
1443
  export declare const GetBalanceRequest: S.Schema<GetBalanceRequest>;
@@ -901,6 +1451,54 @@ export interface BalanceResponse {
901
1451
  display?: string;
902
1452
  }
903
1453
  export declare const BalanceResponse: S.Schema<BalanceResponse>;
1454
+ export interface GetCloseoutRequest {
1455
+ domain: string;
1456
+ }
1457
+ export declare const GetCloseoutRequest: S.Schema<GetCloseoutRequest>;
1458
+ export interface CloseoutItem {
1459
+ /** Provider id for this listing. */
1460
+ closeoutId?: number;
1461
+ domain?: string;
1462
+ tld?: string;
1463
+ /** Current closeout price, integer US cents. Descends on a schedule. */
1464
+ price?: number;
1465
+ /** The provider's own renewal figure. Indicative only — the amount actually charged is `renewalPrice` from /closeout/get/{domain}, which uses Porkbun pricing. */
1466
+ providerRenewalPrice?: number | null;
1467
+ /** Porkbun's renewal or transfer price for the year included. Only returned by /closeout/get/{domain}. */
1468
+ renewalPrice?: number | null;
1469
+ /** price + renewalPrice. What /closeout/buy charges. Only returned by /closeout/get/{domain}. */
1470
+ totalPrice?: number | null;
1471
+ /** True when the name is already at Porkbun (renewed rather than transferred in). Only returned by /closeout/get/{domain}. */
1472
+ localDomain?: boolean | null;
1473
+ /** Domain age in years. */
1474
+ age?: number | null;
1475
+ /** Original registration date, ISO 8601 UTC. */
1476
+ registrationDate?: string | null;
1477
+ /** When the listing ends, ISO 8601 UTC. */
1478
+ endTime?: string | null;
1479
+ nameLength?: number | null;
1480
+ isIdn?: boolean;
1481
+ /** Third-party appraisal in US cents. Provider-supplied; treat as a weak signal. */
1482
+ estibotAppraisal?: number | null;
1483
+ monthlyVisitors?: number | null;
1484
+ inboundLinks?: number | null;
1485
+ expiredRevenue?: number | null;
1486
+ /** How many other TLDs the same SLD is registered in. */
1487
+ otherTldCount?: number | null;
1488
+ }
1489
+ export declare const CloseoutItem: S.Schema<CloseoutItem>;
1490
+ export interface GetCloseoutResponse {
1491
+ status?: string;
1492
+ available?: boolean;
1493
+ closeout?: CloseoutItem;
1494
+ }
1495
+ export declare const GetCloseoutResponse: S.Schema<GetCloseoutResponse>;
1496
+ export interface GetCloudflareRequest {
1497
+ domain: string;
1498
+ }
1499
+ export declare const GetCloudflareRequest: S.Schema<GetCloudflareRequest>;
1500
+ export type GetCloudflareResponse = unknown;
1501
+ export declare const GetCloudflareResponse: S.Schema<GetCloudflareResponse>;
904
1502
  export interface GetDnsRequest {
905
1503
  domain: string;
906
1504
  }
@@ -1095,6 +1693,84 @@ export interface GetHostingResponse {
1095
1693
  hosting?: GetHostingResponseHosting | null;
1096
1694
  }
1097
1695
  export declare const GetHostingResponse: S.Schema<GetHostingResponse>;
1696
+ export interface GetInvoiceRequest {
1697
+ /** Invoice (order) ID, from `GET /account/invoices`. */
1698
+ orderId: number;
1699
+ }
1700
+ export declare const GetInvoiceRequest: S.Schema<GetInvoiceRequest>;
1701
+ export type GetInvoiceResponseInvoiceState = "PAID" | "PARTIALLY_REFUNDED" | "REFUNDED" | "UNPAID";
1702
+ export declare const GetInvoiceResponseInvoiceState: any;
1703
+ export interface GetInvoiceResponseInvoiceBillTo {
1704
+ company?: string | null;
1705
+ name?: string | null;
1706
+ address?: string | null;
1707
+ vat?: string | null;
1708
+ }
1709
+ export declare const GetInvoiceResponseInvoiceBillTo: S.Schema<GetInvoiceResponseInvoiceBillTo>;
1710
+ export type GetInvoiceResponseInvoicePaymentMethodsList = Array<string>;
1711
+ export declare const GetInvoiceResponseInvoicePaymentMethodsList: S.Schema<GetInvoiceResponseInvoicePaymentMethodsList>;
1712
+ export type GetInvoiceResponseInvoiceItemsItemStatus = "SUCCESS" | "NOT_PROCESSED" | "REFUNDED" | "REFUND" | "COUPON";
1713
+ export declare const GetInvoiceResponseInvoiceItemsItemStatus: any;
1714
+ export type GetInvoiceResponseInvoiceItemsItemTagsList = Array<string>;
1715
+ export declare const GetInvoiceResponseInvoiceItemsItemTagsList: S.Schema<GetInvoiceResponseInvoiceItemsItemTagsList>;
1716
+ export interface GetInvoiceResponseInvoiceItemsItem {
1717
+ domain?: string;
1718
+ product?: string;
1719
+ type?: string;
1720
+ years?: number | null;
1721
+ /** Resulting domain expiry, on lines that buy a domain term. */
1722
+ expires?: string | null;
1723
+ status?: GetInvoiceResponseInvoiceItemsItemStatus;
1724
+ price_cents?: number;
1725
+ /** Discount on this line; on a REFUND line, the amount refunded. */
1726
+ discount_cents?: number;
1727
+ tags?: GetInvoiceResponseInvoiceItemsItemTagsList;
1728
+ }
1729
+ export declare const GetInvoiceResponseInvoiceItemsItem: S.Schema<GetInvoiceResponseInvoiceItemsItem>;
1730
+ export type GetInvoiceResponseInvoiceItemsList = Array<GetInvoiceResponseInvoiceItemsItem>;
1731
+ export declare const GetInvoiceResponseInvoiceItemsList: S.Schema<GetInvoiceResponseInvoiceItemsList>;
1732
+ export interface GetInvoiceResponseInvoice {
1733
+ id?: number;
1734
+ date?: string;
1735
+ state?: GetInvoiceResponseInvoiceState;
1736
+ billTo?: GetInvoiceResponseInvoiceBillTo;
1737
+ paymentMethods?: GetInvoiceResponseInvoicePaymentMethodsList;
1738
+ items?: GetInvoiceResponseInvoiceItemsList;
1739
+ gross_cents?: number;
1740
+ refunded_cents?: number;
1741
+ total_cents?: number;
1742
+ total?: string;
1743
+ currency?: string;
1744
+ url?: string | null;
1745
+ pdfUrl?: string | null;
1746
+ /** Downloads the PDF without signing in, for 15 minutes (null on a sandbox key). The link to hand a user. */
1747
+ downloadUrl?: string | null;
1748
+ /** When downloadUrl stops working (ISO 8601). */
1749
+ downloadExpires?: string | null;
1750
+ }
1751
+ export declare const GetInvoiceResponseInvoice: S.Schema<GetInvoiceResponseInvoice>;
1752
+ export interface GetInvoiceResponse {
1753
+ status?: string;
1754
+ invoice?: GetInvoiceResponseInvoice;
1755
+ }
1756
+ export declare const GetInvoiceResponse: S.Schema<GetInvoiceResponse>;
1757
+ export interface GetInvoicePdfRequest {
1758
+ /** Invoice (order) ID, from `GET /account/invoices`. */
1759
+ orderId: number;
1760
+ }
1761
+ export declare const GetInvoicePdfRequest: S.Schema<GetInvoicePdfRequest>;
1762
+ export interface GetInvoicePdfResponse {
1763
+ status?: string;
1764
+ filename?: string;
1765
+ contentType?: string;
1766
+ sizeBytes?: number;
1767
+ contentBase64?: string;
1768
+ /** Downloads the PDF without signing in, for 15 minutes (null on a sandbox key). The link to hand a user. */
1769
+ downloadUrl?: string | null;
1770
+ /** When downloadUrl stops working (ISO 8601). */
1771
+ downloadExpires?: string | null;
1772
+ }
1773
+ export declare const GetInvoicePdfResponse: S.Schema<GetInvoicePdfResponse>;
1098
1774
  export interface GetIpRequest {
1099
1775
  }
1100
1776
  export declare const GetIpRequest: S.Schema<GetIpRequest>;
@@ -1119,14 +1795,21 @@ export interface GetPingResponse {
1119
1795
  credentialsValid?: boolean;
1120
1796
  }
1121
1797
  export declare const GetPingResponse: S.Schema<GetPingResponse>;
1122
- /** Optional array of TLDs to filter results. If omitted, all supported TLDs are returned. */
1123
- export type GetPricingRequestTldsList = Array<string>;
1124
- export declare const GetPricingRequestTldsList: S.Schema<GetPricingRequestTldsList>;
1798
+ export type GetPricingRequestTldsCase0List = Array<string>;
1799
+ export declare const GetPricingRequestTldsCase0List: S.Schema<GetPricingRequestTldsCase0List>;
1800
+ /** Optional TLDs to price: an array, or a comma-separated string. If neither `tld` nor `tlds` is given (or both are empty), all supported TLDs are returned. */
1801
+ export type GetPricingRequestTlds = GetPricingRequestTldsCase0List | string;
1802
+ export declare const GetPricingRequestTlds: S.Schema<GetPricingRequestTlds>;
1125
1803
  export interface GetPricingRequest {
1126
- /** Optional array of TLDs to filter results. If omitted, all supported TLDs are returned. */
1127
- tlds?: GetPricingRequestTldsList;
1804
+ /** Optional single TLD to price, e.g. `io`. Combines with `tlds`. */
1805
+ tld?: string;
1806
+ /** Optional TLDs to price: an array, or a comma-separated string. If neither `tld` nor `tlds` is given (or both are empty), all supported TLDs are returned. */
1807
+ tlds?: GetPricingRequestTlds;
1128
1808
  }
1129
1809
  export declare const GetPricingRequest: S.Schema<GetPricingRequest>;
1810
+ /** Present only when a filter named TLDs Porkbun does not sell: those names, as sent. They are not in `pricing`. */
1811
+ export type GetPricingResponseUnsupportedList = Array<string>;
1812
+ export declare const GetPricingResponseUnsupportedList: S.Schema<GetPricingResponseUnsupportedList>;
1130
1813
  export type GetPricingResponsePricingValueCouponsValueFirstYearOnly = "yes" | "no";
1131
1814
  export declare const GetPricingResponsePricingValueCouponsValueFirstYearOnly: any;
1132
1815
  export interface GetPricingResponsePricingValueCouponsValue {
@@ -1159,13 +1842,22 @@ export type GetPricingResponsePricingMap = {
1159
1842
  export declare const GetPricingResponsePricingMap: S.Schema<GetPricingResponsePricingMap>;
1160
1843
  export interface GetPricingResponse {
1161
1844
  status?: string;
1845
+ /** Present only when a filter named TLDs Porkbun does not sell: those names, as sent. They are not in `pricing`. */
1846
+ unsupported?: GetPricingResponseUnsupportedList;
1162
1847
  /** Object keyed by TLD string */
1163
1848
  pricing?: GetPricingResponsePricingMap;
1164
1849
  }
1165
1850
  export declare const GetPricingResponse: S.Schema<GetPricingResponse>;
1166
1851
  export interface GetPricingGetRequest {
1852
+ /** One TLD to price, e.g. `io`. */
1853
+ tld?: string;
1854
+ /** Comma-separated TLDs to price, e.g. `com,io,dev`. Omit (with `tld`) for every TLD. */
1855
+ tlds?: string;
1167
1856
  }
1168
1857
  export declare const GetPricingGetRequest: S.Schema<GetPricingGetRequest>;
1858
+ /** Present only when a filter named TLDs Porkbun does not sell: those names, as sent. They are not in `pricing`. */
1859
+ export type GetPricingGetResponseUnsupportedList = Array<string>;
1860
+ export declare const GetPricingGetResponseUnsupportedList: S.Schema<GetPricingGetResponseUnsupportedList>;
1169
1861
  export type GetPricingGetResponsePricingValueCouponsValueFirstYearOnly = "yes" | "no";
1170
1862
  export declare const GetPricingGetResponsePricingValueCouponsValueFirstYearOnly: any;
1171
1863
  export interface GetPricingGetResponsePricingValueCouponsValue {
@@ -1198,6 +1890,8 @@ export type GetPricingGetResponsePricingMap = {
1198
1890
  export declare const GetPricingGetResponsePricingMap: S.Schema<GetPricingGetResponsePricingMap>;
1199
1891
  export interface GetPricingGetResponse {
1200
1892
  status?: string;
1893
+ /** Present only when a filter named TLDs Porkbun does not sell: those names, as sent. They are not in `pricing`. */
1894
+ unsupported?: GetPricingGetResponseUnsupportedList;
1201
1895
  /** Object keyed by TLD string */
1202
1896
  pricing?: GetPricingGetResponsePricingMap;
1203
1897
  }
@@ -1290,6 +1984,8 @@ export declare const HostingCreateWpCredentialsResponse: S.Schema<HostingCreateW
1290
1984
  export interface HostingDeleteFileRequest {
1291
1985
  domain: string;
1292
1986
  path: string;
1987
+ /** Delete a directory together with everything in it (up to 2,000 items per call; call again to continue). Without it, a non-empty directory returns HOSTING_DIR_NOT_EMPTY. */
1988
+ recursive?: boolean;
1293
1989
  }
1294
1990
  export declare const HostingDeleteFileRequest: S.Schema<HostingDeleteFileRequest>;
1295
1991
  export interface HostingDeleteFileResponse {
@@ -1371,6 +2067,28 @@ export interface HostingPlansResponse {
1371
2067
  plans?: HostingPlansResponsePlansList;
1372
2068
  }
1373
2069
  export declare const HostingPlansResponse: S.Schema<HostingPlansResponse>;
2070
+ /** Records to create. Omit to import what a scan discovers. NS and SOA entries are ignored — they describe the delegation, not the zone contents. */
2071
+ export type ImportDnsRequestRecordsList = Array<DnsRecordInput>;
2072
+ export declare const ImportDnsRequestRecordsList: S.Schema<ImportDnsRequestRecordsList>;
2073
+ export interface ImportDnsRequest {
2074
+ domain: string;
2075
+ /** Records to create. Omit to import what a scan discovers. NS and SOA entries are ignored — they describe the delegation, not the zone contents. */
2076
+ records?: ImportDnsRequestRecordsList;
2077
+ }
2078
+ export declare const ImportDnsRequest: S.Schema<ImportDnsRequest>;
2079
+ export type ImportDnsResponseFailuresList = Array<unknown>;
2080
+ export declare const ImportDnsResponseFailuresList: S.Schema<ImportDnsResponseFailuresList>;
2081
+ export interface ImportDnsResponse {
2082
+ status?: string;
2083
+ domain?: string;
2084
+ created?: number;
2085
+ /** Already present, so nothing needed doing. */
2086
+ skipped?: number;
2087
+ failed?: number;
2088
+ failures?: ImportDnsResponseFailuresList;
2089
+ warnings?: DnsWriteWarnings;
2090
+ }
2091
+ export declare const ImportDnsResponse: S.Schema<ImportDnsResponse>;
1374
2092
  /** Return label metadata for each domain. Defaults to no. */
1375
2093
  export type ListDomainsRequestIncludeLabels = "yes" | "no";
1376
2094
  export declare const ListDomainsRequestIncludeLabels: any;
@@ -1412,6 +2130,48 @@ export interface ListDomainsRequest {
1412
2130
  sortDirection?: ListDomainsRequestSortDirection | (string & {});
1413
2131
  }
1414
2132
  export declare const ListDomainsRequest: S.Schema<ListDomainsRequest>;
2133
+ export interface ListInvoicesRequest {
2134
+ /** Only invoices from this year, e.g. 2026. */
2135
+ year?: number;
2136
+ /** Offset for paging. */
2137
+ start?: number;
2138
+ limit?: number;
2139
+ }
2140
+ export declare const ListInvoicesRequest: S.Schema<ListInvoicesRequest>;
2141
+ export type ListInvoicesResponseInvoicesItemState = "PAID" | "PARTIALLY_REFUNDED" | "REFUNDED" | "UNPAID";
2142
+ export declare const ListInvoicesResponseInvoicesItemState: any;
2143
+ /** Up to 10 domains on the invoice. */
2144
+ export type ListInvoicesResponseInvoicesItemDomainsList = Array<string>;
2145
+ export declare const ListInvoicesResponseInvoicesItemDomainsList: S.Schema<ListInvoicesResponseInvoicesItemDomainsList>;
2146
+ export interface ListInvoicesResponseInvoicesItem {
2147
+ id?: number;
2148
+ date?: string;
2149
+ state?: ListInvoicesResponseInvoicesItemState;
2150
+ total_cents?: number;
2151
+ total?: string;
2152
+ itemCount?: number;
2153
+ /** Up to 10 domains on the invoice. */
2154
+ domains?: ListInvoicesResponseInvoicesItemDomainsList;
2155
+ /** The invoice page on porkbun.com (null on a sandbox key). */
2156
+ url?: string | null;
2157
+ }
2158
+ export declare const ListInvoicesResponseInvoicesItem: S.Schema<ListInvoicesResponseInvoicesItem>;
2159
+ export type ListInvoicesResponseInvoicesList = Array<ListInvoicesResponseInvoicesItem>;
2160
+ export declare const ListInvoicesResponseInvoicesList: S.Schema<ListInvoicesResponseInvoicesList>;
2161
+ /** Years that have invoices. */
2162
+ export type ListInvoicesResponseYearsList = Array<number>;
2163
+ export declare const ListInvoicesResponseYearsList: S.Schema<ListInvoicesResponseYearsList>;
2164
+ export interface ListInvoicesResponse {
2165
+ status?: string;
2166
+ invoices?: ListInvoicesResponseInvoicesList;
2167
+ /** How many invoices match (for paging). */
2168
+ total?: number;
2169
+ start?: number;
2170
+ limit?: number;
2171
+ /** Years that have invoices. */
2172
+ years?: ListInvoicesResponseYearsList;
2173
+ }
2174
+ export declare const ListInvoicesResponse: S.Schema<ListInvoicesResponse>;
1415
2175
  /** Filter to listings under these TLDs (without the leading dot). */
1416
2176
  export type ListMarketplaceListingsRequestTldsList = Array<string>;
1417
2177
  export declare const ListMarketplaceListingsRequestTldsList: S.Schema<ListMarketplaceListingsRequestTldsList>;
@@ -1582,10 +2342,23 @@ export declare const PingResponse: S.Schema<PingResponse>;
1582
2342
  export interface PostIpRequest {
1583
2343
  }
1584
2344
  export declare const PostIpRequest: S.Schema<PostIpRequest>;
2345
+ export interface PreviewCloudflareRequest {
2346
+ domain: string;
2347
+ }
2348
+ export declare const PreviewCloudflareRequest: S.Schema<PreviewCloudflareRequest>;
2349
+ export type PreviewCloudflareResponse = unknown;
2350
+ export declare const PreviewCloudflareResponse: S.Schema<PreviewCloudflareResponse>;
2351
+ /** 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 */
2352
+ export type RenewDomainRequestPayWith = "usdc";
2353
+ export declare const RenewDomainRequestPayWith: any;
1585
2354
  export interface RenewDomainRequest {
1586
2355
  domain: string;
1587
2356
  /** The renewal cost in pennies (USD cents). Must exactly equal the total price for the domain at its minimum renewal duration. Obtain this from /domain/checkDomain first. */
1588
2357
  cost: number;
2358
+ /** 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 */
2359
+ payWith?: RenewDomainRequestPayWith | (string & {});
2360
+ /** 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. */
2361
+ usdcCheckoutId?: string;
1589
2362
  /** Optional. When true, runs all pre-flight validation and returns a preview with `dryRun: true` and `wouldSucceed` WITHOUT renewing or charging. Nothing changes and the rate-limit budget is not consumed. */
1590
2363
  dryRun?: boolean;
1591
2364
  }
@@ -1677,6 +2450,47 @@ export interface ResetSandboxResponse {
1677
2450
  sandbox?: boolean;
1678
2451
  }
1679
2452
  export declare const ResetSandboxResponse: S.Schema<ResetSandboxResponse>;
2453
+ export interface RestoreDnsRequest {
2454
+ domain: string;
2455
+ /** The restore point to go back to, from GET /dns/history/{domain}. */
2456
+ snapshotId: number;
2457
+ /** Also delete live records that are not in the restore point. Default false, which only adds back what is missing. */
2458
+ prune?: boolean;
2459
+ /** Report what would change without changing anything. */
2460
+ dryRun?: boolean;
2461
+ }
2462
+ export declare const RestoreDnsRequest: S.Schema<RestoreDnsRequest>;
2463
+ export interface DnsRestoreResponseFailedItem {
2464
+ name?: string;
2465
+ type?: string;
2466
+ reason?: string;
2467
+ }
2468
+ export declare const DnsRestoreResponseFailedItem: S.Schema<DnsRestoreResponseFailedItem>;
2469
+ /** Records that could not be recreated, with the reason. Parking and other masked types are managed elsewhere and cannot be restored this way. */
2470
+ export type DnsRestoreResponseFailedList = Array<DnsRestoreResponseFailedItem>;
2471
+ export declare const DnsRestoreResponseFailedList: S.Schema<DnsRestoreResponseFailedList>;
2472
+ export interface DnsRestoreResponse {
2473
+ warnings?: DnsWriteWarnings;
2474
+ status?: string;
2475
+ domain?: string;
2476
+ /** The restore point used. */
2477
+ restoredFrom?: number;
2478
+ /** A new restore point holding the state from immediately BEFORE this restore. Restore that to undo this. */
2479
+ previousStateSavedAs?: number | null;
2480
+ /** Records added back. A true count -- anything that could not be recreated is in `failed` instead. */
2481
+ restored?: number;
2482
+ /** Records deleted, which is always 0 unless prune was true. */
2483
+ removed?: number;
2484
+ /** Records that could not be recreated, with the reason. Parking and other masked types are managed elsewhere and cannot be restored this way. */
2485
+ failed?: DnsRestoreResponseFailedList;
2486
+ }
2487
+ export declare const DnsRestoreResponse: S.Schema<DnsRestoreResponse>;
2488
+ export interface RetryCloudflareRequest {
2489
+ domain: string;
2490
+ }
2491
+ export declare const RetryCloudflareRequest: S.Schema<RetryCloudflareRequest>;
2492
+ export type RetryCloudflareResponse = unknown;
2493
+ export declare const RetryCloudflareResponse: S.Schema<RetryCloudflareResponse>;
1680
2494
  export interface SandboxTopupRequest {
1681
2495
  /** Fake credit to add in US cents (default 100000; max 1000000). */
1682
2496
  amount?: number;
@@ -1709,6 +2523,54 @@ export interface SandboxTriggerWebhookResponse {
1709
2523
  sandbox?: boolean;
1710
2524
  }
1711
2525
  export declare const SandboxTriggerWebhookResponse: S.Schema<SandboxTriggerWebhookResponse>;
2526
+ export interface SearchCloseoutRequest {
2527
+ /** Keyword match on the domain name. */
2528
+ query?: string;
2529
+ /** Single TLD, with or without the leading dot. Omit to search all. */
2530
+ tld?: string;
2531
+ /** Exact SLD character count. */
2532
+ nameLength?: number;
2533
+ /** Minimum domain age in years. Pair with sortName=registrationDate to find aged names. */
2534
+ ageMin?: number;
2535
+ /** Maximum domain age in years. */
2536
+ ageMax?: number;
2537
+ /** Minimum closeout price, integer US cents. Converted to whole dollars for the provider, rounding outward so the range never excludes an item inside it. */
2538
+ priceMin?: number;
2539
+ /** Maximum closeout price, integer US cents. */
2540
+ priceMax?: number;
2541
+ /** One of: domain, endTime, price, revenue, visitors, inboundLinks, registrationDate. Ascending on registrationDate means oldest registration first, which is how you find aged names. Ascending on revenue, visitors or inboundLinks puts the domains with no recorded figure first (they return null) — use desc on those to see the highest values; the response carries a `warnings` entry reminding you. */
2542
+ sortName?: string;
2543
+ /** `asc` or `desc`. */
2544
+ sortDirection?: string;
2545
+ /** Offset for paging. Default 0. */
2546
+ start?: number;
2547
+ /** Rows per page, 1-500. Default 100. */
2548
+ limit?: number;
2549
+ }
2550
+ export declare const SearchCloseoutRequest: S.Schema<SearchCloseoutRequest>;
2551
+ export type SearchCloseoutResponseCloseoutsList = Array<CloseoutItem>;
2552
+ export declare const SearchCloseoutResponseCloseoutsList: S.Schema<SearchCloseoutResponseCloseoutsList>;
2553
+ export interface SearchCloseoutResponse {
2554
+ status?: string;
2555
+ count?: number;
2556
+ /** Size of the filtered set, for paging. */
2557
+ totalAvailable?: number;
2558
+ start?: number;
2559
+ limit?: number;
2560
+ closeouts?: SearchCloseoutResponseCloseoutsList;
2561
+ }
2562
+ export declare const SearchCloseoutResponse: S.Schema<SearchCloseoutResponse>;
2563
+ export interface SetAutoTopupRequest {
2564
+ /** Turn auto top-up on or off. Omit to change only the amount. */
2565
+ enabled: boolean;
2566
+ /** Balance in integer US cents below which a top-up fires. Required when enabling, and meaningless without it. */
2567
+ threshold?: number;
2568
+ /** What a top-up adds, in integer US cents. Can be sent on its own; required when enabling if none is on file. Over the API: 500-50000. */
2569
+ amount?: number;
2570
+ /** Validate only; change nothing. */
2571
+ dryRun?: boolean;
2572
+ }
2573
+ export declare const SetAutoTopupRequest: S.Schema<SetAutoTopupRequest>;
1712
2574
  export interface TestWebhookRequest {
1713
2575
  /** Endpoint id. */
1714
2576
  id: number;
@@ -1721,6 +2583,95 @@ export interface WebhookTestResponse {
1721
2583
  message?: string;
1722
2584
  }
1723
2585
  export declare const WebhookTestResponse: S.Schema<WebhookTestResponse>;
2586
+ export interface TopupAccountCreditRequest {
2587
+ /** Optional one-off amount in integer US cents (500-50000). Omit to charge the amount the account has configured, which is the common case. A supplied amount does NOT change the stored setting — use it instead of rewriting the customer's configuration for a single charge. */
2588
+ amount?: number;
2589
+ /** Preview the charge without making it. */
2590
+ dryRun?: boolean;
2591
+ }
2592
+ export declare const TopupAccountCreditRequest: S.Schema<TopupAccountCreditRequest>;
2593
+ export interface TopupAccountCreditResponse {
2594
+ status?: string;
2595
+ /** Amount charged, in cents. */
2596
+ charged?: number;
2597
+ chargedDisplay?: string;
2598
+ /** Account credit balance after the top-up, in cents. */
2599
+ balance?: number;
2600
+ balanceDisplay?: string;
2601
+ /** The captured order recorded for the purchase, 0 if order creation failed (the credit is granted either way). */
2602
+ orderId?: number;
2603
+ /** True when the account had no configured amount and the $50 default was charged. */
2604
+ usedDefaultAmount?: boolean;
2605
+ chargesToday?: number;
2606
+ chargesThisMonth?: number;
2607
+ /** Sandbox only: credit was granted without charging a card. */
2608
+ simulated?: boolean;
2609
+ message?: string;
2610
+ }
2611
+ export declare const TopupAccountCreditResponse: S.Schema<TopupAccountCreditResponse>;
2612
+ export interface TopupCryptoRequest {
2613
+ /** Checkout amount in integer US cents, $1.00 to $500.00 (100 = $1.00). Credit is this less Coinbase's fee of about 1%. */
2614
+ amount: number;
2615
+ /** Check eligibility only; creates no checkout. */
2616
+ dryRun?: boolean;
2617
+ }
2618
+ export declare const TopupCryptoRequest: S.Schema<TopupCryptoRequest>;
2619
+ export interface TopupCryptoResponse {
2620
+ status?: string;
2621
+ checkoutId?: string;
2622
+ amount_cents?: number;
2623
+ /** Coinbase's fee, about 1%, estimated high. */
2624
+ estimatedFee_cents?: number;
2625
+ /** Credit the account gets once it is paid. */
2626
+ estimatedCredit_cents?: number;
2627
+ currency?: string;
2628
+ network?: string;
2629
+ /** Coinbase-hosted page for a person to pay. */
2630
+ payUrl?: string;
2631
+ /** x402 payment URL an agent's wallet pays directly. */
2632
+ x402Url?: string | null;
2633
+ expiresAt?: string | null;
2634
+ message?: string;
2635
+ }
2636
+ export declare const TopupCryptoResponse: S.Schema<TopupCryptoResponse>;
2637
+ export interface TopupCryptoStatusRequest {
2638
+ checkoutId: string;
2639
+ }
2640
+ export declare const TopupCryptoStatusRequest: S.Schema<TopupCryptoStatusRequest>;
2641
+ export type TopupCryptoStatusResponseState = "ACTIVE" | "PROCESSING" | "COMPLETED" | "EXPIRED" | "FAILED" | "DEACTIVATED";
2642
+ export declare const TopupCryptoStatusResponseState: any;
2643
+ export interface TopupCryptoStatusResponse {
2644
+ status?: string;
2645
+ checkoutId?: string;
2646
+ state?: TopupCryptoStatusResponseState;
2647
+ credited?: boolean;
2648
+ balance_cents?: number;
2649
+ balance?: string;
2650
+ }
2651
+ export declare const TopupCryptoStatusResponse: S.Schema<TopupCryptoStatusResponse>;
2652
+ export interface TopupMppRequest {
2653
+ /** Credit to add, in integer US cents. */
2654
+ amount: number;
2655
+ /** Check eligibility and limits only. */
2656
+ dryRun?: boolean;
2657
+ }
2658
+ export declare const TopupMppRequest: S.Schema<TopupMppRequest>;
2659
+ export type TopupMppResponseMethodsList = Array<string>;
2660
+ export declare const TopupMppResponseMethodsList: S.Schema<TopupMppResponseMethodsList>;
2661
+ export interface TopupMppResponse {
2662
+ status?: string;
2663
+ amount_cents?: number;
2664
+ /** Signed MPP payment URL; POST it with an MPP client. */
2665
+ payUrl?: string;
2666
+ expiresAt?: string;
2667
+ protocol?: string;
2668
+ methods?: TopupMppResponseMethodsList;
2669
+ message?: string;
2670
+ }
2671
+ export declare const TopupMppResponse: S.Schema<TopupMppResponse>;
2672
+ /** 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 */
2673
+ export type TransferDomainRequestPayWith = "usdc";
2674
+ export declare const TransferDomainRequestPayWith: any;
1724
2675
  export interface TransferDomainRequest {
1725
2676
  /** The domain name to transfer (e.g. `example.com`). */
1726
2677
  domain: string;
@@ -1728,6 +2679,12 @@ export interface TransferDomainRequest {
1728
2679
  authCode: string;
1729
2680
  /** The transfer cost in cents as returned by the pricing API. Must match exactly. */
1730
2681
  cost: number;
2682
+ /** Charge the transfer but hold it at `PENDINGDNS` instead of releasing it to the registry, so the DNS zone can be built before the domain moves. This is the no-downtime path: hold, then `POST /domain/prepareTransfer/{domain}`, then load records with `/dns/import/{domain}`, then `POST /domain/startTransfer/{domain}`. Nothing releases a held transfer on a timer. Not available for .uk or Handshake TLDs, which return `TRANSFER_HOLD_NOT_AVAILABLE` and are not charged. */
2683
+ holdForDnsSetup?: boolean;
2684
+ /** 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 */
2685
+ payWith?: TransferDomainRequestPayWith | (string & {});
2686
+ /** 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. */
2687
+ usdcCheckoutId?: string;
1731
2688
  /** Optional. When true, runs all pre-flight validation and returns a preview with `dryRun: true` and `wouldSucceed` WITHOUT initiating the transfer or charging. Nothing changes and the rate-limit budget is not consumed. */
1732
2689
  dryRun?: boolean;
1733
2690
  }
@@ -1757,6 +2714,22 @@ export type TransferDomainResponseBody = TransferDomainResponse | DryRunPreviewR
1757
2714
  export declare const TransferDomainResponseBody: S.Schema<TransferDomainResponseBody>;
1758
2715
  export type TransferDomainResponse2 = TransferDomainResponseBody;
1759
2716
  export declare const TransferDomainResponse2: S.Schema<TransferDomainResponse2>;
2717
+ export interface TransferDomainPrepareRequest {
2718
+ /** Domain name. */
2719
+ domain: string;
2720
+ }
2721
+ export declare const TransferDomainPrepareRequest: S.Schema<TransferDomainPrepareRequest>;
2722
+ export type TransferDomainPrepareResponsePorkbunNameserversList = Array<string>;
2723
+ export declare const TransferDomainPrepareResponsePorkbunNameserversList: S.Schema<TransferDomainPrepareResponsePorkbunNameserversList>;
2724
+ export interface TransferDomainPrepareResponse {
2725
+ status?: string;
2726
+ domain?: string;
2727
+ zoneReady?: boolean;
2728
+ recordCount?: number;
2729
+ message?: string;
2730
+ porkbunNameservers?: TransferDomainPrepareResponsePorkbunNameserversList;
2731
+ }
2732
+ export declare const TransferDomainPrepareResponse: S.Schema<TransferDomainPrepareResponse>;
1760
2733
  /** Replacement event subscription list (optional). */
1761
2734
  export type UpdateWebhookRequestEventsList = Array<string>;
1762
2735
  export declare const UpdateWebhookRequestEventsList: S.Schema<UpdateWebhookRequestEventsList>;
@@ -1766,7 +2739,7 @@ export declare const UpdateWebhookRequestStatus: any;
1766
2739
  export interface UpdateWebhookRequest {
1767
2740
  /** Endpoint id to update. */
1768
2741
  id: number;
1769
- /** New HTTPS URL (optional). */
2742
+ /** HTTPS endpoint that receives the signed POST. Port 443 only, and the hostname must resolve to a public internet address — private/loopback/reserved targets are refused. */
1770
2743
  url?: string;
1771
2744
  /** Replacement event subscription list (optional). */
1772
2745
  events?: UpdateWebhookRequestEventsList;
@@ -1827,9 +2800,60 @@ export interface WebhookRotateSecretRequest {
1827
2800
  id: number;
1828
2801
  }
1829
2802
  export declare const WebhookRotateSecretRequest: S.Schema<WebhookRotateSecretRequest>;
2803
+ export type AccountVerifyPhoneConfirmError = PorkbunOpError;
2804
+ /** Confirm the phone verification code Marks the account's phone number verified with the code from `POST /account/verifyPhone/send`. A wrong or expired code returns `PHONE_CODE_INVALID`; 10 wrong codes in an hour lock it for the hour (`PHONE_VERIFY_LIMIT`). The response says whether the email address is verified too, since purchases need both; the email is verified by the link in the verification email. */
2805
+ export declare const accountVerifyPhoneConfirm: API.OperationMethod<AccountVerifyPhoneConfirmRequest, AccountVerifyPhoneConfirmResponse, AccountVerifyPhoneConfirmError, PorkbunOpContext>;
2806
+ export type AccountVerifyPhoneSendError = PorkbunOpError;
2807
+ /** Text a verification code to the account's phone Purchases and top-ups need a verified email address and phone number, and accounts are not asked to verify the phone at signup, so `VERIFICATION_REQUIRED` is often the first error a new account sees. This texts (or calls) a code to the phone number already on the account; ask the person for it and pass it to `POST /account/verifyPhone/confirm`. The number cannot be chosen or changed over the API. One live code at a time: a second request within 10 minutes returns `codeAlreadySent` instead of texting again (send `"channel": "call"` if the text never arrived). Up to 5 sends a day (`PHONE_VERIFY_LIMIT`). Numbers in countries where the website requires a CAPTCHA for phone verification, or accounts with no phone number, get `PHONE_VERIFY_UNAVAILABLE` and verify on the website. Already verified: `alreadyVerified: true`. Not available on sandbox keys. */
2808
+ export declare const accountVerifyPhoneSend: API.OperationMethod<AccountVerifyPhoneSendRequest, AccountVerifyPhoneSendResponse, AccountVerifyPhoneSendError, PorkbunOpContext>;
1830
2809
  export type ApikeyRequestError = BadRequest | PorkbunOpError;
1831
2810
  /** Initiate an API key authorization request Initiate an API key authorization flow. No credentials are required. Returns a `requestToken` and `authUrl` that the account holder must visit (while logged in to Porkbun in that browser) to approve the request. The `authUrl` is valid for **30 minutes** (long enough for a brand-new user to create an account and verify their email); if it lapses, call this endpoint again for a fresh token. After approval, call `/apikey/retrieve` to get the public API key. By default (legacy flow) the secret API key is shown only once, in the user's browser, and must be pasted into the application manually. To let an agent receive the secret without a browser copy, supply a PKCE `codeChallenge` (see the parameter below): the key is then minted lazily and BOTH keys are returned once from `/apikey/retrieve` to the caller presenting the matching `codeVerifier`. **Rate limit:** 20 requests per IP per 3600 seconds. SANDBOX: pass `sandbox: true` to skip approval and get a sandbox key pair back immediately (both `apikey` and `secretapikey` in the response, plus `sandbox: true`). */
1832
2811
  export declare const apikeyRequest: API.OperationMethod<ApikeyRequestRequest, ApikeyRequestResponse, ApikeyRequestError, PorkbunOpContext>;
2812
+ export type BulkDomainCheckDomainError = BadRequest | PorkbunOpError;
2813
+ /** Check several domains at once Check availability and pricing for up to 25 domains in one call. Same endpoint as the single check, with a `domains` array in the body and no domain in the path. **Prefer this over looping the single check.** Checks are chunked per registry, so a batch is materially less work for us than the same names one at a time, and the budget reflects that: this draws on a separate allowance of **200 domains per 60 seconds** per account, against 10 checks per 10 seconds for the single form. Counting is per DOMAIN, not per request, so 25 domains spends 25 of the 200. **Sustained bulk checking.** An account that checks about 1,800 names over three hours while registering little of what it checks (fewer than one domain per 200 names over a day) is treated as scanning for the next 24 hours: its checks, single and bulk, on every API version, share a budget of 50 names per 5 minutes. Over it, the call is refused whole with `RATE_LIMIT_EXCEEDED`, `reason: "SUSTAINED_BULK_CHECKING"` and `retryAfter`; nothing is part-answered. Normal use, including checking a long list of candidate names once, is nowhere near this. Accounts that buy (100 or more registrations in a year) and affiliates sending orders are never treated as scanning, and a per-key limit from support overrides it. **Partial results are normal and must be read.** Three lists come back and they mean different things: - `domains` - answered, keyed by domain name, each value identical in shape to the single-check `response`. - `invalid` - entries that are not checkable at all (not a domain, unsupported TLD). One typo does not fail the call; the other names are still answered. - `unresolved` - the registry did not answer in time. These are **neither available nor taken**; treating them as unavailable is wrong. Retry them. Duplicates are removed before the budget is charged. If more than 25 remain, nothing is checked and `BULK_CHECK_TOO_MANY` is returned rather than a truncated answer. **Latency.** This is synchronous: one request, one complete answer, no polling. 25 domains across 25 different TLDs measures around 3 seconds, because the connection manager fans a batch that fits under every registry's cap out as a single command. A few registries cap low and **.de accepts one domain per command**, so a batch heavy in those becomes several sequential commands; if that would need more than 4, the call is refused with `BULK_CHECK_TOO_SLOW` rather than left to time out mid-response. */
2814
+ export declare const bulkDomainCheckDomain: API.OperationMethod<BulkDomainCheckDomainRequest, BulkDomainCheckDomainResponse, BulkDomainCheckDomainError, PorkbunOpContext>;
2815
+ export type CloseoutBuyError = BadRequest | Forbidden | NotFound | Conflict | PorkbunOpError;
2816
+ /** Buy a closeout outright **Spends account credit, or pays directly in USDC with `"payWith": "usdc"` (HTTP 402, then repeat with `PAYMENT-SIGNATURE`; kept as account credit if the claim fails).** Counts toward the monthly API spend limit. Buys a closeout at its current price and claims the name with the provider in one call. Send `cost` as the exact `totalPrice` from `/closeout/get/{domain}`; any other value is refused with `COST_MISMATCH` so a caller can never be charged a price it did not name. `dryRun: true` with `cost: 0` returns a quote and charges nothing. Honours `Idempotency-Key`. **The domain does not arrive immediately.** Claiming reserves it; the provider then has to release it, which usually takes a few days. Poll `/domain/listAll` or subscribe to the `domain.registered` webhook rather than expecting it in your account when this returns. Every post-charge failure refunds automatically and says so via `refunded: true` — including losing the race to another buyer (`CLOSEOUT_UNAVAILABLE`) and the price moving between quote and claim (`COST_MISMATCH`). Closeouts are first-come at a fixed price, so a lost race is not worth retrying on the same name. Not available with a sandbox key (`SANDBOX_UNSUPPORTED`): the inventory provider has no test environment, so a purchase cannot be rehearsed without claiming a real name. Use `dryRun` against a live key instead — it validates and prices without charging. Eligibility is the same as registering a domain, plus verified email and phone. There is no account-age or prior-order requirement — a first-time customer can buy a closeout, which matters because listings are first-come and often gone within minutes. An account that support has blocked from auctions and closeouts (past-due invoices, or an auction terms violation) returns `CLOSEOUT_NOT_ELIGIBLE`, which is not retryable. */
2817
+ export declare const closeoutBuy: API.OperationMethod<CloseoutBuyRequest, CloseoutBuyResponse, CloseoutBuyError, PorkbunOpContext>;
2818
+ export type CloudflareCreateRecordError = PorkbunOpError;
2819
+ /** Create a DNS record in the domain's Cloudflare zone **This writes to the Cloudflare zone that actually answers for the domain**, unlike `/dns/*`, which manages Porkbun's nameservers and no longer affects resolution once a domain has moved. `name` accepts `@` for the apex or a bare label. MX requires `priority`. `proxied` applies to A/AAAA/CNAME only. Supports `dryRun`. */
2820
+ export declare const cloudflareCreateRecord: API.OperationMethod<CloudflareCreateRecordRequest, CloudflareCreateRecordResponse, CloudflareCreateRecordError, PorkbunOpContext>;
2821
+ export type CloudflareDeleteRecordError = PorkbunOpError;
2822
+ /** Delete a DNS record from the domain's Cloudflare zone **This writes to the Cloudflare zone that actually answers for the domain**, unlike `/dns/*`, which manages Porkbun's nameservers and no longer affects resolution once a domain has moved. The record is read before deletion, so the response reports exactly what was removed and a bad id fails before anything is destroyed. Supports `dryRun`. */
2823
+ export declare const cloudflareDeleteRecord: API.OperationMethod<CloudflareDeleteRecordRequest, CloudflareDeleteRecordResponse, CloudflareDeleteRecordError, PorkbunOpContext>;
2824
+ export type CloudflareEditRecordError = PorkbunOpError;
2825
+ /** Update a DNS record in the domain's Cloudflare zone **This writes to the Cloudflare zone that actually answers for the domain**, unlike `/dns/*`, which manages Porkbun's nameservers and no longer affects resolution once a domain has moved. Partial update: fields you omit keep their current value. The response carries both the new record and the `previous` one. Supports `dryRun`. */
2826
+ export declare const cloudflareEditRecord: API.OperationMethod<CloudflareEditRecordRequest, CloudflareEditRecordResponse, CloudflareEditRecordError, PorkbunOpContext>;
2827
+ export type CloudflareGetConnectionError = PorkbunOpError;
2828
+ /** Check the Cloudflare account connection (poll target) Whether this account has an active Cloudflare grant, and which Cloudflare account it points at. **This is the poll target for the connect flow.** Minting the grant is a human action: Cloudflare's consent screen has to be completed in a browser, and the authorization is bound to the Porkbun web session that started it, so it cannot be driven over the API. When `connected` is `false` the response carries a `connectUrl` — send the account owner there, then poll this endpoint until `connected` is `true`. Also available via POST. */
2829
+ export declare const cloudflareGetConnection: API.OperationMethod<CloudflareGetConnectionRequest, CloudflareGetConnectionResponse, CloudflareGetConnectionError, PorkbunOpContext>;
2830
+ export type CloudflareGetQueueError = PorkbunOpError;
2831
+ /** List every Cloudflare move for the account Every Cloudflare move this account has requested, with status and message. Queue rows are never deleted, so this doubles as the audit trail. Also available via POST. **Status values** (poll until one of the terminal ones): Poll on a sensible interval (a few seconds early on, then back off) — a zone typically leaves `queued` within seconds but can sit in `setup` or `activating` while Cloudflare provisions the zone and DNS propagates. */
2832
+ export declare const cloudflareGetQueue: API.OperationMethod<CloudflareGetQueueRequest, CloudflareGetQueueResponse, CloudflareGetQueueError, PorkbunOpContext>;
2833
+ export type CloudflareGetRecordsError = PorkbunOpError;
2834
+ /** List the domain's live DNS records at Cloudflare The domain's DNS records **as Cloudflare currently holds them**, each with its `proxied` flag and whether it is `proxiable` at all. Once a domain has moved, this is the authoritative record set — `/dns/retrieve` reads the Porkbun zone, which is no longer the one answering queries. Requires the move to have finished (`ZONE_NOT_READY` otherwise). Also available via POST. */
2835
+ export declare const cloudflareGetRecords: API.OperationMethod<CloudflareGetRecordsRequest, CloudflareGetRecordsResponse, CloudflareGetRecordsError, PorkbunOpContext>;
2836
+ export type CloudflareGetZoneError = PorkbunOpError;
2837
+ /** Get live zone state from Cloudflare (and detect nameserver drift) What **Cloudflare** says about the zone right now — status, paused, its nameservers, activation date — as opposed to what our queue row remembers. These drift: if the nameservers are repointed elsewhere after the move, our row still reads `done` while Cloudflare has stopped answering for the domain. The response includes the live public nameservers and a `nameserversDrifted` boolean so you don't have to diff them. Also available via POST. */
2838
+ export declare const cloudflareGetZone: API.OperationMethod<CloudflareGetZoneRequest, CloudflareGetZoneResponse, CloudflareGetZoneError, PorkbunOpContext>;
2839
+ export type CloudflareGetZoneSettingsError = PorkbunOpError;
2840
+ /** Read the zone settings that matter after a move The Cloudflare zone settings worth caring about post-migration: `ssl`, `always_use_https`, `automatic_https_rewrites`, `min_tls_version`, `development_mode`, `cache_level`. The important one is **`ssl`**: `flexible` means Cloudflare fetches your origin over plain HTTP while visitors see a padlock, so the response warns when it is `off` or `flexible`. Also available via POST. If the account's Cloudflare authorization predates this feature it will not carry the `zone-settings.write` scope, and this returns `CLOUDFLARE_REAUTHORIZE_REQUIRED` with a `connectUrl`. Reconnecting is the same one-click browser flow and does not disturb domains already moved. */
2841
+ export declare const cloudflareGetZoneSettings: API.OperationMethod<CloudflareGetZoneSettingsRequest, CloudflareGetZoneSettingsResponse, CloudflareGetZoneSettingsError, PorkbunOpContext>;
2842
+ export type CloudflareInventoryError = PorkbunOpError;
2843
+ /** List every domain with its Cloudflare eligibility Every domain in the account with a `state` (`eligible`, `warn`, `blocked`, `connected`, `inprogress`) and a human-readable `reason`. Read this **before** queueing to see what will be skipped and why. Works even with no Cloudflare connection yet, so an agent can plan while the owner is still authorizing. Also available via POST. */
2844
+ export declare const cloudflareInventory: API.OperationMethod<CloudflareInventoryRequest, CloudflareInventoryResponse, CloudflareInventoryError, PorkbunOpContext>;
2845
+ export type CloudflareRollbackError = PorkbunOpError;
2846
+ /** Undo a completed move (restore Porkbun nameservers) Point the domain's nameservers back at Porkbun, restoring the DNS we still hold. The Cloudflare zone is deliberately left in place — deleting a zone in someone's own Cloudflare account is theirs to do. Fails with `ROLLBACK_FAILED` if we never moved the domain, it is already back on Porkbun nameservers, or it is being worked on right now. Supports `dryRun`. */
2847
+ export declare const cloudflareRollback: API.OperationMethod<CloudflareRollbackRequest, CloudflareRollbackResponse, CloudflareRollbackError, PorkbunOpContext>;
2848
+ export type CloudflareSetProxyError = PorkbunOpError;
2849
+ /** Turn the Cloudflare proxy (orange cloud) on or off Set `proxied` on the domain's Cloudflare DNS records. **The move itself always imports records DNS-only (grey cloud), on purpose** — changing how traffic is served at the same time as changing who serves DNS gives you two variables to debug at once. Proxying is therefore a separate, explicit step, best done after you've confirmed the site still works. Defaults to every proxiable record; pass `records` to target specific names (`"@"` means the apex, a bare label like `"www"` is expanded). Only A, AAAA and CNAME can be proxied — anything else is reported under `skipped` with a reason rather than failing the call. Records already in the requested state are skipped too. Proxying hides the origin IP, so if the zone's MX points at a hostname you are proxying, mail to it breaks; that case comes back in `warnings`. Supports `dryRun`. Rate limit: 60 changes per account per hour (these calls go to Cloudflare under Porkbun's OAuth client). */
2850
+ export declare const cloudflareSetProxy: API.OperationMethod<CloudflareSetProxyRequest, CloudflareSetProxyResponse, CloudflareSetProxyError, PorkbunOpContext>;
2851
+ export type CloudflareSetZoneSettingsError = PorkbunOpError;
2852
+ /** Change zone settings (allowlisted) Set one or more of the allowlisted zone settings. This is an allowlist rather than a passthrough — Cloudflare exposes hundreds of settings and WAF/firewall/security controls are deliberately out of scope for this API. Prefer `ssl: "full"`; `flexible` is an invisible downgrade for visitors. Supports `dryRun`. Rate limit: shares the 60/hour Cloudflare-write budget. If the account's Cloudflare authorization predates this feature it will not carry the `zone-settings.write` scope, and this returns `CLOUDFLARE_REAUTHORIZE_REQUIRED` with a `connectUrl`. Reconnecting is the same one-click browser flow and does not disturb domains already moved. */
2853
+ export declare const cloudflareSetZoneSettings: API.OperationMethod<CloudflareSetZoneSettingsRequest, CloudflareSetZoneSettingsResponse, CloudflareSetZoneSettingsError, PorkbunOpContext>;
2854
+ export type ConnectCloudflareError = PorkbunOpError;
2855
+ /** Queue domains to move to the customer's Cloudflare account Queue one or many domains. For each one we create the zone in the customer's own Cloudflare account, copy across the DNS records we hold, and repoint the registry nameservers at Cloudflare. **Asynchronous.** Work runs on a background job over the next few minutes, so a successful call means *queued*, never *connected* — poll `/cloudflare/getQueue` or `/cloudflare/get/{domain}`. **`skipped` is a normal outcome, not an error.** DNSSEC live, custom nameservers, already connected, already in progress: each domain comes back under `queued`, `skipped` or `alreadyQueued` with its own reason. Read the reasons rather than treating a non-empty `skipped` as failure. Eligibility, ownership and nameserver state are re-checked immediately before each domain is acted on, so a domain accepted here can still be skipped later. Re-submitting a domain is safe: the queue row is the unit of truth and is updated in place. Supports `dryRun: true`, which returns the same per-domain verdicts without queueing anything. Requires an active Cloudflare connection (`CLOUDFLARE_NOT_CONNECTED` otherwise). Limits: 500 domains per call, 2000 domains per account per hour. After queueing, poll `/cloudflare/get/{domain}`: the row moves `queued` → `working` → `setup` → `activating` → `connected`. `setup` means Cloudflare has the zone but has not provisioned it yet, so the nameservers have deliberately not been touched. `activating` means the nameservers are already repointed and Cloudflare is confirming the zone, which can take a while as DNS propagates. */
2856
+ export declare const connectCloudflare: API.OperationMethod<ConnectCloudflareRequest, ConnectCloudflareResponse, ConnectCloudflareError, PorkbunOpContext>;
1833
2857
  export type CreateAccountInviteError = BadRequest | PorkbunOpError;
1834
2858
  /** Create an account registration invite Generates a one-time invite token and URL that you send to a prospective user. When the user visits the URL they go through Porkbun's normal account creation flow — including CAPTCHA, address collection, and TOS acceptance — in the browser. The invite expires in 48 hours. Each token can only be used once. Optionally supply an `email` to pre-fill the email field on the registration form. Optionally supply a `returnUrl` (must be HTTPS) to redirect the user back to your platform after they complete registration. After sending the invite URL, poll `/account/inviteStatus` to check whether the account was created. */
1835
2859
  export declare const createAccountInvite: API.OperationMethod<CreateAccountInviteRequest, CreateAccountInviteResponse, CreateAccountInviteError, PorkbunOpContext>;
@@ -1837,13 +2861,13 @@ export type CreateDnsError = BadRequest | PorkbunOpError;
1837
2861
  /** Create DNS record Create a new DNS record for a domain. The record ID is returned in the response. */
1838
2862
  export declare const createDns: API.OperationMethod<CreateDnsRequest, CreateDnsResponse, CreateDnsError, PorkbunOpContext>;
1839
2863
  export type CreateDomainError = BadRequest | PorkbunOpError;
1840
- /** Register a domain Register a domain using account credit. Requirements: - Account email and phone must be verified - Account must have sufficient credit - `agreeToTerms` must be `'yes'` or `'1'` - `cost` must equal the current price for the domain's minimum registration duration (in pennies) - Account must have placed at least one previous domain registration - Premium domains cannot be registered via API Registrations are always for the registry-minimum duration (usually 1 year). **WHOIS privacy.** WHOIS privacy is automatically enabled on new registrations (when the TLD supports it). Pass the optional `whoisPrivacy` field to override this on a per-registration basis, or change the account-level default under Account Security Settings on porkbun.com/account. **Rate limits (both apply):** - Attempt limit (default: 1 attempt per 10 seconds per account) - Success limit (default: 50 successful registrations per 86400 seconds per account) Both limits are configurable per API key and their current values are returned in the `limits` field of the response. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT registering or charging — nothing is created. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "registration", "domain": "example.com", "tld": "com", "available": "available", "premium": false, "duration": 1, "cost": 973, "costDisplay": "$9.73", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this registration would succeed and cost $9.73. No order was created and no charge was made.", "requestId": "019e04fa-258d-7d11-aa86-4d5795c3fe8f" } ``` */
2864
+ /** Register a domain Register a domain, paid from account credit or directly in USDC. Requirements: - Account email and phone must be verified - Enough **prepaid credit** to cover the price, or `"payWith": "usdc"` to pay directly (see "Paying for it" below) - `agreeToTerms` must be `'yes'` or `'1'` - `cost` must equal the current price for the domain's minimum registration duration (in pennies) - Premium domains cannot be registered via API, and a single order cannot exceed $100 (`ORDER_TOO_LARGE`) ## Paying for it Two ways: from prepaid account credit (the default), or directly in USDC. **From account credit.** No card on file is charged at purchase time - the thing most first-time callers get wrong, because having a card saved is not enough; the balance has to be there before the call. - Read the balance with `GET /account/balance` (cents, plus a display string). - Add to it: `POST /account/topup` charges a saved card now (with the account holder's OK); `POST /account/topupMpp` returns a link an agent pays with the user's card from a Stripe Link agent wallet; `POST /account/topupCrypto` opens a USDC checkout an agent's wallet can pay over x402; or the account holder adds credit at https://porkbun.com/account/credit. - Turn on **auto top-up** at https://porkbun.com/account/api so a saved card refills the balance when it drops below a threshold. The hands-off option for an agent that registers on its own. - Rehearse with `dryRun: true`, which reports `cost`, `balance`, `sufficientFunds` and, when short, `shortfall`. A purchase attempted without enough credit returns `INSUFFICIENT_FUNDS` carrying `cost`, `balance`, `shortfall`, `topUpAvailable` and `usdcAmountToCover` in cents, and a message naming them. **Directly in USDC (x402).** Add `"payWith": "usdc"`. After every check passes, the call answers HTTP 402 `PAYMENT_REQUIRED` with Coinbase's x402 terms in the `PAYMENT-REQUIRED` header and charges nothing. An x402 client pays them and repeats the same request with a `PAYMENT-SIGNATURE` header, and the registration completes in that call, with the receipt in `PAYMENT-RESPONSE`. No credit is needed. If the registration fails after payment, the payment is not sent back to the wallet: it stays on the account as credit (`payment.keptAsCredit` and `balance_cents` in the error), ready to retry from credit. Guide: https://porkbun.com/llms/guides/pay-with-usdc-x402 **Monthly limit.** Either way, purchases count toward the account's monthly API spend limit, $100 a month until the account holder sets their own at https://porkbun.com/account/api (`MONTHLY_SPEND_LIMIT_EXCEEDED`). Guide: https://porkbun.com/llms/guides/spend-limits Registrations are always for the registry-minimum duration (usually 1 year). **WHOIS privacy.** WHOIS privacy is automatically enabled on new registrations (when the TLD supports it). Pass the optional `whoisPrivacy` field to override this on a per-registration basis, or change the account-level default under Account Security Settings on porkbun.com/account. **Rate limits (both apply):** - Attempt limit (default: 1 attempt per second per account) - Success limit (default: 1000 successful registrations per 86400 seconds per account) Both limits are configurable per API key and their current values are returned in the `limits` field of the response. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT registering or charging — nothing is created. Send `cost: 0` with it to be quoted rather than having to match a price you do not know yet, and note that a dry run is answered even when the balance is too low: `wouldSucceed` comes back false with `shortfall` saying by how much. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "registration", "domain": "example.com", "tld": "com", "available": "available", "premium": false, "duration": 1, "cost": 973, "costDisplay": "$9.73", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this registration would succeed and cost $9.73. No order was created and no charge was made.", "requestId": "019e04fa-258d-7d11-aa86-4d5795c3fe8f" } ``` */
1841
2865
  export declare const createDomain: API.OperationMethod<CreateDomainRequest, CreateDomainResponse2, CreateDomainError, PorkbunOpContext>;
1842
2866
  export type CreateHostingError = BadRequest | PorkbunOpError;
1843
- /** Provision hosting — a static site or a WordPress site **Applies to:** Both products — the `sku` decides which. Provision hosting (Secure Static Hosting or Cloud for WordPress) for a domain in the account. The FIRST provision for a domain starts a **15-day free trial** ($0 now) that **auto-renews** at the plan price when the trial ends; a re-provision after deprovision is charged immediately to account credit (one free trial per domain). Provisioning **switches the domain to Porkbun nameservers** if it isn't already — pass `agreeToNameserverChange: true` to allow that. Supports `dryRun`. Remote setup can be async: `status` may be `PENDING` — poll `/hosting/get` until `ACTIVE` before deploying. **Cloud for WordPress:** pass a `CLOUDWORDPRESS…` sku to provision a managed WordPress site instead of static hosting. The file endpoints (deploy/files/deleteFile/makeDir) do not apply — manage the site through WordPress, using `/hosting/createWpCredentials/{domain}` for REST API credentials. **Rate limit:** 10 provisions per account per hour (`dryRun` calls are free). */
2867
+ /** Provision hosting — a static site or a WordPress site **Applies to:** Both products — the `sku` decides which. Provision hosting (Secure Static Hosting or Cloud for WordPress) for a domain in the account. The FIRST provision for a domain starts a **15-day free trial** ($0 now) that **auto-renews** at the plan price when the trial ends; a re-provision after deprovision is charged immediately, to account credit or directly in USDC with `"payWith": "usdc"` (HTTP 402, then repeat with `PAYMENT-SIGNATURE`; kept as account credit if provisioning fails), and counts toward the monthly API spend limit (one free trial per domain). Provisioning **switches the domain to Porkbun nameservers** if it isn't already — pass `agreeToNameserverChange: true` to allow that. Supports `dryRun`. Remote setup can be async: `status` may be `PENDING` — poll `/hosting/get` until `ACTIVE` before deploying. **Cloud for WordPress:** pass a `CLOUDWORDPRESS…` sku to provision a managed WordPress site instead of static hosting. The file endpoints (deploy/files/deleteFile/makeDir) do not apply — manage the site through WordPress, using `/hosting/createWpCredentials/{domain}` for REST API credentials. **Rate limit:** 10 provisions per account per hour (`dryRun` calls are free). */
1844
2868
  export declare const createHosting: API.OperationMethod<CreateHostingRequest, CreateHostingResponse, CreateHostingError, PorkbunOpContext>;
1845
2869
  export type CreateWebhookError = BadRequest | PorkbunOpError;
1846
- /** Create a webhook endpoint Register an HTTPS endpoint to receive signed event payloads. The response includes the generated `secret` — store it securely; it is the HMAC key used to verify the `X-Porkbun-Signature` header. Omit `events` (or pass `["*"]`) to subscribe to all event types. Maximum 20 endpoints per account. */
2870
+ /** Create a webhook endpoint Register an HTTPS endpoint to receive signed event payloads. The response includes the generated `secret` — store it securely; it is the HMAC key used to verify the `X-Porkbun-Signature` header. Omit `events` (or pass `["*"]`) to subscribe to all event types. Maximum 20 endpoints per account. **URL requirements:** the endpoint must be an `https://` URL on the standard port 443, with a hostname that resolves to a public internet address. Private, loopback, link-local, CGNAT and other reserved ranges are refused (`INVALID_WEBHOOK_URL`) because Porkbun delivers from inside its own network. Credentials in the URL (`https://user:pass@host`) are also refused — authenticate the receiver by verifying the `X-Porkbun-Signature` HMAC instead. A hostname that does not resolve yet is accepted, so you can register the endpoint before the receiver is deployed, but delivery is re-checked against these rules immediately before each request. */
1847
2871
  export declare const createWebhook: API.OperationMethod<CreateWebhookRequest, WebhookEndpointResponse, CreateWebhookError, PorkbunOpContext>;
1848
2872
  export type DeleteDnsError = BadRequest | PorkbunOpError;
1849
2873
  /** Delete DNS record by ID Delete a specific DNS record. SOA and default Porkbun NS records cannot be deleted. */
@@ -1857,32 +2881,50 @@ export declare const deleteWebhook: API.OperationMethod<DeleteWebhookRequest, De
1857
2881
  export type DeployHostingError = BadRequest | PorkbunOpError;
1858
2882
  /** Upload site files (static hosting only) **Applies to:** Secure Static Hosting only — a WordPress site returns `NOT_SUPPORTED_FOR_PRODUCT`; manage its content through WordPress instead. Upload static files to the domain's Secure Static Hosting space. Send `files` as an array of `{ path, content }` where `content` is base64. Total payload ≤ 10 MB per request (split larger sites across calls). Only static-web file types are accepted (html/css/js/images/fonts/…); server-executable types are rejected. Hosting must be ACTIVE. A file’s `path` may include directories (e.g. `assets/css/style.css`); any missing parent directories are created automatically. Paths are sanitized (no traversal/control chars) and the filename extension must be an allowed static-web type. */
1859
2883
  export declare const deployHosting: API.OperationMethod<DeployHostingRequest, DeployHostingResponse, DeployHostingError, PorkbunOpContext>;
2884
+ export type DisconnectCloudflareError = PorkbunOpError;
2885
+ /** Remove the stored Cloudflare connection Revoke and forget this account's Cloudflare grant. Domains already moved stay on Cloudflare and keep resolving; this only stops us making further changes on the customer's behalf. Reconnecting requires the browser authorization again. Supports `dryRun`. */
2886
+ export declare const disconnectCloudflare: API.OperationMethod<DisconnectCloudflareRequest, DisconnectCloudflareResponse, DisconnectCloudflareError, PorkbunOpContext>;
1860
2887
  export type DnsCreateDnssecRecordError = BadRequest | PorkbunOpError;
1861
- /** Create DNSSEC record Create a DNSSEC DS or key record at the registry. DNSSEC requirements vary by registry — `keyTag`, `alg`, `digestType`, and `digest` are the minimum required fields. Key data fields are optional and will be omitted if not accepted by the registry. */
1862
- export declare const dnsCreateDnssecRecord: API.OperationMethod<DnsCreateDnssecRecordRequest, BasicResponse, DnsCreateDnssecRecordError, PorkbunOpContext>;
2888
+ /** Create DNSSEC record Create a DNSSEC DS or key record at the registry. DNSSEC requirements vary by registry — `keyTag`, `alg`, `digestType`, and `digest` are the minimum required fields. Key data fields are optional and will be omitted if not accepted by the registry. Algorithm and digest type are validated against the registry's own policy before the request is sent. Registries are retiring the values deprecated by RFC 9904/9905/9906 on different schedules, so what is accepted depends on the TLD: a value one registry has already dropped may still be accepted by another. A value the registry no longer accepts returns `DNSSEC_ALGORITHM_DEPRECATED`; one that still works but is being retired returns `status: SUCCESS` with a `warnings` array. Use algorithm 8 (RSA/SHA-256) or 13 (ECDSA/SHA-256) with digest type 2 (SHA-256) to be accepted everywhere. Existing DNSSEC records keep resolving regardless, and can always be deleted. */
2889
+ export declare const dnsCreateDnssecRecord: API.OperationMethod<DnsCreateDnssecRecordRequest, DnsCreateDnssecRecordResponse, DnsCreateDnssecRecordError, PorkbunOpContext>;
1863
2890
  export type DnsDeleteByNameTypeError = BadRequest | PorkbunOpError;
1864
2891
  /** Delete DNS records by name and type Delete all DNS records matching the given subdomain and type. SOA and NS records cannot be deleted with this method (use delete by ID instead). */
1865
2892
  export declare const dnsDeleteByNameType: API.OperationMethod<DnsDeleteByNameTypeRequest, BasicResponse, DnsDeleteByNameTypeError, PorkbunOpContext>;
1866
2893
  export type DnsDeleteDnssecRecordError = BadRequest | PorkbunOpError;
1867
2894
  /** Delete DNSSEC record Delete a DNSSEC record from the registry by key tag. Note: most registries delete all records matching the key data, not only the record with the specified key tag. */
1868
2895
  export declare const dnsDeleteDnssecRecord: API.OperationMethod<DnsDeleteDnssecRecordRequest, BasicResponse, DnsDeleteDnssecRecordError, PorkbunOpContext>;
2896
+ export type DnsDiffError = NotFound | PorkbunOpError;
2897
+ /** Compare a restore point with the live zone What changed between a restore point and the zone as it stands now. - `missing` -- in the restore point, not live. These are the records a restore would add back. - `extra` -- live, not in the restore point. A restore leaves these alone unless you pass `prune`. - `inSync` -- true when neither list has anything in it. Records are compared on **name, type, content and priority**, not on id: an id means nothing across a delete and re-create, and what anyone means by "the same record" is the data. SOA and NS are excluded from both lists because they are the zone's own scaffolding. For masked records (parking, `ALIAS`, `HTTPS`) the value shown is the one you configured, not the internal host it resolves to. */
2898
+ export declare const dnsDiff: API.OperationMethod<DnsDiffRequest, DnsDiffResponse, DnsDiffError, PorkbunOpContext>;
1869
2899
  export type DnsEditByNameTypeError = BadRequest | PorkbunOpError;
1870
2900
  /** Edit DNS records by name and type Replace the content of all records matching the given subdomain and type. SOA and NS records cannot be edited with this method (use edit by ID instead). */
1871
2901
  export declare const dnsEditByNameType: API.OperationMethod<DnsEditByNameTypeRequest, BasicResponse, DnsEditByNameTypeError, PorkbunOpContext>;
1872
2902
  export type DnsGetDnssecRecordsError = BadRequest | PorkbunOpError;
1873
2903
  /** Get DNSSEC records Retrieve DNSSEC records associated with the domain at the registry. Supports both GET (with header auth) and POST (with body or header auth). */
1874
2904
  export declare const dnsGetDnssecRecords: API.OperationMethod<DnsGetDnssecRecordsRequest, DnsGetDnssecRecordsResponse, DnsGetDnssecRecordsError, PorkbunOpContext>;
2905
+ export type DnsHistoryError = PorkbunOpError;
2906
+ /** List restore points for a zone Every version of a zone we still hold, newest first. **DNS is the only part of a stack with no undo, and this is it.** If a record was deleted or edited by mistake, you do not have to know what it used to say -- ask for the restore points, diff one against the live zone, and put it back. Restore points are taken automatically: before the **first** write to a zone in each hour (so a session of edits costs one point, not one per record), before any bulk import or zone wipe, and before any restore. `recordCount` is the size of the zone **as it was at that moment**, not now. `matchesLive` tells you which point the zone currently sits on without diffing each one. Up to 50 are returned. */
2907
+ export declare const dnsHistory: API.OperationMethod<DnsHistoryRequest, DnsHistoryResponse, DnsHistoryError, PorkbunOpContext>;
2908
+ export type DnsPreflightError = PorkbunOpError;
2909
+ /** Check whether a change will break the domain Read-only. Answers the question of whether a change is about to break the domain, before you change delegation, transfer it out, or turn DNSSEC on. It changes nothing and spends nothing. **Every check here comes from an incident we actually had**, which is the point: these are the failures where a zone looks fine and stops working anyway, and nobody can say why afterwards. Each finding names the rule it comes from and carries a `next_action`, so it argues its case rather than asserting a verdict. Pass `intent` to scope it: `general` (default) runs everything applicable, `move-nameservers` adds the delegation checks, `transfer-out` adds the checks that matter when leaving, `enable-dnssec` the DNSSEC ones. Read `blockers` first -- those will break something. `warnings` will not break outright but are usually what the customer asks about next. `safe` is true only when both lists are empty. */
2910
+ export declare const dnsPreflight: API.OperationMethod<DnsPreflightRequest, DnsPreflightResponse, DnsPreflightError, PorkbunOpContext>;
1875
2911
  export type DnsRetrieveByIdError = BadRequest | PorkbunOpError;
1876
2912
  /** Retrieve DNS record by ID Retrieve a specific DNS record by its numeric ID. Supports both GET (with header auth) and POST (with body or header auth). */
1877
2913
  export declare const dnsRetrieveById: API.OperationMethod<DnsRetrieveByIdRequest, DnsRecordsResponse, DnsRetrieveByIdError, PorkbunOpContext>;
1878
2914
  export type DnsRetrieveByNameTypeError = BadRequest | PorkbunOpError;
1879
2915
  /** Retrieve DNS records by name and type Retrieve all DNS records for a domain that match a specific subdomain and record type. Omit `subdomain` (or leave the path segment empty) to query the root domain. Supports both GET (with header auth) and POST (with body or header auth). */
1880
2916
  export declare const dnsRetrieveByNameType: API.OperationMethod<DnsRetrieveByNameTypeRequest, DnsRecordsResponse, DnsRetrieveByNameTypeError, PorkbunOpContext>;
2917
+ export type DnsScanError = BadRequest | PorkbunOpError;
2918
+ /** Discover the records a domain currently publishes Query a domain's **live authoritative nameservers** and return the records they answer with, writing nothing. This is what makes an inbound transfer non-destructive: a transfer moves only the delegation — EPP carries no zone data — so once the losing registrar stops answering for the zone, whatever it published is gone and unrecoverable. Run this **before** the nameservers move, then pass the result to `/dns/import/{domain}`. The scan probes a wide list of well-known names (apex, common subdomains, MX, DKIM selectors, provider verification hosts) and consolidates wildcards. It cannot enumerate a zone — DNS has no listing operation and AXFR is universally refused — so treat it as thorough but **not exhaustive**. If the old registrar exposes the zone through its own API, that is authoritative: read it with your own credentials (they never need to reach Porkbun) and POST those records to `/dns/import` instead. Metered separately at 20 calls per hour per account, because each call is roughly 90 DNS lookups. */
2919
+ export declare const dnsScan: API.OperationMethod<DnsScanRequest, DnsScanResponse, DnsScanError, PorkbunOpContext>;
1881
2920
  export type DomainAddUrlForwardError = BadRequest | PorkbunOpError;
1882
2921
  /** Add URL forward Add a URL forward for a domain or subdomain. */
1883
2922
  export declare const domainAddUrlForward: API.OperationMethod<DomainAddUrlForwardRequest, BasicResponse, DomainAddUrlForwardError, PorkbunOpContext>;
2923
+ export type DomainCancelTransferError = BadRequest | PorkbunOpError;
2924
+ /** Cancel an inbound transfer and refund it Cancel a pending inbound transfer and refund the order. The sequence is deliberate: mark the transfer cancelled locally, withdraw it at the registry, **verify** the registry actually accepted the withdrawal, and only then refund. If the registry state cannot be confirmed the local row is restored and `TRANSFER_STATE_UNCONFIRMED` is returned rather than refunding a transfer that may still be live. The response reports `withdrawnAtRegistry`, `registryResultCode`, `refunded` and `refundAmount` so you can see exactly how far it got. Supports `dryRun`. */
2925
+ export declare const domainCancelTransfer: API.OperationMethod<DomainCancelTransferRequest, DomainCancelTransferResponse, DomainCancelTransferError, PorkbunOpContext>;
1884
2926
  export type DomainCheckDomainError = BadRequest | PorkbunOpError;
1885
- /** Check domain availability Check if a domain is available for registration and retrieve current pricing. Includes registration, renewal, and transfer prices. **Rate limit:** Configurable per API key. Default is 1 check per 10 seconds per account. Rate limit usage is returned in the `limits` field of the response. */
2927
+ /** Check domain availability Check if a domain is available for registration and retrieve current pricing. Includes registration, renewal, and transfer prices. **Rate limit:** Configurable per API key. Default is 10 checks per 10 seconds per account (raised from 1 per 10 seconds in 3.29). The window is intentionally 10 seconds rather than 1, so a batch of candidate names can be checked back-to-back. `/domain/checkSingleDomain` draws on the same budget. Rate limit usage is returned in the `limits` field of the response. **Sustained bulk checking.** An account that checks about 1,800 names over three hours while registering little of what it checks (fewer than one domain per 200 names over a day) is treated as scanning for the next 24 hours: its checks, single and bulk, on every API version, share a budget of 50 names per 5 minutes. Over it, the call is refused whole with `RATE_LIMIT_EXCEEDED`, `reason: "SUSTAINED_BULK_CHECKING"` and `retryAfter`; nothing is part-answered. Normal use, including checking a long list of candidate names once, is nowhere near this. Accounts that buy (100 or more registrations in a year) and affiliates sending orders are never treated as scanning, and a per-key limit from support overrides it. */
1886
2928
  export declare const domainCheckDomain: API.OperationMethod<DomainCheckDomainRequest, CheckDomainResponse, DomainCheckDomainError, PorkbunOpContext>;
1887
2929
  export type DomainCreateGlueError = BadRequest | PorkbunOpError;
1888
2930
  /** Create glue record Create a glue record (host object) for a nameserver hostname under the domain. Use this when you want to host a nameserver at a subdomain of the domain itself (e.g. ns1.example.com). */
@@ -1900,28 +2942,37 @@ export type DomainGetGlueError = BadRequest | PorkbunOpError;
1900
2942
  /** Get glue records Retrieve all glue records (host objects) registered under the domain. Supports both GET (with header auth) and POST (with body or header auth). */
1901
2943
  export declare const domainGetGlue: API.OperationMethod<DomainGetGlueRequest, DomainGetGlueResponse, DomainGetGlueError, PorkbunOpContext>;
1902
2944
  export type DomainGetNsError = BadRequest | PorkbunOpError;
1903
- /** Get nameservers Retrieve the authoritative nameservers listed at the registry for the domain. Supports both GET (with header auth) and POST (with body or header auth). */
2945
+ /** Get nameservers Retrieve the authoritative nameservers listed at the registry for the domain. Supports both GET (with header auth) and POST (with body or header auth). **Nameservers are an unordered set.** This reads live from the registry, and registries are free to return the set in any order — so the order here will often differ from the order you sent to `/domain/updateNs`. Order carries no meaning in DNS (an NS RRset is unordered, RFC 1034/2181) and is not preserved by the parent zone. Compare nameservers as a set; if you are writing a Terraform provider or similar, model this as a set, not an ordered list, or every plan will show phantom drift. */
1904
2946
  export declare const domainGetNs: API.OperationMethod<DomainGetNsRequest, DomainGetNsResponse, DomainGetNsError, PorkbunOpContext>;
1905
2947
  export type DomainGetRegistrationRequirementsError = BadRequest | PorkbunOpError;
1906
2948
  /** Get TLD registration requirements (JSON Schema) Machine-readable registration requirements for a TLD. Returns whether the TLD is registerable via the API (`apiRegisterable`), the `/domain/create` request body as a JSON Schema, the fixed registration term, WHOIS-privacy/validated-address/registrant-only flags, and — for TLDs with registry eligibility rules (e.g. .us nexus, .ca legal type) — a second JSON Schema (`registryRequirements`) enumerating those fields with allowed values and labels. Call this before /domain/create to know upfront whether and how a TLD can be registered. Read-only; GET (header auth) or POST (body or header auth). */
1907
2949
  export declare const domainGetRegistrationRequirements: API.OperationMethod<DomainGetRegistrationRequirementsRequest, DomainGetRegistrationRequirementsResponse, DomainGetRegistrationRequirementsError, PorkbunOpContext>;
2950
+ export type DomainGetTransferSetupError = BadRequest | PorkbunOpError;
2951
+ /** State of an in-flight inbound transfer Where a pending inbound transfer is and what it is waiting on: whether it is held at `PENDINGDNS`, whether its DNS zone exists, how many records are in it, what the domain currently delegates to, and the next step to take. Use it to resume a no-downtime transfer without keeping state of your own. */
2952
+ export declare const domainGetTransferSetup: API.OperationMethod<DomainGetTransferSetupRequest, DomainGetTransferSetupResponse, DomainGetTransferSetupError, PorkbunOpContext>;
1908
2953
  export type DomainGetUrlForwardingError = BadRequest | PorkbunOpError;
1909
2954
  /** List URL forwards Retrieve all active URL forwards for a domain. Supports both GET (with header auth) and POST (with body or header auth). */
1910
2955
  export declare const domainGetUrlForwarding: API.OperationMethod<DomainGetUrlForwardingRequest, GetUrlForwardingResponse, DomainGetUrlForwardingError, PorkbunOpContext>;
2956
+ export type DomainStartTransferError = BadRequest | PorkbunOpError;
2957
+ /** Release a held transfer to the registry Release a transfer held at `PENDINGDNS` into the registry pipeline. Nothing releases a held transfer on a timer — this call is the only thing that does. Refuses with `TRANSFER_ZONE_EMPTY` if the zone has no records, which is the outage the hold exists to prevent. Pass `force: true` only if the domain genuinely needs no DNS at Porkbun. Supports `dryRun`. */
2958
+ export declare const domainStartTransfer: API.OperationMethod<DomainStartTransferRequest, DomainStartTransferResponse, DomainStartTransferError, PorkbunOpContext>;
1911
2959
  export type DomainUpdateAutoRenewError = BadRequest | PorkbunOpError;
1912
2960
  /** Update auto-renew setting Update the auto-renew setting for one or more domains. The domain can be passed in the URL path or in the `domains` array in the request body (or both). Both are combined and deduplicated. */
1913
2961
  export declare const domainUpdateAutoRenew: API.OperationMethod<DomainUpdateAutoRenewRequest, DomainUpdateAutoRenewResponse, DomainUpdateAutoRenewError, PorkbunOpContext>;
1914
2962
  export type DomainUpdateContactsError = BadRequest | PorkbunOpError;
1915
- /** Update domain contacts Edit the domain's contacts. Send a `contacts` object keyed by role (`registrant`, `admin`, `tech`, `billing`) containing ANY subset of roles — unspecified roles keep their current values — or a single `contact` object to apply to all four. Behaves like the website: on thick TLDs the change is pushed to the registry, and a **registrant** change (name/organization/email) triggers the same material-change record and new-owner notice/verification email (no 60-day transfer lock is imposed). Per-TLD extension data (e.g. .us nexus, .ca legalType) is preserved. Supports `dryRun`. **Address-validated TLDs.** On a **registrant** change for a TLD that requires a validated address (`.de`, `.nrw`, `.uk`/`.co.uk`/…, `.us`, `.ca`, `.nyc`, `.au`, `.eu`, `.in`/`.co.in`/…, `.nz`/`.co.nz`/…), the API runs Google Address Validation (per-account rate-limited + 24h cached). If the address needs correction the call returns `ADDRESS_VALIDATION_REQUIRED` with a `suggestedAddress` and `addressValidationStatus`; re-submit with `addressValidationChoice` = `accept_suggestion` (save the standardized address) or `use_as_entered` (keep yours — stays blocked if a real correction was offered). For `.de`, DENIC registry verification is then attempted automatically (address-fingerprint / email); if it still needs a proof-of-address document upload, that is completed at porkbun.com. **Still not supported via API:** a registrant name/organization change on a `.au` domain is an auDA paid ownership trade and returns `REGISTRANT_CHANGE_NOT_SUPPORTED` (do it at porkbun.com). Admin/tech/billing edits are unaffected everywhere. */
2963
+ /** Update domain contacts Edit the domain's contacts. Send a `contacts` object keyed by role (`registrant`, `admin`, `tech`, `billing`) containing ANY subset of roles — unspecified roles keep their current values — or a single `contact` object to apply to all four. Behaves like the website: on thick TLDs the change is pushed to the registry, and a **registrant** change (name/organization/email) triggers the same material-change record and new-owner notice/verification email (no 60-day transfer lock is imposed). Per-TLD extension data (e.g. .us nexus, .ca legalType) is preserved. Supports `dryRun`. **`state` is matched against the official list for the country**, the same list the website's dropdown is built from, so case, accents and short codes all work: `NEW JERSEY`, `new jersey` and `NJ` are all stored as `New Jersey`, and `MEXICO CITY` as `Mexico City`. This matters because some registries validate the field and compare it case sensitively — .mx refuses `NEW JERSEY` and requires `Ciudad de México` for Mexico City, which Porkbun substitutes for you. For a TLD whose registry validates the field (currently the .mx family) a state that matches nothing is refused up front with `INVALID_STATE`, and the response lists every accepted value for that country in `validStates` — better than the registry's own "Object does not exist". For every other TLD an unrecognised state is sent through unchanged rather than rewritten. If a registry then refuses it, the contact is NOT created and no contacts are changed; the error names the registry's complaint. **Address-validated TLDs.** On a **registrant** change for a TLD that requires a validated address (`.de`, `.nrw`, `.uk`/`.co.uk`/…, `.us`, `.ca`, `.nyc`, `.au`, `.eu`, `.in`/`.co.in`/…, `.nz`/`.co.nz`/…), the API runs Google Address Validation (per-account rate-limited + 24h cached). If the address needs correction the call returns `ADDRESS_VALIDATION_REQUIRED` with a `suggestedAddress` and `addressValidationStatus`; re-submit with `addressValidationChoice` = `accept_suggestion` (save the standardized address) or `use_as_entered` (keep yours — stays blocked if a real correction was offered). For `.de`, DENIC registry verification is then attempted automatically (address-fingerprint / email); if it still needs a proof-of-address document upload, that is completed at porkbun.com. **Still not supported via API:** a registrant name/organization change on a `.au` domain is an auDA paid ownership trade and returns `REGISTRANT_CHANGE_NOT_SUPPORTED` (do it at porkbun.com). Admin/tech/billing edits are unaffected everywhere. */
1916
2964
  export declare const domainUpdateContacts: API.OperationMethod<DomainUpdateContactsRequest, DomainUpdateContactsResponse, DomainUpdateContactsError, PorkbunOpContext>;
1917
2965
  export type DomainUpdateGlueError = BadRequest | PorkbunOpError;
1918
2966
  /** Update glue record Update the IP addresses of a glue record. All existing IP addresses are replaced with the supplied list. */
1919
2967
  export declare const domainUpdateGlue: API.OperationMethod<DomainUpdateGlueRequest, BasicResponse, DomainUpdateGlueError, PorkbunOpContext>;
1920
2968
  export type DomainUpdateNsError = BadRequest | PorkbunOpError;
1921
- /** Update nameservers Update the nameservers for the domain at the registry. */
2969
+ /** Update nameservers Update the nameservers for the domain at the registry. The list you send is applied as a set — the registry may store and return it in a different order, so do not expect `/domain/getNs` to echo your ordering back. See `/domain/getNs`. */
1922
2970
  export declare const domainUpdateNs: API.OperationMethod<DomainUpdateNsRequest, BasicResponse, DomainUpdateNsError, PorkbunOpContext>;
2971
+ export type DomainUpdateTransferAuthCodeError = BadRequest | PorkbunOpError;
2972
+ /** Replace the auth code on a stuck transfer Replace the authorization code on an inbound transfer that stalled because the code was wrong, and re-queue it — instead of cancelling, refunding and re-submitting. The new code is validated against the registry before it is stored, so a bad code is rejected here (`INVALID_AUTH_CODE`) rather than failing again later. Only transfers in a repairable state qualify; anything else returns `TRANSFER_NOT_REPAIRABLE`. Supports `dryRun`. */
2973
+ export declare const domainUpdateTransferAuthCode: API.OperationMethod<DomainUpdateTransferAuthCodeRequest, DomainUpdateTransferAuthCodeResponse, DomainUpdateTransferAuthCodeError, PorkbunOpContext>;
1923
2974
  export type EditDnsError = BadRequest | PorkbunOpError;
1924
- /** Edit DNS record by ID Edit a specific DNS record by its numeric ID. SOA and default Porkbun NS records cannot be edited. */
2975
+ /** Edit DNS record by ID Edit a specific DNS record by its numeric ID. Send only the fields you want to change: any field left out keeps its current value (send `"name": ""` to move the record to the apex). SOA and default Porkbun NS records cannot be edited. */
1925
2976
  export declare const editDns: API.OperationMethod<EditDnsRequest, BasicResponse, EditDnsError, PorkbunOpContext>;
1926
2977
  export type EmailSetPasswordError = BadRequest | PorkbunOpError;
1927
2978
  /** Set email hosting password Set the password for an email hosting account associated with a domain managed by your API key. */
@@ -1933,11 +2984,20 @@ export type GetApikeyError = BadRequest | Forbidden | PorkbunOpError;
1933
2984
  /** Poll for API key approval Poll to check whether the account holder has approved an API key authorization request. Returns `status: PENDING` while awaiting approval. On approval, returns the public API key. For a **PKCE** request (one created with a codeChallenge), pass the matching codeVerifier here to receive BOTH keys once (secretapikey is included in that single response and never again); the secret must be claimed within 10 minutes of approval or the request expires (`REQUEST_EXPIRED`) and a new one is needed. For a **legacy** request the secret API key is never transmitted via this endpoint — it is displayed in the user's browser and must be pasted into the application. **Rate limit:** 120 requests per IP per 3600 seconds. */
1934
2985
  export declare const getApikey: API.OperationMethod<GetApikeyRequest, GetApikeyResponse, GetApikeyError, PorkbunOpContext>;
1935
2986
  export type GetApiSettingsError = PorkbunOpError;
1936
- /** Get API spend settings Returns the account's API spend control settings and current month's spend total. All amounts are in cents. Authenticate using `X-API-Key` and `X-Secret-API-Key` headers, or `Authorization: Bearer <token>`. */
2987
+ /** Get API spend settings Returns the account's API spend control settings, this month's spend, and the limits actually enforced: `spendLimit` on purchases and `topupLimit` on credit added over the API. The account holder sets the limit on the website (https://porkbun.com/account/api); it cannot be changed over the API. All amounts are in cents. Authenticate using `X-API-Key` and `X-Secret-API-Key` headers, or `Authorization: Bearer <token>`. */
1937
2988
  export declare const getApiSettings: API.OperationMethod<GetApiSettingsRequest, ApiSettingsResponse, GetApiSettingsError, PorkbunOpContext>;
2989
+ export type GetAutoTopupError = PorkbunOpError;
2990
+ /** Read auto top-up settings What auto top-up is set to, whether a payment method is on file, and what `POST /account/topup` would charge right now (`effectiveAmount`). Auto top-up is how unattended work stops dead-ending on `INSUFFICIENT_FUNDS`: when an order drops the balance below `threshold`, Porkbun charges the saved payment method for `amount` and adds the credit. If `paymentMethodOnFile` is false the settings are inert and the response says so in `warnings` — a card can only be saved on the website, never over the API. */
2991
+ export declare const getAutoTopup: API.OperationMethod<GetAutoTopupRequest, AutoTopupResponse, GetAutoTopupError, PorkbunOpContext>;
1938
2992
  export type GetBalanceError = PorkbunOpError;
1939
2993
  /** Get account balance Returns the available account credit balance. Authenticate using `X-API-Key` and `X-Secret-API-Key` headers, or `Authorization: Bearer <token>`. */
1940
2994
  export declare const getBalance: API.OperationMethod<GetBalanceRequest, BalanceResponse, GetBalanceError, PorkbunOpContext>;
2995
+ export type GetCloseoutError = NotFound | PorkbunOpError;
2996
+ /** One closeout, with the binding total A single closeout plus `totalPrice` — the closeout price plus the registration year that comes with it. That total is what `/closeout/buy` will charge and what it expects back as `cost`. `localDomain` tells you which side of the pricing you are on: true means the name is already at Porkbun and is renewed, false means it is transferred in. `available` is false once somebody has claimed it. */
2997
+ export declare const getCloseout: API.OperationMethod<GetCloseoutRequest, GetCloseoutResponse, GetCloseoutError, PorkbunOpContext>;
2998
+ export type GetCloudflareError = PorkbunOpError;
2999
+ /** Get the Cloudflare move status for one domain Status of a single domain's move, including the zone id once created and the nameservers we replaced (kept so the move can be undone). `NOT_QUEUED` if the domain has never been queued. Also available via POST. **Status values** (poll until one of the terminal ones): Poll on a sensible interval (a few seconds early on, then back off) — a zone typically leaves `queued` within seconds but can sit in `setup` or `activating` while Cloudflare provisions the zone and DNS propagates. */
3000
+ export declare const getCloudflare: API.OperationMethod<GetCloudflareRequest, GetCloudflareResponse, GetCloudflareError, PorkbunOpContext>;
1941
3001
  export type GetDnsError = BadRequest | PorkbunOpError;
1942
3002
  /** Retrieve all DNS records Retrieve all editable DNS records for a domain. SOA records and Porkbun default NS records are excluded. Supports both GET (with header auth) and POST (with body or header auth). */
1943
3003
  export declare const getDns: API.OperationMethod<GetDnsRequest, DnsRecordsResponse, GetDnsError, PorkbunOpContext>;
@@ -1960,7 +3020,7 @@ export type GetDomainGlueError = BadRequest | PorkbunOpError;
1960
3020
  /** Get glue records Retrieve all glue records (host objects) registered under the domain. Supports both GET (with header auth) and POST (with body or header auth). */
1961
3021
  export declare const getDomainGlue: API.OperationMethod<GetDomainGlueRequest, GetDomainGlueResponse, GetDomainGlueError, PorkbunOpContext>;
1962
3022
  export type GetDomainNsError = BadRequest | PorkbunOpError;
1963
- /** Get nameservers Retrieve the authoritative nameservers listed at the registry for the domain. Supports both GET (with header auth) and POST (with body or header auth). */
3023
+ /** Get nameservers Retrieve the authoritative nameservers listed at the registry for the domain. Supports both GET (with header auth) and POST (with body or header auth). **Nameservers are an unordered set.** This reads live from the registry, and registries are free to return the set in any order — so the order here will often differ from the order you sent to `/domain/updateNs`. Order carries no meaning in DNS (an NS RRset is unordered, RFC 1034/2181) and is not preserved by the parent zone. Compare nameservers as a set; if you are writing a Terraform provider or similar, model this as a set, not an ordered list, or every plan will show phantom drift. */
1964
3024
  export declare const getDomainNs: API.OperationMethod<GetDomainNsRequest, GetDomainNsResponse, GetDomainNsError, PorkbunOpContext>;
1965
3025
  export type GetDomainsError = BadRequest | PorkbunOpError;
1966
3026
  /** List all domains Retrieve domains in the authenticated account. Results are returned in chunks of up to 1000 domains. Use `start` to paginate. **Filtering:** all filter parameters are optional. Combine them freely. - `domain` — exact match (returns 0 or 1) - `nameContains` — substring search - `tlds` — limit to these TLDs - `expiringWithinDays` — only domains expiring within N days - `autoRenew` — `yes` / `no` - `apiAccess` — `yes` / `no` (filter to domains the API key can operate on) - `sortName` — `domain` / `tld` / `create_date` / `expire_date` - `sortDirection` — `asc` / `desc` Supports both GET (with header auth) and POST (with body or header auth). For multi-value `tlds` on GET, use bracket syntax: `?tlds[]=com&tlds[]=io`. */
@@ -1971,17 +3031,23 @@ export declare const getDomainUrlForwarding: API.OperationMethod<GetDomainUrlFor
1971
3031
  export type GetHostingError = BadRequest | PorkbunOpError;
1972
3032
  /** Get hosting status (either product) **Applies to:** Both products. Return the Secure Static Hosting status for a domain (plan, server, trial, expiry, auto-renew), or `hosting: null` if none. Also available via POST. */
1973
3033
  export declare const getHosting: API.OperationMethod<GetHostingRequest, GetHostingResponse, GetHostingError, PorkbunOpContext>;
3034
+ export type GetInvoiceError = NotFound | PorkbunOpError;
3035
+ /** Get an invoice One invoice as data: bill-to details, payment method (card brand and last four only), each line with its term and resulting domain expiry, and gross, refunded and net totals. The same figures as the PDF. */
3036
+ export declare const getInvoice: API.OperationMethod<GetInvoiceRequest, GetInvoiceResponse, GetInvoiceError, PorkbunOpContext>;
3037
+ export type GetInvoicePdfError = NotFound | PorkbunOpError;
3038
+ /** Download an invoice PDF The invoice as a PDF, base64-encoded in `contentBase64`: the same document as Download PDF on porkbun.com. Decode it and save it as `filename`. */
3039
+ export declare const getInvoicePdf: API.OperationMethod<GetInvoicePdfRequest, GetInvoicePdfResponse, GetInvoicePdfError, PorkbunOpContext>;
1974
3040
  export type GetIpError = PorkbunOpError;
1975
3041
  /** Get caller IP address Returns the caller's public IP address. No credentials required. Use the `api-ipv4.porkbun.com` hostname if you need to force an IPv4 address. */
1976
3042
  export declare const getIp: API.OperationMethod<GetIpRequest, IpResponse, GetIpError, PorkbunOpContext>;
1977
3043
  export type GetPingError = BadRequest | PorkbunOpError;
1978
3044
  /** Test credentials and get caller IP Returns the caller's public IP address. Optionally validates API credentials. - **No credentials supplied** — returns IP only. - **Valid credentials supplied** — returns IP with `credentialsValid: true`. - **Invalid credentials supplied** — returns an error. Useful for agents and clients to verify their API key is working before making other calls. */
1979
3045
  export declare const getPing: API.OperationMethod<GetPingRequest, GetPingResponse, GetPingError, PorkbunOpContext>;
1980
- export type GetPricingError = PorkbunOpError;
1981
- /** Retrieve domain pricing (public) Retrieve default domain pricing information for all supported TLDs. Does not require authentication. Prices are in US dollars. */
3046
+ export type GetPricingError = BadRequest | PorkbunOpError;
3047
+ /** Retrieve domain pricing (public) Retrieve default domain pricing information for all supported TLDs, or only the ones you ask for. Does not require authentication. Prices are in US dollars. Filter with `tld` (one TLD) and/or `tlds` (several). Names are case-insensitive, a leading dot is ignored, and IDN TLDs may be sent in Unicode or punycode (`みんな` or `xn--q9jyb4c`). A TLD Porkbun does not sell is left out of `pricing` and listed in `unsupported`; if none of the requested TLDs is sold the response is `INVALID_TLD` (HTTP 400). No filter returns every TLD. */
1982
3048
  export declare const getPricing: API.OperationMethod<GetPricingRequest, GetPricingResponse, GetPricingError, PorkbunOpContext>;
1983
- export type GetPricingGetError = PorkbunOpError;
1984
- /** Retrieve domain pricing (public) Retrieve default domain pricing information for all supported TLDs. Does not require authentication. Prices are in US dollars. This GET form returns pricing for all TLDs. To filter by specific TLDs, use `POST /pricing/get` with a `tlds` array in the request body. */
3049
+ export type GetPricingGetError = BadRequest | PorkbunOpError;
3050
+ /** Retrieve domain pricing (public) Retrieve default domain pricing information for all supported TLDs, or only the ones you ask for. Does not require authentication. Prices are in US dollars. Filter with `tld` (one TLD) and/or `tlds` (several). Names are case-insensitive, a leading dot is ignored, and IDN TLDs may be sent in Unicode or punycode (`みんな` or `xn--q9jyb4c`). A TLD Porkbun does not sell is left out of `pricing` and listed in `unsupported`; if none of the requested TLDs is sold the response is `INVALID_TLD` (HTTP 400). No filter returns every TLD. On GET, `tlds` is comma-separated: `?tlds=com,io,dev`. */
1985
3051
  export declare const getPricingGet: API.OperationMethod<GetPricingGetRequest, GetPricingGetResponse, GetPricingGetError, PorkbunOpContext>;
1986
3052
  export type GetSslError = BadRequest | PorkbunOpError;
1987
3053
  /** Retrieve SSL bundle Retrieve the Let's Encrypt SSL certificate bundle for a domain. The certificate must already be issued (status HAVECERT). Token-based access is not supported for this endpoint. Supports both GET (with header auth) and POST (with body or header auth). */
@@ -1999,7 +3065,7 @@ export type HostingCreateWpCredentialsError = BadRequest | PorkbunOpError;
1999
3065
  /** Mint WordPress REST API credentials (WordPress only) **Applies to:** Cloud for WordPress only. Creates a WordPress **Application Password** so an agent or integration can drive the site over the WP REST API at `https://{domain}/wp-json/` using HTTP Basic auth. The password is returned **once** — WordPress stores only a hash. Defaults to a dedicated least-privilege `porkbun-agent` user with the `editor` role (created on first use), which can manage content but not install code. `role: "administrator"` grants full site control **including plugin installation (arbitrary code execution on the site)** and therefore requires `acknowledgeFullAccess: true`. Revoke any time via `/hosting/deleteWpCredentials/{domain}` or in wp-admin under Users → Profile. Requires the site to be provisioned and ACTIVE (poll `/hosting/get/{domain}`). Free **preview** sites (the $0 parked plan) are excluded — they return `PREVIEW_SITE_NOT_SUPPORTED`; upgrade to a paid plan first. Works on any Cloud for WordPress site in the account regardless of whether it was provisioned via the API or the website, including sites migrated onto WP Cloud from the legacy WordPress product. For `role: "administrator"` the site's actual administrator account is looked up rather than assumed, so a renamed admin user is handled. **Rate limit:** 20 mints per account per hour (`dryRun` calls are free). */
2000
3066
  export declare const hostingCreateWpCredentials: API.OperationMethod<HostingCreateWpCredentialsRequest, HostingCreateWpCredentialsResponse, HostingCreateWpCredentialsError, PorkbunOpContext>;
2001
3067
  export type HostingDeleteFileError = BadRequest | PorkbunOpError;
2002
- /** Delete a site file (static hosting only) **Applies to:** Secure Static Hosting only — a WordPress site returns `NOT_SUPPORTED_FOR_PRODUCT`. Delete a file (or empty directory) at `path` in the domain's hosting space. */
3068
+ /** Delete a site file (static hosting only) **Applies to:** Secure Static Hosting only — a WordPress site returns `NOT_SUPPORTED_FOR_PRODUCT`. Delete a file or directory at `path` in the domain's hosting space. Idempotent: a path that is already gone returns `SUCCESS` with `alreadyAbsent: true`. A directory that still has files returns `HOSTING_DIR_NOT_EMPTY` with its `contents`, unless `recursive: true` is sent, which deletes it with everything inside (the site root can never be deleted). */
2003
3069
  export declare const hostingDeleteFile: API.OperationMethod<HostingDeleteFileRequest, HostingDeleteFileResponse, HostingDeleteFileError, PorkbunOpContext>;
2004
3070
  export type HostingDeleteWpCredentialsError = BadRequest | PorkbunOpError;
2005
3071
  /** Revoke WordPress application passwords (WordPress only) **Applies to:** Cloud for WordPress only. Revokes an application password by `uuid` (from `/hosting/getWpCredentials`), or every one for the user with `all: true`. Any integration using it stops authenticating immediately. Free preview sites are excluded (`PREVIEW_SITE_NOT_SUPPORTED`). */
@@ -2016,9 +3082,15 @@ export declare const hostingMakeDir: API.OperationMethod<HostingMakeDirRequest,
2016
3082
  export type HostingPlansError = BadRequest | PorkbunOpError;
2017
3083
  /** List provisionable hosting plans (static + WordPress) **Applies to:** Both products. List the hosting plans that can be provisioned via the API, with price, interval, trial length, and features. Pass a row's `plan` to `/hosting/create` and its `price` (cents) as `acknowledgedCost`. Currently Secure Static Hosting; more products are added over time. Also available via POST. Includes both Secure Static Hosting and Cloud for WordPress (managed WordPress) plans; the `product` field distinguishes them. */
2018
3084
  export declare const hostingPlans: API.OperationMethod<HostingPlansRequest, HostingPlansResponse, HostingPlansError, PorkbunOpContext>;
3085
+ export type ImportDnsError = BadRequest | PorkbunOpError;
3086
+ /** Bulk-create DNS records (transfer restore) Create many records in one call, so a domain arriving from another registrar keeps resolving instead of going dark. Send `records` to import an exact list — the better path when the old registrar has an API you can read with your own credentials. Omit `records` entirely and whatever `/dns/scan/{domain}` can discover is imported instead. **Idempotent.** A record that already exists is counted in `skipped`, not `failed`, so this is safe to re-run and safe to use as a converge step. Records that fail individually are listed in `failures` while the rest still import; the call only errors outright if nothing was importable. Imported records do nothing until the domain actually points at the Porkbun nameservers — check `/domain/getNs/{domain}` and set them with `/domain/updateNs/{domain}`. Maximum 500 records per call. Supports `dryRun`. */
3087
+ export declare const importDns: API.OperationMethod<ImportDnsRequest, ImportDnsResponse, ImportDnsError, PorkbunOpContext>;
2019
3088
  export type ListDomainsError = BadRequest | PorkbunOpError;
2020
3089
  /** List all domains Retrieve domains in the authenticated account. Results are returned in chunks of up to 1000 domains. Use `start` to paginate. **Filtering:** all filter parameters are optional. Combine them freely. - `domain` — exact match (returns 0 or 1) - `nameContains` — substring search - `tlds` — limit to these TLDs - `expiringWithinDays` — only domains expiring within N days - `autoRenew` — `yes` / `no` - `apiAccess` — `yes` / `no` (filter to domains the API key can operate on) - `sortName` — `domain` / `tld` / `create_date` / `expire_date` - `sortDirection` — `asc` / `desc` Supports both GET (with header auth) and POST (with body or header auth). For multi-value `tlds` on GET, use bracket syntax: `?tlds[]=com&tlds[]=io`. */
2021
3090
  export declare const listDomains: API.OperationMethod<ListDomainsRequest, DomainListAllResponse, ListDomainsError, PorkbunOpContext>;
3091
+ export type ListInvoicesError = PorkbunOpError;
3092
+ /** List invoices The account's invoices (one per order), newest first, like the orders page on porkbun.com. `total_cents` is what the customer was left paying: refunds are netted out, and `state` says whether the invoice is paid, refunded or partially refunded. Any of the account's API keys can read them. */
3093
+ export declare const listInvoices: API.OperationMethod<ListInvoicesRequest, ListInvoicesResponse, ListInvoicesError, PorkbunOpContext>;
2022
3094
  export type ListMarketplaceListingsError = BadRequest | PorkbunOpError;
2023
3095
  /** List marketplace domains Retrieve domains listed on the Porkbun marketplace. Two modes: - **Unfiltered (default):** paginated raw listing, up to 5000 entries per call via `start` / `limit`. - **Filtered:** when any of `query`, `tlds`, `sldLengthMin`, `sldLengthMax`, or `sortName` is provided, results are filtered server-side. Filtered mode returns up to 1000 matching listings (matches the web UI's marketplace search). `query` supports `+include` and `-exclude` prefixes per word against the SLD (e.g. `+ai -test` matches SLDs containing 'ai' but not 'test'). Token-based access is not supported. */
2024
3096
  export declare const listMarketplaceListings: API.OperationMethod<ListMarketplaceListingsRequest, ListMarketplaceListingsResponse, ListMarketplaceListingsError, PorkbunOpContext>;
@@ -2043,8 +3115,11 @@ export declare const ping: API.OperationMethod<PingRequest, PingResponse, PingEr
2043
3115
  export type PostIpError = PorkbunOpError;
2044
3116
  /** Get caller IP address Returns the caller's public IP address. No credentials required. Use the `api-ipv4.porkbun.com` hostname if you need to force an IPv4 address. */
2045
3117
  export declare const postIp: API.OperationMethod<PostIpRequest, IpResponse, PostIpError, PorkbunOpContext>;
3118
+ export type PreviewCloudflareError = PorkbunOpError;
3119
+ /** Preview exactly which records a move would copy Which DNS records we would create in Cloudflare for this domain, and which we would drop, **without queueing anything**. The honest answer to "what will this do to my DNS" before committing. Records are always created DNS-only (grey cloud); use `/cloudflare/setProxy` afterwards to turn the proxy on. Also available via POST. */
3120
+ export declare const previewCloudflare: API.OperationMethod<PreviewCloudflareRequest, PreviewCloudflareResponse, PreviewCloudflareError, PorkbunOpContext>;
2046
3121
  export type RenewDomainError = BadRequest | PorkbunOpError;
2047
- /** Renew a domain Renew a domain using account credit. Requirements: - Domain must be in your account and active - Domain must be opted in to API access - Account email and phone must be verified - Account must have sufficient credit - `cost` must equal the current renewal price for the domain's minimum renewal duration (in pennies) - Domain must have been registered more than 30 days ago (checked against the domain's creation date) - Domain must not have been successfully renewed within the last 30 days - Premium renewals are not currently supported via API Renewals are always for the registry-minimum duration (usually 1 year). Use `/domain/checkDomain/{domain}` with `priceType=renewal` to get the current price before renewing. **Rate limits (both apply):** - Attempt limit (default: 1 attempt per 10 seconds per account) - Success limit (default: 50 successful renewals per 86400 seconds per account) Both limits are configurable per API key and their current values are returned in the `limits` field of the response. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT renewing or charging — nothing is created. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "renewal", "domain": "example.com", "tld": "com", "available": "unavailable", "premium": false, "duration": 1, "cost": 1099, "costDisplay": "$10.99", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this renewal would succeed and cost $10.99. No order was created and no charge was made.", "requestId": "019e04fa-3c11-7a02-9bd2-1f7c0e4a8b55" } ``` */
3122
+ /** Renew a domain Renew a domain, paid from account credit or directly in USDC. Requirements: - Domain must be in your account and active - Domain must be opted in to API access - Account email and phone must be verified - Sufficient account credit, or `"payWith": "usdc"` to pay directly - `cost` must equal the current renewal price for the domain's minimum renewal duration (in pennies) - Domain must have been registered more than 30 days ago (checked against the domain's creation date) - Domain must not have been successfully renewed within the last 30 days - Premium renewals are not currently supported via API Renewals are always for the registry-minimum duration (usually 1 year). Use `/domain/checkDomain/{domain}` with `priceType=renewal` to get the current price before renewing. **Rate limits (both apply):** - Attempt limit (default: 1 attempt per second per account) - Success limit (default: 1000 successful renewals per 86400 seconds per account) Both limits are configurable per API key and their current values are returned in the `limits` field of the response. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT renewing or charging — nothing is created. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "renewal", "domain": "example.com", "tld": "com", "available": "unavailable", "premium": false, "duration": 1, "cost": 1099, "costDisplay": "$10.99", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this renewal would succeed and cost $10.99. No order was created and no charge was made.", "requestId": "019e04fa-3c11-7a02-9bd2-1f7c0e4a8b55" } ``` **Paying for it.** Two ways. **From prepaid account credit** (the default): no card on file is charged at purchase time, so the balance has to be there first. Read it with `GET /account/balance`; add to it with `POST /account/topup` (a saved card, with the account holder's OK), `POST /account/topupMpp` (the user's card from a Stripe Link agent wallet), `POST /account/topupCrypto` (USDC) or at https://porkbun.com/account/credit, and auto top-up at https://porkbun.com/account/api keeps it filled. Too little credit returns `INSUFFICIENT_FUNDS` with `cost`, `balance`, `shortfall` and `usdcAmountToCover` in cents. **Or directly in USDC:** add `"payWith": "usdc"` and an x402 client pays the HTTP 402 this returns (`PAYMENT_REQUIRED`, terms in the `PAYMENT-REQUIRED` header) and repeats the request with `PAYMENT-SIGNATURE`; no credit is needed, and if the purchase fails the payment stays on the account as credit (https://porkbun.com/llms/guides/pay-with-usdc-x402). Either way the account's monthly API spend limit applies ($100 a month until the account holder sets their own; `MONTHLY_SPEND_LIMIT_EXCEEDED`). `dryRun: true` reports cost and balance without charging, and `dryRun` with `cost: 0` returns a quote. */
2048
3123
  export declare const renewDomain: API.OperationMethod<RenewDomainRequest, RenewDomainResponse2, RenewDomainError, PorkbunOpContext>;
2049
3124
  export type ResendWebhookError = BadRequest | NotFound | PorkbunOpError;
2050
3125
  /** Resend a delivery Re-queue a past delivery to its endpoint. Clones it into a fresh attempt reusing the ORIGINAL event id (so consumers that dedupe on X-Porkbun-Webhook-Id treat it as the same event). The endpoint must still exist and be ACTIVE. The original delivery row is left intact as history. */
@@ -2052,20 +3127,47 @@ export declare const resendWebhook: API.OperationMethod<ResendWebhookRequest, We
2052
3127
  export type ResetSandboxError = PorkbunOpError;
2053
3128
  /** Sandbox: reset to a clean slate Sandbox only (requires a `pk1_sb_` key). Wipes the sandbox account's simulated state (domains, DNS, orders, credit) and re-grants $1000 fake credit. */
2054
3129
  export declare const resetSandbox: API.OperationMethod<ResetSandboxRequest, ResetSandboxResponse, ResetSandboxError, PorkbunOpContext>;
3130
+ export type RestoreDnsError = NotFound | PorkbunOpError;
3131
+ /** Restore a zone to a previous state Put a zone back to a restore point. **What it does by default:** adds back every record in the restore point that is not live now. It does **not** remove records you have added since -- pass `prune: true` for that. "Restore my records" usually means "put back what I lost", not "delete everything I have done since", so the destructive half is opt-in. **This is itself reversible.** The zone's current state is snapshotted before anything changes and the new point's id comes back as `previousStateSavedAs`, so an unwanted restore is undone by restoring that. **Read `failed`.** Parking records and other masked types (`ALIAS`, `HTTPS`) are managed by another part of the platform and cannot be recreated this way. They come back named in `failed` rather than being counted as restored, so `restored` is a true count. SOA and NS are never touched. Supports `dryRun: true`, which reports exactly what would be added and removed and changes nothing. */
3132
+ export declare const restoreDns: API.OperationMethod<RestoreDnsRequest, DnsRestoreResponse, RestoreDnsError, PorkbunOpContext>;
3133
+ export type RetryCloudflareError = PorkbunOpError;
3134
+ /** Retry a failed or skipped domain Put a domain that failed or was skipped back in the queue. Fails with `RETRY_FAILED` if it is already connected, already in progress, or no longer in the account. Supports `dryRun`. */
3135
+ export declare const retryCloudflare: API.OperationMethod<RetryCloudflareRequest, RetryCloudflareResponse, RetryCloudflareError, PorkbunOpContext>;
2055
3136
  export type SandboxTopupError = PorkbunOpError;
2056
3137
  /** Sandbox: add fake credit Sandbox only (requires a `pk1_sb_` key). Grants fake account credit so paid operations can keep being exercised after funds run out. Optional `amount` in US cents (default 100000 = $1000, capped 1,000,000). */
2057
3138
  export declare const sandboxTopup: API.OperationMethod<SandboxTopupRequest, SandboxTopupResponse, SandboxTopupError, PorkbunOpContext>;
2058
3139
  export type SandboxTriggerWebhookError = PorkbunOpError;
2059
3140
  /** Sandbox: fire a sample webhook event Sandbox only (requires a `pk1_sb_` key). Enqueues a signed sample webhook event to your registered endpoints so you can test your handler and signature verification for any event type on demand — including cron-driven events like `domain.expiring` that don't result from a single API call. Register an endpoint first with `POST /webhook/create`. */
2060
3141
  export declare const sandboxTriggerWebhook: API.OperationMethod<SandboxTriggerWebhookRequest, SandboxTriggerWebhookResponse, SandboxTriggerWebhookError, PorkbunOpContext>;
3142
+ export type SearchCloseoutError = BadRequest | PorkbunOpError;
3143
+ /** Search expired-domain closeouts Search the closeout inventory. Closeouts are expired domains that did not sell at auction and are now offered at a fixed, descending price — there is no bidding, the first buyer at the current price takes the name. Every filter is optional; with none you get the first page of the whole list plus `totalAvailable`. Page with `start`/`limit` until `start >= totalAvailable`. **`age` and `registrationDate` are on every row and both are sortable.** On the website the inventory is paginated by price tier and registration date is not shown, so finding aged names means walking several tier pages and then doing a WHOIS lookup per candidate. `sortName=registrationDate&sortDirection=asc` returns the oldest registrations first in one call. `price` is the closeout price alone. The binding total adds the renewal or transfer year you are also buying, and comes from `/closeout/get/{domain}` — it cannot be derived from search results, because a domain already at Porkbun is renewed while anything else is transferred in, and those are priced differently. */
3144
+ export declare const searchCloseout: API.OperationMethod<SearchCloseoutRequest, SearchCloseoutResponse, SearchCloseoutError, PorkbunOpContext>;
3145
+ export type SetAutoTopupError = BadRequest | PorkbunOpError;
3146
+ /** Configure auto top-up Set the top-up amount, and/or switch auto top-up on or off. `amount` stands on its own. It is what a top-up adds, and `POST /account/topup` charges the same figure on demand, so setting it without automating anything is a normal call: `{"amount": 10000}`. `enabled: true` additionally makes it fire by itself and requires `threshold` (the balance, in integer US cents, below which a top-up happens) plus an amount — either in the same call or already on file. `enabled: false` stops it firing on a threshold and **keeps the amount**, because on-demand top-ups still use it. **`amount` set over the API is capped at $500** ($5 minimum), because that value is also what `POST /account/topup` charges — an API key free to set it to anything would be setting its own limit, which is not a limit. A larger amount set by the account holder at porkbun.com/account/api is honoured as-is. No card is touched here, and one cannot be added over the API. Supports `dryRun`. */
3147
+ export declare const setAutoTopup: API.OperationMethod<SetAutoTopupRequest, AutoTopupResponse, SetAutoTopupError, PorkbunOpContext>;
2061
3148
  export type TestWebhookError = BadRequest | NotFound | PorkbunOpError;
2062
3149
  /** Send a test event Enqueue a `webhook.test` event to the endpoint so you can confirm reachability and that your signature verification works. The endpoint must be ACTIVE. Delivery is asynchronous (usually within a minute). */
2063
3150
  export declare const testWebhook: API.OperationMethod<TestWebhookRequest, WebhookTestResponse, TestWebhookError, PorkbunOpContext>;
3151
+ export type TopupAccountCreditError = BadRequest | PorkbunOpError;
3152
+ /** Top up account credit now **Charges the saved payment method** and adds the money to account credit immediately. The call that unblocks work already in progress: enabling auto top-up does nothing until the next order trips the threshold, which is no help to a caller holding an `INSUFFICIENT_FUNDS` response right now. **`amount` is optional.** Omitted, it charges the account's configured top-up amount, or $50 if the account has never set one — `amountSource` in the response says which of `configured`, `default` or `request` applied. Supplied, it charges that figure for this call only and leaves the stored setting alone, which is the point: an agent could always have written the amount to `/account/autoTopup` first, and making it do that turns a one-off charge into a silent edit of a setting the customer owns. The card itself can only be saved outside the API, and a supplied amount is held to the same 500–50000 cent range as one set through `/account/autoTopup`. On top of that the dollars are bounded by the month: the account's **monthly spend limit** caps top-ups as well as domain spend (it is the account saying how much the API may move, and a card charge is the API moving money), and an account that has never set one still gets a $100/month ceiling. Card, auto top-ups set off by an API purchase, MPP and USDC all count toward it — `monthlyCeiling` and `ceilingSource` on `GET /account/autoTopup` say which is in force. Top-ups are also limited to 5 per day and 20 per month (`TOPUP_LIMIT_EXCEEDED`), and every successful charge emails the account holder. Errors that matter: `NO_PAYMENT_METHOD` (nothing saved to charge — the account holder has to save a card or buy credit on the website), `CARD_DECLINED` (nothing was added; the card needs attention), `TOPUP_FAILED` (nothing was charged; retry once). With a sandbox key this grants simulated credit and charges nothing (`simulated: true`). Supports `dryRun`, which previews the amount and charges nothing in any environment. Honours `Idempotency-Key`. */
3153
+ export declare const topupAccountCredit: API.OperationMethod<TopupAccountCreditRequest, TopupAccountCreditResponse, TopupAccountCreditError, PorkbunOpContext>;
3154
+ export type TopupCryptoError = PorkbunOpError;
3155
+ /** Top up credit with USDC (x402) Opens a Coinbase checkout to add account credit with USDC on Base, the same as Use Crypto on porkbun.com. Nothing is charged by this call. Pay it either way: - `x402Url`: an AI agent with a wallet pays it directly over x402 (a gasless USDC transfer on Base, no page or person involved). This is how an agent gets past `INSUFFICIENT_FUNDS` on an account with no saved card. - `payUrl`: a Coinbase page where a person pays. Credit is added when the payment confirms (usually within a minute), less Coinbase's fee of about 1% (`estimatedFee_cents`, `estimatedCredit_cents`). To cover an `INSUFFICIENT_FUNDS` shortfall exactly, open the checkout for its `usdcAmountToCover`. Check `GET /account/topupCryptoStatus/{checkoutId}`. Payments are on-chain and cannot be reversed. Needs a verified email and phone and an account that is not bank-transfer-only (`CRYPTO_NOT_AVAILABLE` otherwise). Up to 10 checkouts per account per day. USDC counts toward the same monthly ceiling as card and MPP top-ups (the monthly spend limit, or $100 when none is set), checked when the checkout is opened, with unpaid checkouts from the last day counted as if paid (`TOPUP_LIMIT_EXCEEDED`). Not available on sandbox keys (`SANDBOX_UNSUPPORTED`; use `/sandbox/topup`). */
3156
+ export declare const topupCrypto: API.OperationMethod<TopupCryptoRequest, TopupCryptoResponse, TopupCryptoError, PorkbunOpContext>;
3157
+ export type TopupCryptoStatusError = NotFound | PorkbunOpError;
3158
+ /** Status of a USDC top-up Whether a checkout from `POST /account/topupCrypto` has been paid and credited. `state`: ACTIVE (not paid), PROCESSING (paid, being credited), COMPLETED (credited), EXPIRED or FAILED. Returns the current balance too. */
3159
+ export declare const topupCryptoStatus: API.OperationMethod<TopupCryptoStatusRequest, TopupCryptoStatusResponse, TopupCryptoStatusError, PorkbunOpContext>;
3160
+ export type TopupMppError = PorkbunOpError;
3161
+ /** Top up credit with the user's card, paid by an agent (MPP) Returns a signed, single-use payment link (valid 15 minutes, bound to this account and amount) that an AI agent pays with the user's **card** over MPP, the Machine Payments Protocol (mpp.dev), using a Stripe Shared Payment Token from its agent wallet (Stripe's Link Agent Wallet). No card needs to be saved at Porkbun. Nothing is charged by this call. The agent's MPP client requests `payUrl` (POST) and gets HTTP `402` with a `WWW-Authenticate: Payment` challenge (`method="stripe"`, `intent="charge"`); its wallet mints a token for the user's card, the client retries with `Authorization: Payment <credential>`, and the credit is added at once: the response carries `credited_cents` and the new `balance_cents`, with a `Payment-Receipt` header. For example: `npx @stripe/link-cli mpp pay <payUrl> -X POST --context "..."`. Link refuses a `--context` shorter than 100 characters: it is what the user reads when approving the spend, so say what it is for and the dollar amount, worded fresh for each payment (Link can refuse an identical repeat). Same limits as card top-ups (`POST /account/topup`): $5-$500, the monthly ceiling, 5 a day and 20 a month (`TOPUP_LIMIT_EXCEEDED`). Not available on sandbox keys (`SANDBOX_UNSUPPORTED`). */
3162
+ export declare const topupMpp: API.OperationMethod<TopupMppRequest, TopupMppResponse, TopupMppError, PorkbunOpContext>;
2064
3163
  export type TransferDomainError = PorkbunOpError;
2065
- /** Initiate a domain transfer Initiates an inbound domain transfer to Porkbun using account credit. The transfer is processed asynchronously and typically takes 5–7 days to complete. **Requirements:** - Account email and phone must be verified. - Sufficient account credit to cover the transfer cost. - Domain must not already be in your account. - No other active transfer for the same domain. - `.uk` and manage-only TLDs are not supported via API. - Premium domain transfers are not supported via API. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT initiating the transfer or charging — nothing is created. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "transfer", "domain": "example.com", "tld": "com", "available": "unavailable", "premium": false, "duration": 1, "cost": 999, "costDisplay": "$9.99", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this transfer would succeed and cost $9.99. No order was created and no charge was made.", "requestId": "019e04fa-5f22-7c93-8a41-2e9d0b3f6c77" } ``` */
3164
+ /** Initiate a domain transfer Initiates an inbound domain transfer to Porkbun, paid from account credit or directly in USDC. The transfer is processed asynchronously and typically takes 5–7 days to complete. **Requirements:** - Account email and phone must be verified. - Sufficient account credit to cover the transfer cost, or `"payWith": "usdc"` to pay directly. - Domain must not already be in your account. - No other active transfer for the same domain. - `.uk` and manage-only TLDs are not supported via API. - Premium domain transfers are not supported via API. - Some registries refuse registrant contacts on temporary or encrypted email providers and suspend domains that use one. `.in` and its second levels are the first; a transfer whose registrant contact uses one is refused with `REGISTRANT_EMAIL_NOT_ACCEPTED` before any charge. This is about the contact recorded on the domain, not about who hosts mail for it. ## Dry run Add `dryRun: true` to validate everything and preview the cost WITHOUT initiating the transfer or charging — nothing is created. Example response: ```json { "status": "SUCCESS", "dryRun": true, "wouldSucceed": true, "operation": "transfer", "domain": "example.com", "tld": "com", "available": "unavailable", "premium": false, "duration": 1, "cost": 999, "costDisplay": "$9.99", "balance": 5000, "sufficientFunds": true, "message": "Dry run: this transfer would succeed and cost $9.99. No order was created and no charge was made.", "requestId": "019e04fa-5f22-7c93-8a41-2e9d0b3f6c77" } ``` **Paying for it.** Two ways. **From prepaid account credit** (the default): no card on file is charged at purchase time, so the balance has to be there first. Read it with `GET /account/balance`; add to it with `POST /account/topup` (a saved card, with the account holder's OK), `POST /account/topupMpp` (the user's card from a Stripe Link agent wallet), `POST /account/topupCrypto` (USDC) or at https://porkbun.com/account/credit, and auto top-up at https://porkbun.com/account/api keeps it filled. Too little credit returns `INSUFFICIENT_FUNDS` with `cost`, `balance`, `shortfall` and `usdcAmountToCover` in cents. **Or directly in USDC:** add `"payWith": "usdc"` and an x402 client pays the HTTP 402 this returns (`PAYMENT_REQUIRED`, terms in the `PAYMENT-REQUIRED` header) and repeats the request with `PAYMENT-SIGNATURE`; no credit is needed, and if the purchase fails the payment stays on the account as credit (https://porkbun.com/llms/guides/pay-with-usdc-x402). Either way the account's monthly API spend limit applies ($100 a month until the account holder sets their own; `MONTHLY_SPEND_LIMIT_EXCEEDED`). `dryRun: true` reports cost and balance without charging, and `dryRun` with `cost: 0` returns a quote. */
2066
3165
  export declare const transferDomain: API.OperationMethod<TransferDomainRequest, TransferDomainResponse2, TransferDomainError, PorkbunOpContext>;
3166
+ export type TransferDomainPrepareError = BadRequest | PorkbunOpError;
3167
+ /** Create the DNS zone for a held transfer Create the Porkbun DNS zone for a domain whose inbound transfer is held at `PENDINGDNS`, so records can be added **before** the domain moves. The zone is created deliberately rather than as a side effect of the first record write. Returns the Porkbun nameservers to point the domain at. Then load the zone with `/dns/import/{domain}` (or the `/dns/*` endpoints) and release with `/domain/startTransfer/{domain}`. Supports `dryRun`. */
3168
+ export declare const transferDomainPrepare: API.OperationMethod<TransferDomainPrepareRequest, TransferDomainPrepareResponse, TransferDomainPrepareError, PorkbunOpContext>;
2067
3169
  export type UpdateWebhookError = BadRequest | NotFound | PorkbunOpError;
2068
- /** Update a webhook endpoint Update an endpoint's URL, event subscriptions, and/or status. Only the supplied fields change. Set `status` to `DISABLED` to pause deliveries or `ACTIVE` to resume (resuming also resets the consecutive-failure counter). */
3170
+ /** Update a webhook endpoint Update an endpoint's URL, event subscriptions, and/or status. Only the supplied fields change. Set `status` to `DISABLED` to pause deliveries or `ACTIVE` to resume (resuming also resets the consecutive-failure counter). **URL requirements:** the endpoint must be an `https://` URL on the standard port 443, with a hostname that resolves to a public internet address. Private, loopback, link-local, CGNAT and other reserved ranges are refused (`INVALID_WEBHOOK_URL`) because Porkbun delivers from inside its own network. Credentials in the URL (`https://user:pass@host`) are also refused — authenticate the receiver by verifying the `X-Porkbun-Signature` HMAC instead. A hostname that does not resolve yet is accepted, so you can register the endpoint before the receiver is deployed, but delivery is re-checked against these rules immediately before each request. */
2069
3171
  export declare const updateWebhook: API.OperationMethod<UpdateWebhookRequest, WebhookEndpointResponse, UpdateWebhookError, PorkbunOpContext>;
2070
3172
  export type WebhookDeliveriesError = BadRequest | NotFound | PorkbunOpError;
2071
3173
  /** List webhook deliveries List recent delivery attempts across the account (newest first), optionally filtered by endpoint or status. The bulky payload is omitted — use GET /webhook/delivery/{id} for it. History is retained about 30 days. Read-only; supports GET (header auth) or POST (body or header auth). */