Skip to main content
POST
/
api
/
crm
/
crmopportunities
Create CrmOpportunity
curl --request POST \
  --url https://spaces.nexudus.com/api/crm/crmopportunities \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "CrmBoardColumnId": 123,
  "CoworkerId": 123,
  "Status": 123,
  "Position": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
A CrmOpportunity represents a potential or existing deal linked to a customer record that moves through stages on a CRM board. Opportunities track the lifecycle of a customer interaction — from initial enquiry or tour request through to a won or lost outcome. Each opportunity sits in a single CRM stage (CrmBoardColumn) and can be moved between stages manually or automatically via stage auto-assignment rules. Key fields:
  • StatusInProgress, Won, or Lost. Stages with WinOpportunity or LoseOpportunity update this automatically.
  • LeadSource — how the opportunity was acquired (e.g. Web, Phone, Referral, Broker, GoogleSearch).
  • LossReason — why the opportunity was lost (e.g. Price, Competition, Location). Only meaningful when Status is Lost.
  • Value — expected revenue if the opportunity is won.
  • DueDate — follow-up date for the opportunity.
  • UTM fields — automatically populated from the URL the opportunity used to reach the sign-up or contact form.
There is a limit of 5,000 opportunities per location.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the CrmOpportunity-Create role.

Enums

ValueName
1Web
2Phone
4Webinar
5Referral
6PrintAdvert
7PurchasedList
8WordOfMouth
9DirectEmail
10EmailMarketing
11Broker
12PropertyAgent
13Facebook
14Linkedin
15Instagram
16Twitter
17HubbleHq
18LiquidSpace
19GoogleSearch
20SpacePool
21InstantOffices
22OfficeFreedom
23FlexiOffices
24Workthere
25Kontor
26Valve
98OtherSocialNetwork
99Other
ValueName
1Timing
2Need
3PoorQualification
4Price
5Feature
6LostMomentum
7Competition
8ContractTerm
9Duplicate
10Waitlist
11NotReturningCalls
12LackOfFacilities
13NoPetPolicy
14NoRightFit
15Location
16Entrance
17Errors
18Archived
19SearchOnHold
20RelocationOnHold
99Other
ValueName
1InProgress
2Won
3Lost

Request Body

Required Fields

CrmBoardColumnId
integer
required
Crm Board Column Id.
CoworkerId
integer
required
Coworker Id.
Status
integer
required
Opportunity status: InProgress (still active), Won (led to a sale), or Lost (did not lead to a sale). Defaults to InProgress.
Position
integer
required
Display order of the opportunity within its current stage.

Optional Fields

Name
string
Optional tag to identify this opportunity, useful when the same customer appears in multiple boards.
TeamId
integer
Team Id.
OpportunityTypeId
integer
Opportunity type used to categorise and auto-populate general notes from a template.
ResponsibleId
integer
Admin user responsible for managing this opportunity.
ReferrerId
integer
Customer who referred this opportunity.
AgentId
integer
External agent or broker who brought this opportunity.
Notes
string
General notes visible to admins when viewing the opportunity. Auto-populated from the opportunity type template if a type is assigned.
Completed
boolean
Whether the opportunity has been completed (won or lost).
DueDate
string
Follow-up date for the opportunity.
Value
number
Expected revenue if the opportunity is won.
Reminded
boolean
Whether a follow-up reminder has been sent for this opportunity.
LeadSource
integer
How the opportunity was acquired (e.g. Web, Phone, Referral, Broker, GoogleSearch). See eCrmOpportunitySource? enum above.
LossReason
integer
Why the opportunity was lost (e.g. Price, Competition, Location). Only relevant when Status is Lost. See eCrmOpportunityLossReason? enum above.
WonOn
string
Date when the opportunity was marked as won.
LostOn
string
Date when the opportunity was marked as lost.
UtmSource
string
UTM source parameter captured from the URL the opportunity used.
UtmMedium
string
UTM medium parameter captured from the URL the opportunity used.
UtmCampaign
string
UTM campaign parameter captured from the URL the opportunity used.
UtmContent
string
UTM content parameter captured from the URL the opportunity used.
UtmTerm
string
UTM term parameter captured from the URL the opportunity used.

Code Examples

curl -X POST \
  "https://spaces.nexudus.com/api/crm/crmopportunities" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "CrmBoardColumnId": 0,
    "CoworkerId": null,
    "Status": 0,
    "Position": 0
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the creation.
Value
object
Contains the Id of the newly created record.
WasSuccessful
boolean
true if the crmopportunity was created successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "CrmOpportunity was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Status: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Status"
    }
  ],
  "WasSuccessful": false
}