Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create customer sms inbound

Inbound SMS agent webhook (PILE-395). An SMS provider (Sendblue-style) POSTs each inbound text; a deterministic parser performs CRM ops on the sender’s customer record — knock/visit logging, quoted-$ → proposal deal, follow-up scheduling, and ‘what’s due’ list. Auth is a shared webhook secret via ?secret= or the x-sms-secret header compared against SMS_INBOUND_SECRET; the endpoint refuses (503 NOT_CONFIGURED) when the secret is unset so inbound is never unauthenticated. Retries dedupe on messageId.

POST/workspaces/{organizationId}/customers/sms-inbound
Path parameters
organizationIdstringrequired
Request body
application/json
fromstringrequired
min length 4 · max length 40
textstringrequired
min length 1 · max length 2000
tostring
max length 40
messageIdstring
max length 200
receivedAtstring
Responses
200

SMS interpreted — actions taken plus the SMS reply text

okbooleanrequired
Allowed:true
deduplicatedbooleanrequired
customerobject | nullrequired
Show properties
idstringrequired
namestringrequired
phonestring | nullrequired
statusIdstring | nullrequired
nextStepTextstring | nullrequired
nextStepDueAtstring | nullrequired
actionsobject[]required
Show properties
Array of object
One of:
object
typestringrequired
Allowed:interaction_logged
interactionIdstringrequired
outcomestringrequired
object
typestringrequired
Allowed:deal_created
dealIdstringrequired
amountCentsnumberrequired
object
typestringrequired
Allowed:follow_up_set
nextStepDueAtstringrequired
nextStepTextstring | nullrequired
object
typestringrequired
Allowed:due_list
itemsobject[]required
Show properties
Array of object
customerIdstringrequired
namestringrequired
nextStepTextstring | nullrequired
nextStepDueAtstring | nullrequired
replyTextstringrequired
401

Missing or invalid webhook secret

codestringrequired
messagestringrequired
503

SMS_INBOUND_SECRET not configured

codestringrequired
messagestringrequired
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/customers/sms-inbound' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "string",
  "text": "string",
  "to": "string",
  "messageId": "string",
  "receivedAt": "string"
}'
Response
{
  "ok": true,
  "deduplicated": true,
  "customer": {
    "id": "string",
    "name": "string",
    "phone": "string",
    "statusId": "string",
    "nextStepText": "string",
    "nextStepDueAt": "string"
  },
  "actions": [
    {
      "type": "interaction_logged",
      "interactionId": "string",
      "outcome": "string"
    }
  ],
  "replyText": "string"
}

Was this page helpful?