curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "create",
"name": "Local",
"url": "http://localhost:3456"
}
'{}{
"object": "preview_url",
"previewUrl": {
"id": "clz9d8f9g0016qaz3wsx4edc",
"name": "Local",
"url": "http://localhost:3456",
"sandboxId": null,
"isDefault": false,
"projectId": "clz8k2m4n0001qwer7tyu8iop",
"createdAt": "2026-10-20T10:15:00.000Z",
"updatedAt": "2026-10-20T10:15:00.000Z"
}
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "CONFLICT",
"message": "A preview URL with this address already exists",
"status": 409
}Previews and hostnames
Create, update or delete a preview URL
One endpoint for preview URL writes, selected by op:
create(name,url, optionalisDefault): returns 201{ object: "preview_url", previewUrl }. 409 when the project already has a preview with this URL. SettingisDefault: trueunsets the previous default.update(id, optionalname,url,isDefault): returns 200{ object: "preview_url", previewUrl }. 409 when another preview of this project already has the new URL.delete(id): returns 200{ object: "preview_url_deleted", id }. Permanent.
name is at most 191 characters and url at most 2048. Ids are resolved through this project; an id from another project returns 404.
Required scope: project:manage
POST
/
projects
/
{projectId}
/
previews
curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "create",
"name": "Local",
"url": "http://localhost:3456"
}
'{}{
"object": "preview_url",
"previewUrl": {
"id": "clz9d8f9g0016qaz3wsx4edc",
"name": "Local",
"url": "http://localhost:3456",
"sandboxId": null,
"isDefault": false,
"projectId": "clz8k2m4n0001qwer7tyu8iop",
"createdAt": "2026-10-20T10:15:00.000Z",
"updatedAt": "2026-10-20T10:15:00.000Z"
}
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "CONFLICT",
"message": "A preview URL with this address already exists",
"status": 409
}Authorizations
Bearer token: a shop API key (WEAVERSE_API_KEY), a scoped API key or a delegated MCP OAuth token; translation-unit routes also accept a project-bound translation agent token. Each operation lists the scope it requires; the scope table is in the API description.
Path Parameters
Body
application/json
Response
Operation result
The response is of type object.
Was this page helpful?