Skip to main content
POST
/
v1
/
inbound
/
opportunities
Create Opportunity
curl --request POST \
  --url https://enrich.octolane.com/v1/inbound/opportunities \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "pipeline_id": "<string>",
  "opportunity": {
    "name": "<string>",
    "stage_id": "<string>",
    "deal_size": 123,
    "close_date": 123,
    "next_action_date": 123,
    "next_step": "<string>"
  },
  "related_objects": {
    "account_domain": "<string>",
    "primary_contact_email": "<string>",
    "additional_contact_emails": [
      "<string>"
    ],
    "owner_email": "<string>"
  }
}
'
{
  "success": true,
  "statusCode": 123,
  "data": {
    "opportunity_id": "<string>",
    "name": "<string>",
    "amount": 123
  },
  "message": "<string>"
}
This is the main endpoint you’ll use. It creates a deal and automatically sets up the associated account and contacts - all in one call. If you send the same deal twice (same domain + pipeline + name), Octolane updates the contacts instead of creating a duplicate.

Request

X-API-Key
string
required
Your Octolane API key.
Content-Type
string
required
Must be application/json.

Body parameters

pipeline_id
string
required
Your pipeline ID (UUID format). Find this in your Octolane dashboard or ask the team.
opportunity
object
required
The deal details.
Associated accounts, contacts, and deal owner.

Example request

curl -X POST "https://enrich.octolane.com/v1/inbound/opportunities" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{
    "pipeline_id": "your-pipeline-id",
    "opportunity": {
      "name": "Acme Corp Deal",
      "deal_size": 50000,
      "next_step": "Schedule demo call"
    },
    "related_objects": {
      "account_domain": "acme.com",
      "primary_contact_email": "john@acme.com",
      "additional_contact_emails": ["jane@acme.com"]
    }
  }'

Response

success
boolean
Whether the request succeeded.
statusCode
number
HTTP status code.
data
object
message
string
Human-readable status message.
200
{
  "success": true,
  "statusCode": 200,
  "data": {
    "opportunity_id": "770e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Corp Deal",
    "amount": 50000
  },
  "message": "Opportunity created successfully"
}
400
{
  "success": false,
  "statusCode": 400,
  "message": "Validation error",
  "errors": {
    "pipeline_id": "Pipeline id must be a valid uuid"
  }
}