Unpublish a Project
Unpublish takes a project offline on one destination. A destination is one place the project is published to, for example www.example.com/campaign. The project stays in Vev. Publish it again to put it back online.
Requirements
- A project that is online on the destination.
- An API key with the
publish:projectscope (see Authentication). - Edit access to the project.
Find the destination
List the destinations of the project and find the key of the one to take offline.
curl https://api.vev.design/v2/projects/[projectKey]/destinations \
--header "x-vev-key: [your-key]"{
"success": true,
"data": [
{ "key": "Xk2pQ8sLm1", "url": "www.example.com/campaign", "type": "vev-cf-standard" }
]
}Unpublish
curl -X POST https://api.vev.design/v2/projects/[projectKey]/destinations/[destinationKey]/unpublish \
--header "x-vev-key: [your-key]"{
"success": true,
"data": { "key": "Xk2pQ8sLm1", "startedUnpublishAt": 1795689600000 }
}The answer comes when the unpublish starts. The pages go offline some seconds later.
Put the project back online
Publish the destination again:
curl -X POST "https://api.vev.design/v2/projects/[projectKey]/publish?destinationKeys=[destinationKey]" \
--header "x-vev-key: [your-key]"Errors
| Status | Message | What to do |
|---|---|---|
403 | No edit access to project | Use a key of a user who can edit the project. |
404 | Destination not found | Check the destination key. The hosting can also be deleted. |
409 | The project is not online on this destination | Nothing to do: the project is already offline, or was never published there. |
409 | This destination does not allow unpublishing | The hosting does not let Vev remove files. Turn on "Unpublish" in the hosting settings, or remove the files on your server. |
{
"success": false,
"error": {
"message": "The project is not online on this destination",
"code": "conflict",
"errorId": "44b2b5ba-5f03-40c0-a154-093b103dd10d"
}
}