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
Parameter | Description | Data Type |
---|---|---|
projectId | The unique ID of the project to delete. | String |
Query Parameter
Parameter | Description | Data Type |
---|---|---|
secretKey | The secret key of your application (required) | String |
Note: This endpoint does not require a request body.
Responses
Success Response
Field | Type | Description |
---|---|---|
success | Boolean | true if the project was deleted successfully. |
HTTP Status: 200 OK
Example Success Response
{
"success": true
}
Error Responses
HTTP Status | Message | Description |
---|---|---|
400 | invalid secretKey app not found | The provided secretKey is invalid or does not match an existing app. |
400 | projectId is required | The projectId path parameter was not provided. |
400 | Invalid projectId | The projectId is not a valid MongoDB ObjectId. |
400 | Project not found | No 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));