Skip to main content
POST
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 Create an agent and receive its agent_id for later reads, updates and calls.
Method: POST ·
Success: 201 ·
Scope: Owning account
The important part
  • See the agent rules above for agent pricing and how to share an agent across customers.
  • A new agent starts with the documented defaults; read the saved agent before attaching a number.
  • A successful create does not assign a phone number or start a call.
Every request field is optional. Sending {} creates an agent with the default settings. Calls have a 300-second duration limit, a 10-second silence hang-up and dynamic greeting enabled by default. Creating an agent does not place a call or import a phone number.

Authentication

Send Authorization: Bearer KEY_ID:KEY_SECRET and Content-Type: application/json. Use the API credential for the account that will own the agent. Keep the credential on your server.

Request fields

Send a JSON object. Use real JSON booleans and numbers: false and 0, not quoted strings. “Default” means the value when you omit the field. Explicit empty strings are preserved for name, system_prompt, welcome_message and fallback_message. The default system_prompt is: “You are a friendly AI assistant. Help callers with their questions.” The API checks the applicable prompt limit when you submit the request; a character estimate is not a token count.

Additional settings

Compatibility settings

These fields are accepted for existing clients. Stored compatibility fields do not become runtime controls just because a create response includes them. Do not send carrier credentials to this endpoint. Import numbers through the phone-number endpoint.

Extraction definitions

Each data_extraction_fields item accepts the following fields. Unknown nested fields are rejected. Unknown top-level fields are ignored only when at least one supported field is present. The response then includes a warnings array with code unknown_fields and the ignored field names. A nonempty object containing only unknown fields returns 400 empty_agent_update.

Response fields

201 Created returns the agent object directly, without a data wrapper. Save agent_id. The response includes saved settings from the request tables, with resolved defaults and normalized voice selection. The example response below shows selected fields. Additional compatibility fields may be present. Do not treat a returned preference as proof that every channel enables that feature. The safety byte count normalizes each trimmed term (NFKD, removes combining marks, lowercases, removes whitespace) to detect duplicates. Each unique normalized term costs the UTF-8 bytes of its first trimmed original spelling plus 4 bytes. Empty and duplicate normalized terms add no bytes. This conservative count is not a tokenizer. Term length counts Unicode code points, not UTF-16 code units. Automatic knowledge terms are read-only. They come from valid, unsuppressed live pieces, keep source spelling, and are ranked by importance, essential identity, repeated support and stable tie-breaks. Generic terms are filtered. The default limit is 80 per agent; platform configuration can choose 0–100. Customer terms take priority and stay first on calls; duplicates and weaker automatic terms are removed to fit the call limits. The returned list is not a promise that every term will be sent on a call. Read automatic keyterms. More than 20 terms returns 400 invalid_agent_field with message “Keep up to 20 words - remove some to save” and details.field “boosted_keywords”.

Example request

All four examples send the same name, system_prompt and three boosted_keywords, leaving the call limits and greeting at their defaults. Raw HTTP base URL: https://api.nixflex.com/v1. Node and Python SDK base URL: https://api.nixflex.com. The SDK adds /v1. Store your account credential privately in NIXFLEX_API_KEY; the CLI reads the same credential through NIXFLEX_API_KEY. Do not put a key in a URL or source file.

Example response

Illustrative 201 Created response, shortened to the fields used here. Identifiers are examples.

Errors

Validation errors contain an error object with code and message; field errors also identify error.details.field. For example, sending {"name":"Reception agent","max_call_duration_seconds":0} returns 400 invalid_agent_field with details.field: "max_call_duration_seconds".

Retry and idempotency

This endpoint does not provide a documented idempotency-key replay guarantee. A repeated successful request creates another agent. After a timeout, connection loss or uncertain server error, use List agents to reconcile the result before trying again. The Node and Python examples disable automatic retries. Configure every client for one write attempt, and verify the installed CLI’s retry policy before use. Never automatically replay a write.

Authorizations

Authorization
string
header
required

KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.

Body

application/json

Optional create settings. Unknown-only input is refused; extra unknown fields alongside supported fields produce warnings. call_retention_days is inherited on create and must be omitted.

is_active
boolean
default:true
ai_speaks_first
boolean
default:true
dynamic_greeting
boolean
default:true
func_end_call
boolean
default:true

Voice silence/duration timer gate, not a blanket prohibition on END_CALL.

func_cold_transfer
boolean
default:false

Compatibility-only; not the effective transfer permission.

func_send_sms
boolean
default:false

Compatibility-only; use incall_sms_enabled for in-call SMS.

record_call
boolean
default:true

Agent recording default; an explicit number true/false wins.

post_call_sms_enabled
boolean
default:false
incall_sms_enabled
boolean
default:false
amd_enabled
boolean
default:false
greet_by_name
boolean
default:true

Inbound name-greeting hint, independent of remembering callers; not global anonymization.

remember_callers
boolean
default:true

Phone caller context/learning; false does not erase saved records or website visitor history.

require_booking_confirmation
boolean
default:false

Saved confirmation setting for supported calendar changes. A new voice booking always requires one combined read-back and one clear yes, even when false. A null number override inherits the agent.

voicemail_leave_enabled
boolean
default:false
name
string
default:Untitled Agent
Maximum string length: 200
system_prompt
string

Up to 3,000 tokens when knowledge prompt checks are enabled; otherwise up to 16,000 characters. The 100,000-character input ceiling is for counting, not the accepted prompt size.

