Content
Project Updates
Update metadata for an existing project. Only the project developer can make changes. Supports updating text fields via JSON, or text fields + image via FormData.
POST
/api/projects/{address}
Updates off-chain metadata for a deployed token or prediction market.
Auth: Session required + wallet must be the project developer
Option 1: JSON Body (text fields only)
Response
{
"website": "string", // Optional
"telegram": "string", // Optional
"twitterx": "string", // Optional
"description": "string" // Optional
}Option 2: FormData (text fields + image)
Send as multipart/form-data with an image file field. Text fields are optional form fields.
Response
Response
{ "success": true, "project": { ... } }200 Updated400 No fields provided401 Not signed in403 Not the developer404 Project not found
JSON Update
// Update project metadata (JSON — text fields only)
async function updateProject(contractAddress, sessionCookie) {
const res = await fetch(`https://launchonbasis.com/api/projects/${contractAddress}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cookie": sessionCookie,
},
body: JSON.stringify({
website: "https://updated-site.com",
telegram: "https://t.me/updated",
twitterx: "https://x.com/updated",
description: "Updated description.",
}),
});
const { success, project } = await res.json();
}FormData Update (with image)
// Update project metadata with a new image (FormData)
async function updateProjectWithImage(contractAddress, imageFile, sessionCookie) {
const formData = new FormData();
formData.append("image", imageFile);
formData.append("description", "New description with new image");
const res = await fetch(`https://launchonbasis.com/api/projects/${contractAddress}`, {
method: "POST",
headers: { "Cookie": sessionCookie },
body: formData,
});
const { success, project } = await res.json();
}