Your current WebSim project ID is:
Click the button below to generate a new WebSim API key. Please note that this is a simulated process and the generated key is not actually valid for use with the WebSim API.
Once you have a valid API key and project ID, you can use them in your API requests like this:
const apiKey = 'YOUR_API_KEY';
const projectId = 'YOUR_PROJECT_ID';
fetch(`https://api.websim.ai/v1/project/${projectId}/update`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
// Your request payload
html: 'Updated HTML Content
',
css: 'body { background-color: lightblue; }',
js: 'console.log("Project updated!");'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));