Maximum string length: 100000
welcome_message
string
default:Hello! How can I help you today?
Maximum string length: 16000
voice_id
string | null
default:Ashley
Maximum string length: 200
voice_key
string | null
Maximum string length: 36
language
string
default:multi
Maximum string length: 32
webhook_url
string | null
Maximum string length: 2048
phone_number
string | null
Maximum string length: 32
llm_model
string

Compatibility-only; does not select the runtime model.

Maximum string length: 200
fallback_message
string
default:I am sorry, could you say that again?

Compatibility-only; no current runtime consumer.

Maximum string length: 16000
post_call_sms_template
string

No endpoint default; supply a template when enabling post-call SMS.

Maximum string length: 600
transfer_number
string | null
Maximum string length: 32
transfer_whisper
string | null
Maximum string length: 16000
timezone
string

Nonempty IANA time zone. When omitted, use the valid account time zone or UTC.

Maximum string length: 100
boosted_keywords
string | null

Customer keyterms: at most 20 nonempty comma-separated terms, at most 50 Unicode characters per trimmed term, and a conservative 450-byte total safety budget for changed values. The text field also has a 2,000-character ceiling. Empty entries do not count; repeated nonempty terms count separately toward 20. Null clears the list.

Maximum string length: 2000
Example:

"Nixflex, Sam, appointment"

voicemail_message
string | null

Required and nonblank when voicemail_leave_enabled is true; no endpoint default.

Maximum string length: 600
temperature
number
default:0.3
Required range: 0 <= x <= 0.7
response_eagerness
integer
default:200
Required range: 0 <= x <= 1000
stt_confidence
number
default:0
Required range: 0 <= x <= 1
stt_max_silence_ms
integer
default:0
Required range: 0 <= x <= 2147483647
interruption_sensitivity
integer
default:50

Stored compatibility value; does not tune current interruption decisions.

Required range: 0 <= x <= 100
max_call_duration_seconds
integer | null
default:300

Null uses the runtime fallback; it does not mean unlimited.

Required range: 1 <= x <= 2147483
silence_hangup_seconds
integer | null
default:10

Null uses the runtime fallback.

Required range: 1 <= x <= 2147483
wait_tag_seconds
integer | null
Required range: 30 <= x <= 120
ivr_timeout_seconds
integer
default:240
Required range: 1 <= x <= 1800
voice_speed
number
default:0.85

Compatibility-only; use speaking_rate.

Required range: 0.01 <= x <= 100
speaking_rate

Existing numeric clamp to 0.5..1.5. Null or empty clears.

pickup_delay
any
default:10

Legacy input handling and default (10) unchanged in this release.

dtmf_enabled
boolean | null
response_length
enum<string>
default:short
Available options:
short,
medium,
long
transfer_type
enum<string>
default:cold
Available options:
cold,
warm
recording_source
string | null
default:provider

provider or nixflex (case/space normalized); null/empty clears to provider.

data_extraction_fields
object[]
Maximum array length: 50

Response

The created agent.

One safe projection for create, update, get and list. No secrets or automatic future-column exposure.

is_active
boolean
ai_speaks_first
boolean
dynamic_greeting
boolean
func_end_call
boolean
func_cold_transfer
boolean
func_send_sms
boolean
record_call
boolean
post_call_sms_enabled
boolean
incall_sms_enabled
boolean
amd_enabled
boolean
greet_by_name
boolean
remember_callers
boolean
require_booking_confirmation
boolean

Saved confirmation setting for supported calendar changes. A new voice booking always requires one combined read-back and one clear yes, even when false. A null number override inherits the agent.

voicemail_leave_enabled
boolean
name
string
system_prompt
string
welcome_message
string
voice_id
string | null
voice_key
string | null
language
string
webhook_url
string | null
phone_number
string | null
llm_model
string
fallback_message
string
post_call_sms_template
string
transfer_number
string | null
transfer_whisper
string | null
timezone
string
boosted_keywords
string | null

Customer keyterms: at most 20 nonempty comma-separated terms, at most 50 Unicode characters per trimmed term, and a conservative 450-byte total safety budget for changed values. The text field also has a 2,000-character ceiling. Empty entries do not count; repeated nonempty terms count separately toward 20. Null clears the list.

voicemail_message
string | null
temperature
number
response_eagerness
integer
stt_confidence
number
stt_max_silence_ms
integer
interruption_sensitivity
integer
max_call_duration_seconds
integer | null
silence_hangup_seconds
integer | null
wait_tag_seconds
integer | null
ivr_timeout_seconds
integer
voice_speed
number
dtmf_enabled
boolean | null
response_length
enum<string>
Available options:
short,
medium,
long
transfer_type
enum<string>
Available options:
cold,
warm
recording_source
enum<string> | null
Available options:
provider,
nixflex,
null
data_extraction_fields
object[]
pickup_delay
integer | null
speaking_rate
number | null
id
string
read-only
agent_id
string
read-only
api_key_id
string
read-only
created_at
string
read-only
updated_at
string
read-only
greeting_language
string | null
read-only
precall_webhook_url
string | null
read-only
tester_scenarios
any

Stored compatibility metadata; not a create input.

outbound_transfer_numbers
string[] | null
read-only
outbound_warm_transfer_numbers
string[] | null
read-only
outbound_post_call_sms_templates
any

Stored compatibility message template data; not a create input.

outbound_max_duration_seconds
integer | null
read-only
outbound_silence_hangup_seconds
integer | null
read-only
call_retention_days
enum<integer> | null
Available options:
90,
30,
7,
1,
0,
null
warnings
object[]