Skip to content

Create Opportunity

POST /external/v1/opportunities

Creates a new opportunity/lead in your pipeline.

Authentication

Requires opportunities:write permission.

Request Body

FieldTypeRequiredDescription
namestringYesFull name of the lead
emailstringNoEmail address
phonestringNoPhone number with country code
companystringNoCompany name
positionstringNoJob title/position
statusstringNoInitial status (default: "new")
sourcestringNoLead source (default: "other")
deal_valuenumberNoEstimated deal value
deal_currencystringNoCurrency code (default: "BRL")
linkedin_urlstringNoLinkedIn profile URL
notesstringNoAdditional notes
responsible_user_idstringNoAssign to specific user

Available Sources

  • linkedin - LinkedIn prospecting
  • google_maps - Google Maps agent
  • list - Imported list
  • paid_traffic - Paid advertising
  • other - Other sources

Request

bash
curl --request POST \
  --url "https://app.getraze.com/external/v1/opportunities" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data '{
    "name": "Jane Smith",
    "email": "jane@company.com",
    "company": "Tech Corp",
    "position": "CTO",
    "source": "paid_traffic",
    "deal_value": 75000,
    "deal_currency": "BRL",
    "notes": "Inbound from Google Ads"
  }'
javascript
const axios = require('axios');

const response = await axios.post(
  'https://app.getraze.com/external/v1/opportunities',
  {
    name: 'Jane Smith',
    email: 'jane@company.com',
    company: 'Tech Corp',
    position: 'CTO',
    source: 'paid_traffic',
    deal_value: 75000,
    deal_currency: 'BRL',
    notes: 'Inbound from Google Ads'
  },
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  }
);

console.log(response.data);
python
import requests

response = requests.post(
    'https://app.getraze.com/external/v1/opportunities',
    headers={
        'X-API-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'name': 'Jane Smith',
        'email': 'jane@company.com',
        'company': 'Tech Corp',
        'position': 'CTO',
        'source': 'paid_traffic',
        'deal_value': 75000,
        'deal_currency': 'BRL',
        'notes': 'Inbound from Google Ads'
    }
)

print(response.json())

Response

json
{
  "success": true,
  "data": {
    "id": "opp_xyz789abc123",
    "name": "Jane Smith",
    "email": "jane@company.com",
    "company": "Tech Corp",
    "position": "CTO",
    "status": "new",
    "source": "paid_traffic",
    "deal_value": 75000.00,
    "deal_currency": "BRL",
    "notes": "Inbound from Google Ads",
    "created_at": "2024-01-25T09:00:00Z"
  }
}

Errors

StatusCodeDescription
400VALIDATION_ERRORRequired fields missing or invalid
400INVALID_SOURCEInvalid source value
400INVALID_STATUSInvalid status value

GetRaze - AI-Powered Lead Generation