Create or update a Customer Relationship
Creates or updates the organization-scoped Customer Relationship sidecar for a Customer this organization already serves, or one it deleted, which restores them. firstName, lastName, and phone change the shared Customer only when this organization alone holds that Customer and it has no portal account. Otherwise they are saved on this relationship, read back as displayName and phone, and the shared Customer and every other organization stay as they were. Returns 404 when the Customer does not exist or was merged into another. Requires Idempotency-Key. Required scope: customers:write.
Creates or updates the organization-scoped Customer Relationship sidecar for a Customer this organization already serves, or one it deleted, which restores them. firstName, lastName, and phone change the shared Customer only when this organization alone holds that Customer and it has no portal account. Otherwise they are saved on this relationship, read back as displayName and phone, and the shared Customer and every other organization stay as they were. Returns 404 when the Customer does not exist or was merged into another. Requires Idempotency-Key. Required scope: customers:write.
Create or update a Customer Relationship. Use an organization API key with customers:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.
Required scopes
Parameters
No path or query parameters.
Request body
| Field | Type | Description |
|---|---|---|
| customerIdrequired | string | Optional unless marked required. |
| customerSalesforceAccountId | string | null | Optional unless marked required. |
| billingEmail | string | null | Invoice recipient for this organization. Blank or null uses the contact email. |
| string | null | Optional unless marked required. | |
| firstName | string | null | Optional unless marked required. |
| lastName | string | null | Optional unless marked required. |
| ownerTeamMemberId | string | null | Active 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. |
| phone | string | null | Optional unless marked required. |
| externalReferences[] | array<object> | Optional unless marked required. |
| externalReferences[].externalSystemrequired | string | Optional unless marked required. |
| externalReferences[].externalObjectrequired | string | Optional unless marked required. |
| externalReferences[].externalIdrequired | string | Optional unless marked required. |
| externalReferences[].metadata | object | Optional unless marked required. |
{
"customerId": "customer_123",
"ownerTeamMemberId": "team_member_123"
}Responses
Customer Relationship envelope
#/components/schemas/OrgApiResourceEnvelope
Validation error
#/components/schemas/OrgApiError
Missing or invalid organization API key
#/components/schemas/OrgApiError
Organization billing access or an endpoint-specific business quota denied the request
#/components/schemas/OrgApiError
Missing required scope: customers:write
#/components/schemas/OrgApiError
Customer not found
#/components/schemas/OrgApiError
Rate limit exceeded
#/components/schemas/OrgApiError
Errors
Static examples
curl -X POST "$SOLAROS_BASE_URL/api/v1/customer-relationships" \
-H "Authorization: Bearer $SOLAROS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
--data '{"customerId":"customer_123","ownerTeamMemberId":"team_member_123"}'