solarOS Organization API

Organization API

Create or link a Customer

Creates or links a Customer for the calling organization. An email matches only a Customer this organization already serves, or one it deleted, which restores them; the email of a merged Customer follows the Customer it was merged into. An email held by a Customer this organization does not serve gets its own record holding only what was sent, and the response reads the same as a new Customer. Requires Idempotency-Key. Required scope: customers:write.

/api/v1/customers

Creates or links a Customer for the calling organization. An email matches only a Customer this organization already serves, or one it deleted, which restores them; the email of a merged Customer follows the Customer it was merged into. An email held by a Customer this organization does not serve gets its own record holding only what was sent, and the response reads the same as a new Customer. Requires Idempotency-Key. Required scope: customers:write.

Create or link a Customer. Use an organization API key with customers:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

customers:writeIdempotency-Key required

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
firstNamerequiredstringOptional unless marked required.
lastNamerequiredstringOptional unless marked required.
billingEmailstring | nullInvoice recipient for this organization. Blank or null uses the contact email.
emailrequiredstringOptional unless marked required.
phonestring | nullOptional unless marked required.
displayNamestring | nullOptional unless marked required.
descriptionstring | nullOptional unless marked required.
internalNotesstring | nullOptional unless marked required.
tagsarray | nullOptional unless marked required.
referralSourcestring | nullOptional unless marked required.
ownerIdstring | nullActive or draft same-organization Team Member id. When omitted, the API key default owner for this resource is used. Ownership cannot be changed through generic PATCH endpoints.
customFieldsobjectField Values keyed by savedIdentity from GET /api/v1/schema.
externalReferences[]array<object>Optional unless marked required.
externalReferences[].externalSystemrequiredstringOptional unless marked required.
externalReferences[].externalObjectrequiredstringOptional unless marked required.
externalReferences[].externalIdrequiredstringOptional unless marked required.
externalReferences[].metadataobjectOptional unless marked required.
createcustomerRequest
{
  "firstName": "Ada",
  "lastName": "Lovelace",
  "email": "ada@example.com",
  "phone": "+15555550123",
  "customFields": {
    "preferredLanguage": "en"
  },
  "externalReferences": [
    {
      "externalSystem": "salesforce",
      "externalObject": "Contact",
      "externalId": "003123"
    }
  ]
}

Responses

201

Customer envelope

#/components/schemas/OrgApiResourceEnvelope

400

Validation, ownership, idempotency, or custom Field error

#/components/schemas/OrgApiError

401

Missing or invalid organization API key

#/components/schemas/OrgApiError

402

Organization billing access or an endpoint-specific business quota denied the request

#/components/schemas/OrgApiError

403

Missing required scope: customers:write

#/components/schemas/OrgApiError

409

External Reference or idempotency conflict

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation, ownership, idempotency, or custom Field error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: customers:write409 External Reference or idempotency conflict429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/customers" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"firstName":"Ada","lastName":"Lovelace","email":"ada@example.com","phone":"+15555550123","customFields":{"preferredLanguage":"en"},"externalReferences":[{"externalSystem":"salesforce","externalObject":"Contact","externalId":"003123"}]}'