Skip to content

Opportunity History

GET /external/v1/opportunities/:id/history

Returns the full stage-change and value-change history of an opportunity, in chronological order. Useful to compute time-in-stage, funnel velocity and audit trails.

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_abc123/history" \
  --header "X-API-Key: YOUR_API_KEY"
javascript
const axios = require('axios');

const opportunityId = 'opp_abc123';

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

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

opportunity_id = 'opp_abc123'

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

print(response.json())

Response

json
{
  "success": true,
  "data": [
    {
      "id": "hist_001",
      "action": "stage_changed",
      "from_stage_id": "stg_qualifying",
      "from_stage_name": "Qualifying",
      "to_stage_id": "stg_proposal",
      "to_stage_name": "Proposal",
      "from_value": 0,
      "to_value": 25000.00,
      "notes": null,
      "metadata": {},
      "user_id": "usr_42",
      "user_name": "Maria Silva",
      "created_at": "2026-01-12T09:00:00Z"
    }
  ]
}

Response Fields

FieldTypeDescription
idstringHistory entry identifier
actionstringType of change (e.g. stage_changed, value_changed, created)
from_stage_idstringStage the opportunity moved from (nullable)
from_stage_namestringName of the origin stage (nullable)
to_stage_idstringStage the opportunity moved to (nullable)
to_stage_namestringName of the destination stage (nullable)
from_valuenumberPrevious opportunity value (nullable)
to_valuenumberNew opportunity value (nullable)
notesstringOptional note attached to the change (nullable)
metadataobjectAdditional structured context
user_idstringUser who performed the change (nullable for automations)
user_namestringName of that user (nullable)
created_atstringISO 8601 timestamp of the change

Errors

StatusCodeDescription
404NOT_FOUNDOpportunity with this ID was not found

GetRaze - AI-Powered Lead Generation