Skip to main content

Delete Turn Server Project

Use this endpoint to permanently delete a specific TURN Server project. Once deleted, the project's credentials and configurations can no longer be accessed or used. All the credentials created inside the turn server project will also be deleted.


DELETE
https://<appname>.metered.live/api/v2/turn/project/:projectId?secretKey=<YOUR_SECRET_KEY>

<appname> - Replace with the name of your app.

<YOUR_SECRET_KEY> - Your secret key, found in the Dashboard → Developers → Secret Key.

:projectId - The unique ID of the project you want to delete.


Request​

DELETE /api/v2/turn/project/:projectId?secretKey=<YOUR_SECRET_KEY>

Path Parameter​

ParameterDescriptionData Type
projectIdThe unique ID of the project to delete.String

Query Parameter​

ParameterDescriptionData Type
secretKeyThe secret key of your application (required)String

Note: This endpoint does not require a request body.


Responses​

Success Response​

FieldTypeDescription
successBooleantrue if the project was deleted successfully.

HTTP Status: 200 OK

Example Success Response​
{
"success": true
}

Error Responses​

HTTP StatusMessageDescription
400invalid secretKey app not foundThe provided secretKey is invalid or does not match an existing app.
400projectId is requiredThe projectId path parameter was not provided.
400Invalid projectIdThe projectId is not a valid MongoDB ObjectId.
400Project not foundNo project matching the specified projectId was found.

Code Examples​

cURL​

curl -X DELETE "https://<appname>.metered.live/api/v2/turn/project/63fdb9f998c1abec0bd3e16c?secretKey=<YOUR_SECRET_KEY>"

JavaScript (Fetch)​

fetch(
`https://<appname>.metered.live/api/v2/turn/project/63fdb9f998c1abec0bd3e16c?secretKey=<YOUR_SECRET_KEY>`,
{
method: "DELETE",
}
)
.then((response) => response.json())
.then((data) => console.log("Project Deleted:", data))
.catch((error) => console.error("Error:", error));