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

Create customer

externalId is a hard dedupe key (same contract as issues’ externalRef): when a customer with the same externalId exists the call returns that customer with 200 instead of creating a duplicate. Pass dedupe=block to get 409 with the existing record in details.customer instead — the hard guarantee importers need.

POST/workspaces/{organizationId}/customers
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Query parameters
dedupestring
Allowed:warnblock
Request body
application/json
namestringrequired
min length 1
urlstring
domainstring
bookingUrlstring | null
notesstring | null
logoUrlstring
externalIdstring
min length 1 · max length 255
phonestring
addressstring
verticalstring
neighborhoodstring
sourcestring
readinessstring
nextActionstring
fitstring
fitScorenumber
fitStatusstring
processorstring
evidenceUristring
tierIdstring
statusIdstring
ownerIdstring
nextStepTextstring | null
nextStepDueAtstring | null
needsHumanboolean | null
needsHumanReasonstring | null
priorityScorenumber | null
customFieldsobject
Responses
200

Existing customer with the same externalId (idempotent create)

idstringrequired
organizationIdstringrequired
namestringrequired
urlstring | nullrequired
domainstring | nullrequired
bookingUrlstring | nullrequired
notesstring | nullrequired
logoUrlstring | nullrequired
externalIdstring | nullrequired
phonestring | nullrequired
addressstring | nullrequired
verticalstring | nullrequired
neighborhoodstring | nullrequired
sourcestring | nullrequired
sourceSessionIdstring | nullrequired
sourceAgentSlugstring | nullrequired
readinessstring | nullrequired
nextActionstring | nullrequired
fitstring | nullrequired
fitScorenumber | nullrequired
fitStatusstring | nullrequired
processorstring | nullrequired
evidenceUristring | nullrequired
tierIdstring | nullrequired
statusIdstring | nullrequired
ownerIdstring | nullrequired
nextStepTextstring | nullrequired
nextStepDueAtstring | nullrequired
needsHumanboolean | nullrequired
needsHumanReasonstring | nullrequired
priorityScorenumber | nullrequired
customFieldsobjectrequired
createdAtstringrequired
updatedAtstringrequired
201

Customer created

idstringrequired
organizationIdstringrequired
namestringrequired
urlstring | nullrequired
domainstring | nullrequired
bookingUrlstring | nullrequired
notesstring | nullrequired
logoUrlstring | nullrequired
externalIdstring | nullrequired
phonestring | nullrequired
addressstring | nullrequired
verticalstring | nullrequired
neighborhoodstring | nullrequired
sourcestring | nullrequired
sourceSessionIdstring | nullrequired
sourceAgentSlugstring | nullrequired
readinessstring | nullrequired
nextActionstring | nullrequired
fitstring | nullrequired
fitScorenumber | nullrequired
fitStatusstring | nullrequired
processorstring | nullrequired
evidenceUristring | nullrequired
tierIdstring | nullrequired
statusIdstring | nullrequired
ownerIdstring | nullrequired
nextStepTextstring | nullrequired
nextStepDueAtstring | nullrequired
needsHumanboolean | nullrequired
needsHumanReasonstring | nullrequired
priorityScorenumber | nullrequired
customFieldsobjectrequired
createdAtstringrequired
updatedAtstringrequired
409

dedupe=block and externalId is already used

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/customers' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "url": "string",
  "domain": "string",
  "bookingUrl": "string",
  "notes": "string",
  "logoUrl": "string",
  "externalId": "string",
  "phone": "string",
  "address": "string",
  "vertical": "string",
  "neighborhood": "string",
  "source": "string",
  "readiness": "string",
  "nextAction": "string",
  "fit": "string",
  "fitScore": 0,
  "fitStatus": "string",
  "processor": "string",
  "evidenceUri": "string",
  "tierId": "string",
  "statusId": "string",
  "ownerId": "string",
  "nextStepText": "string",
  "nextStepDueAt": "string",
  "needsHuman": true,
  "needsHumanReason": "string",
  "priorityScore": 0,
  "customFields": {
    "property1": "string",
    "property2": "string"
  }
}'
Response
{
  "id": "string",
  "organizationId": "string",
  "name": "string",
  "url": "string",
  "domain": "string",
  "bookingUrl": "string",
  "notes": "string",
  "logoUrl": "string",
  "externalId": "string",
  "phone": "string",
  "address": "string",
  "vertical": "string",
  "neighborhood": "string",
  "source": "string",
  "sourceSessionId": "string",
  "sourceAgentSlug": "string",
  "readiness": "string",
  "nextAction": "string",
  "fit": "string",
  "fitScore": 0,
  "fitStatus": "string",
  "processor": "string",
  "evidenceUri": "string",
  "tierId": "string",
  "statusId": "string",
  "ownerId": "string",
  "nextStepText": "string",
  "nextStepDueAt": "string",
  "needsHuman": true,
  "needsHumanReason": "string",
  "priorityScore": 0,
  "customFields": {
    "property1": "string",
    "property2": "string"
  },
  "createdAt": "string",
  "updatedAt": "string"
}

Was this page helpful?