solarOS Organization API

Organization API

Create an Opportunity

Creates an Opportunity for an accessible Customer. propertyId is optional for external CRM imports that do not yet have a solarOS Property mapping. Stage changes do not create hidden downstream records. Without originatorId, the owner is credited with bringing the sale in. Requires Idempotency-Key.

/api/v1/opportunities

Creates an Opportunity for an accessible Customer. propertyId is optional for external CRM imports that do not yet have a solarOS Property mapping. Stage changes do not create hidden downstream records. Without originatorId, the owner is credited with bringing the sale in. Requires Idempotency-Key.

Create an Opportunity. Use an organization API key with opportunities:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

opportunities:writeIdempotency-Key required

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
namerequiredstringOptional unless marked required.
customerIdrequiredstringOptional unless marked required.
propertyIdstring | nullOptional unless marked required.
valuestring | number | nullOptional unless marked required.
stageNEW | PROPOSAL | NEGOTIATION | CLOSED_WON | CLOSED_LOSTOptional unless marked required.
expectedCloseDatestring | 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.
originatorIdstring | nullThe active or draft same-organization Team Member credited with bringing this sale in. When omitted, the owner is credited.
notesstring | nullOptional unless marked required.
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.
createopportunityRequest
{
  "customerId": "customer_123",
  "propertyId": "property_123",
  "name": "Residential solar install",
  "stage": "PROPOSAL",
  "value": "42500",
  "expectedCloseDate": "2026-09-15"
}

Responses

201

Opportunity envelope

#/components/schemas/OrgApiResourceEnvelope

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: opportunities:write

#/components/schemas/OrgApiError

404

Customer or Property not found

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: opportunities:write404 Customer or Property not found429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/opportunities" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"customerId":"customer_123","propertyId":"property_123","name":"Residential solar install","stage":"PROPOSAL","value":"42500","expectedCloseDate":"2026-09-15"}'