api.x402-hosting.com/v1/projects/:id/activate
Activate a newly created project so its site goes live, paying per day of hosting (1-730 days via the days query parameter). Call this after the first deployment is queued; only the owner wallet bound at creation can pay.
POST
https://api.x402-hosting.com/v1/projects/:id/activateUptime0.0% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.x402-hosting.com/v1/projects/:id/activate", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"days":1}),
});
console.log(await res.json());Example input
{
"days": 1
}More from x402 Hosting
- api.x402-hosting.com/v1/projects/:id/renewExtend a project's hosting lease, priced per day (1-730 days via the days query parameter). Call this when hosting is nearing expiry or to republish an expired site; only the owner wallet can pay.0.20
- api.x402-hosting.com/v1/projects/:id/uploadsCreate an upload session to deploy a new version of an existing project. Call this when publishing an update; it returns a presigned artifact upload URL. Only the project owner wallet can pay.0.01
- api.x402-hosting.com/v1/uploadsCreate an upload session for a new hosted Next.js site. Call this first when deploying a new project: it returns a presigned artifact upload URL, and the paying wallet becomes the project owner.0.01
