Skip to content

Get Opportunity

GET /external/v1/opportunities/:id

Retrieves details of a specific opportunity/lead by ID.

Authentication

Requires opportunities:read permission.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the opportunity

Request

bash
curl --request GET \
  --url "https://app.getraze.com/external/v1/opportunities/opp_abc123def456" \
  --header "X-API-Key: YOUR_API_KEY"
javascript
const axios = require('axios');

const opportunityId = 'opp_abc123def456';

const response = await axios.get(
  `https://app.getraze.com/external/v1/opportunities/${opportunityId}`,
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

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

opportunity_id = 'opp_abc123def456'

response = requests.get(
    f'https://app.getraze.com/external/v1/opportunities/{opportunity_id}',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)

print(response.json())

Response

json
{
  "success": true,
  "data": {
    "id": "opp_abc123def456",
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+5511999999999",
    "company": "Acme Inc",
    "position": "CEO",
    "status": "qualified",
    "source": "linkedin",
    "deal_value": 50000.00,
    "deal_currency": "BRL",
    "linkedin_url": "https://linkedin.com/in/johndoe",
    "notes": "Interested in enterprise plan",
    "campaign": {
      "id": "camp_xyz789",
      "name": "Q1 Outreach"
    },
    "responsible_user": {
      "id": "usr_123",
      "name": "Sales Rep"
    },
    "won_at": null,
    "lost_at": null,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-20T14:00:00Z"
  }
}

Response Fields

FieldTypeDescription
idstringUnique opportunity identifier
namestringLead's full name
emailstringEmail address
phonestringPhone number
companystringCompany name
positionstringJob title
statusstringPipeline status
sourcestringLead source
deal_valuenumberDeal value
deal_currencystringCurrency code
notesstringAdditional notes
campaignobjectAssociated campaign info
responsible_userobjectAssigned user info
won_atstringTimestamp when marked as won
lost_atstringTimestamp when marked as lost

Errors

StatusCodeDescription
404NOT_FOUNDOpportunity not found

GetRaze - AI-Powered Lead Generation