Delete Phrases
Remove phrases from a custom model by value. Removing is idempotent: phrases that are not present are reported as skipped. The Custom Models guide covers how phrases are used.
POST https://api.reson8.dev/v1/custom-model/{id}/phrases/deleteRequest
Section titled “Request”Headers
Section titled “Headers”| Header | Value |
|---|---|
| Authorization | ApiKey <api_key> or Bearer <access_token> |
| Content-Type | application/json |
See Authentication for which header to use in different situations.
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
id |
string | ID of the custom model |
| Field | Type | Required | Description |
|---|---|---|---|
phrases |
string[] | Yes | Phrases to remove (must not be empty) |
Example
Section titled “Example”curl -X POST "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete" \ -H "Authorization: ApiKey <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "phrases": ["pericarditis", "tachycardia"] }'import requests
response = requests.post( "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete", headers={ "Authorization": "ApiKey <your_api_key>", "Content-Type": "application/json", }, json={"phrases": ["pericarditis", "tachycardia"]},)
result = response.json()Response
Section titled “Response”200 OK
| Field | Type | Description |
|---|---|---|
deleted |
number | Number of phrases removed |
skipped |
number | Number of submitted phrases not removed (not present or duplicate) |
Example
Section titled “Example”In the request above tachycardia was not in the model:
{ "deleted": 1, "skipped": 1}Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 Bad Request | Empty list or blank phrase |
| 401 Unauthorized | Missing or invalid credentials |
| 404 Not Found | Custom model not found |
| 500 Internal Server Error | Unexpected server error |