curl --request DELETE \
--url 'https://api.nixflex.com/v1/agents/agent_example' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/agents/agent_example', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/agents/agent_example', method='DELETE',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method DELETE -Uri 'https://api.nixflex.com/v1/agents/agent_example' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"message": "Agent deleted"
}
Agents
Disable an agent
Disable an owned Nixflex agent. Understand the inactive state, retained record and checks before assigning numbers or starting calls.
DELETE
/
agents
/
{id}
curl --request DELETE \
--url 'https://api.nixflex.com/v1/agents/agent_example' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/agents/agent_example', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/agents/agent_example', method='DELETE',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method DELETE -Uri 'https://api.nixflex.com/v1/agents/agent_example' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"message": "Agent deleted"
}
FIXED · agent For a different inbound opening on each number, use Dynamic greeting and put the opening in that number’s custom_prompt. Fixed welcome_message text, spoken language, pickup delay and general call timezone are shared agent settings. Use separate agents when those must differ. A booking timezone changes calendar times only.
NOT OFFERED → do this instead · number A number cannot override fixed agent settings. Use its dynamic opening for business-specific wording. Use different agents for different fixed settings.
YOU CAN CHANGE · agent Choose the supported catalogue voice and an eligible route. Select manual speech terms or configure structured values to extract from transcripts.
SCOPE · number Choose a complete primary and backup voice pair on the number. It overrides the agent pair as a whole. To use the saved agent pair, set voice_pair_inherit to true. Setting the older voice_id field can clear the agent’s catalogue key, and a pair that is only partly set can be unavailable. Never choose by alias precedence.
Group numbers by the knowledge and agent settings their customers need. Attribute each customer’s usage to its verified business number.
Agents are unlimited. There is no fee per agent. Customers pay only for usage (minutes and texts). Many customers can use one shared agent, each with its own number and number prompt. Use separate agents only for different knowledge or agent settings. List page size, knowledge-base quotas and simultaneous-call limits do not cap agent count.
For a different greeting per business, keep Dynamic greeting on (the default) and put the opening line in that number’s custom_prompt. For example, “Start every call with: Thank you for calling Oak and Stone”.
Read the compact AI rules
Switch an owned agent off by setting is_active to false. GET still returns the inactive record. This is not permanent erasure.
Do not send a request body.
This operation only writes
Method: DELETE ·
Success: 200 ·
Scope: Owning account
The important part
- This sets is_active:false; the owned agent record remains readable.
- It does not detach numbers, erase history or wait for live calls to finish.
Authentication
UseAuthorization: Bearer KEY_ID:KEY_SECRET for the owning account. An organisation API key has Owner authority. Personal sessions use the role rules documented in Authentication; do not treat a Member session as an API key.
Request fields
| Field | Type | Required | Default and limits |
|---|---|---|---|
id (path) | string | Yes |
is_active=false and updates the timestamp.
In plain words: switch off, not permanent deletion or a wait-for-live-calls operation.
It does not detach phone numbers, erase the row/history, or send carrier requests.
The existing response is kept for compatibility, but its wording means soft disable:
GET by ID can still return the owned disabled agent. List defaults to active only;
use status=disabled or status=all to include it.
PUT {"is_active":true} can re-enable it. This is not the dashboard’s permanent erasure process.
The update must affect an owned row before success is returned.
Missing/foreign rows return 404 not_found; database failures return
503 agent_store_unavailable. Check the agent before retrying an uncertain result.
Response fields
200 returns the following shape.
| Field | Type | Meaning |
|---|---|---|
message | string | Compatibility wording for switching the agent off. |
Example request
Production HTTP examples. Replace the placeholder identifiers with resources owned by the account. SetNIXFLEX_API_KEY privately; never print it.
curl --request DELETE \
--url 'https://api.nixflex.com/v1/agents/agent_example' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/agents/agent_example', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/agents/agent_example', method='DELETE',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method DELETE -Uri 'https://api.nixflex.com/v1/agents/agent_example' -Headers $headers -DisableKeepAlive
# Handle $result privately.
Example response
Illustrative response with placeholder identifiers.{
"message": "Agent deleted"
}
Errors
Branch onerror.code, not the wording of error.message. The envelope includes type, code, message, doc_url and details.
| Status / code | What it means | What to do |
|---|---|---|
| 400 | Invalid request - missing or malformed parameters. | Correct the named field or query using the request table before trying again. |
| 401 | Authentication failed - bad or missing API key. | Check the full account credential and API host privately; stop the retry loop. |
| 404 | Not found on your account. | Check the exact owned identifier and current resource state; do not probe another account. |
| 429 | Rate limit exceeded. Honour the Retry-After header. | Stop automatic retries; wait for the limit and reconcile state before a deliberate action. |
| 500 | Server error. | Treat the outcome as uncertain and read the affected resource before another deliberate change. |
| 503 | Agent storage or catalog unavailable; check before retrying a write. | Treat the outcome as uncertain and read the affected resource before another deliberate change. |