API Reference / Speakers
Delete a speaker
DELETE/v1/speakers/{speaker_id}
Deletes the speaker and all of its voice samples permanently. Later verifications for this speaker_id return 404. Requires scope speakers:delete.
Authentication
Send your API key as Authorization: Bearer <your API key>.
Headers
| Name | Type | Details |
|---|---|---|
Authorizationrequired | string |
|
Path parameters
| Name | Type | Details |
|---|---|---|
speaker_idrequired | string | Your identifier for the speaker. pattern |
Response
200 The speaker and its voice samples were deleted.
request_idstringrequiredobjectstringrequiredalways
"speaker.deleted"speaker_idstringrequireddeletedbooleanrequiredalways
true
Example response
{
"request_id": "req_8f14e45fceea167a5a36dedd",
"object": "speaker.deleted",
"speaker_id": "customer-4711",
"deleted": true
}Errors
| Status | Meaning |
|---|---|
| 400 | The request is invalid, for example a missing or malformed field. |
| 401 | The API key is missing, invalid or revoked. |
| 403 | The key lacks the required scope, the email address is not verified, or the account is suspended. |
| 404 | Not found. Also returned for resources that belong to another account. |
| 429 | Too many requests or too many operations at the same time. Wait for the number of seconds in Retry-After. |
| 500 | Something went wrong on our side. No credits were used. |
Error bodies share one shape with a stable error.code; see Errors for every code and how to fix it.
Code samples
curl -X DELETE "https://platform.detectif.ai/v1/speakers/alice" \
-H "Authorization: Bearer $DETECTIF_API_KEY"import os
import requests
resp = requests.delete(
"https://platform.detectif.ai/v1/speakers/alice",
headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.json())const res = await fetch("https://platform.detectif.ai/v1/speakers/alice", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.DETECTIF_API_KEY}`,
},
});
console.log(res.status, await res.json());