POSThttps://core-api.heysadie.ai/sms-reasons
name reason message assistantId content properties success data id createdAt updatedAt metadata timestamp version path error code details fieldCreate sms reason
Create a new SMS reason for a specific assistant. SMS reasons define when the assistant should send an SMS to the caller and what it should say. Use this when: - A caller asks for something like a price list, link, or directions - You want to define what the assistant says and what content is sent via SMS ### Fields - `name`: A friendly label for internal use. Example: "Car Rental Price List" - `reason`: The trigger that causes the assistant to send an SMS. Example: "When the caller asks for available cars and wants to see pricing." - `message`: What the assistant says before sending the SMS. Example: "Sure, I'll send you a price list via SMS right now." - `assistantId`: The assistant this SMS reason is attached to. - `content`: The actual SMS body that will be sent to the caller. Example: "Here's the price list for tomorrow: https://yourapp.com/prices" ⚠️ Note: The `properties` field is used internally and doesn't need to be filled manually. This lets you define flexible and reusable ways to respond to common user requests with SMS follow-ups.
Try it in the API ExplorerExample request
curl -X POST "https://core-api.heysadie.ai/sms-reasons" \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"reason": "string",
"message": "string"
}'Authentication
Authenticate with an API key in the Authorization header using the ApiKey scheme. See Authentication for how keys work and where to get them.
AuthorizationstringrequiredAPI key in the ApiKey scheme: ApiKey YOUR_API_KEY. Tenant keys authorize their own tenant; organization keys can act on any tenant in the organization.
X-Tenant-Idstring (uuid)optionalRequired when authenticating with an organization key: it selects the tenant the request acts on. Omit with tenant keys.
Request
Body application/json · required
namestringoptionalA friendly label for this SMS reason
reasonstringoptionalThe event or trigger that causes this SMS to be sent (e.g., user asks for a price list)
messagestringoptionalWhat the assistant says before sending the SMS (e.g., 'I'll send you the price list via SMS')
assistantIdstring (uuid)optionalThe assistant ID this reason is associated with
contentstringoptionalThe actual SMS message to be sent to the caller (e.g., a link or info)
propertiesanyoptionalResponses
successbooleanrequiredtrue on every 2xx
dataobjectoptionalThe result
Show 9 child properties
idstringrequirednamestringrequiredreasonstringrequiredmessagestringrequiredassistantIdstringrequiredpropertiesanyrequiredcontentstringrequiredcreatedAtstring (date-time) | string (date) | number | nullrequiredupdatedAtstring (date-time) | string (date) | number | nullrequiredmetadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
400The request is invalid. `details` lists each field that failed
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 3 child properties
codeenumrequiredA parameter or body field broke a rule
"VALIDATION_ERROR"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
detailsobject[]optionalOne entry per field that failed
Show 2 item properties
fieldstringrequiredThe offending field
messagestringrequiredThe rule it broke
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
401Missing or invalid credentials
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredNo valid credentials
"UNAUTHORIZED"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
403The credentials are valid but may not use this route
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredThe credentials may not use this route
"FORBIDDEN"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
404Not found, or outside the caller's scope
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredAn id names nothing the caller can see
"RESOURCE_NOT_FOUND"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested
500An unexpected server error
successbooleanrequiredfalse on every error
errorobjectoptionalWhat went wrong: a stable `code` to branch on and a human-readable `message`
Show 2 child properties
codeenumrequiredAn unexpected server failure
"INTERNAL_SERVER_ERROR"messagestringrequiredHuman-readable explanation. Do not parse it; branch on `code`
metadataobjectoptionalRequest metadata
Show 3 child properties
timestampstringrequiredWhen the server answered, ISO 8601 UTC
versionstringrequiredAPI version
pathstringoptionalThe URL that was requested