Opportunity Operations - Create Opportunity POST /v1/api/opportunities
Resource URL /v1/api/opportunities Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_creation_type Query parameter: Type of opportunity creation (e.g., default, manual, past) No String "default" opportunity_name Name of the opportunity Yes String N/A type Type of the opportunity Yes String N/A assignee User assigned to the opportunity Yes String N/A diligence_status Diligence status of the opportunity Yes String N/A score Score assigned to the opportunity Yes Integer N/A synopsis Brief description of the opportunity Yes String N/A summary Detailed summary of the opportunity Yes String N/A due_date Due date and time for the opportunity Yes String (date-time) N/A initiated_by User who initiated the opportunity Yes String N/A trigger Trigger event or reason for the opportunity Yes String N/A
curl -X 'POST' \
'https://braegen.ai/v1/api/opportunities?opportunity_creation_type=default' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"opportunity_name": "New Business Deal",
"type": "Business",
"assignee": "john.doe",
"diligence_status": "Pending",
"score": 85,
"synopsis": "A potential business expansion opportunity",
"summary": "Detailed summary of the deal",
"due_date": "2025-05-01T12:00:00Z",
"initiated_by": "jane.smith",
"trigger": "Market analysis"
}'
{
"is_error" : false ,
"message" : "Opportunity created successfully",
"results" : {
"opportunity_id" : "12345",
"opportunity_name" : "New Business Deal",
"type" : "Business",
"assignee" : "john.doe"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - List Minimal Opportunities GET /v1/api/minimal/opportunities
Resource URL /v1/api/minimal/opportunities Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value page_no Page number for pagination No Integer (min: 1) 1 page_size Number of items per page No Integer (min: 1) 10 sort_field Field to sort by (e.g., created_at, status, assignee) No String or Null "created_at" sort_order Sort order (ascending or descending) No String or Null "desc" status Filter by opportunity status (array of strings) No Array[String] or Null Null assignee Filter by assignee No String or Null Null created_from Filter by creation date from (date-time) No String (date-time) or Null Null created_to Filter by creation date to (date-time) No String (date-time) or Null Null
curl -X 'GET' \
'https://braegen.ai/v1/api/minimal/opportunities?page_no=1&page_size=10&sort_field=created_at&sort_order=desc' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Minimal opportunities retrieved successfully",
"page_no" : 1,
"page_size" : 10,
"total_pages" : 5,
"total" : 50,
"results" : [
{
"opportunity_id" : "12345",
"created_at" : "2025-04-01T10:00:00Z",
"status" : "New",
"assignee" : "john.doe"
},
{
"opportunity_id" : "12346",
"created_at" : "2025-04-02T14:00:00Z",
"status" : "Intake Request",
"assignee" : "jane.smith"
}
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - List Detailed Opportunities GET /v1/api/detailed/opportunities
Resource URL /v1/api/detailed/opportunities Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value page_no Page number for pagination No Integer (min: 1) 1 page_size Number of items per page No Integer (min: 1) 10 sort_field Field to sort by (e.g., opportunity_name, created_at, status, score) No String or Null "created_at" sort_order Sort order (ascending or descending) No String or Null "desc" opportunity_name Filter by opportunity name No String or Null Null status Filter by opportunity status (array of strings) No Array[String] or Null Null assignee Filter by assignee No String or Null Null created_from Filter by creation date from (date-time) No String (date-time) or Null Null created_to Filter by creation date to (date-time) No String (date-time) or Null Null score Filter by minimum score No Number or Null Null type Filter by opportunity type No String or Null Null diligence_status Filter by diligence status No String or Null Null synopsis Filter by synopsis No String or Null Null summary Filter by summary No String or Null Null due_date Filter by due date (date) No String (date) or Null Null display_id Filter by display ID No String or Null Null
curl -X 'GET' \
'https://braegen.ai/v1/api/detailed/opportunities?page_no=1&page_size=10&status=New' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Detailed opportunities retrieved successfully",
"page_no" : 1,
"page_size" : 10,
"total_pages" : 3,
"total" : 25,
"results" : [
{
"opportunity_id" : "12345",
"opportunity_name" : "New Business Deal",
"type" : "Business",
"assignee" : "john.doe",
"diligence_status" : "Pending",
"score" : 85,
"synopsis" : "A potential business expansion opportunity",
"summary" : "Detailed summary of the deal",
"status" : "New",
"due_date" : "2025-05-01T12:00:00Z",
"created_at" : "2025-04-01T10:00:00Z"
}
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Get Minimal Opportunity GET /v1/api/opportunities/minimal/{opportunity_id}
Resource URL /v1/api/opportunities/minimal/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_id Unique ID of the opportunity to fetch Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/opportunities/minimal/12345' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Minimal opportunity retrieved successfully",
"result" : {
"opportunity_id" : "12345",
"opportunity_name" : "Quick Summary Deal",
"status" : "Open"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Get Detailed Opportunity GET /v1/api/opportunities/detailed/{opportunity_id}
Resource URL /v1/api/opportunities/detailed/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_id Unique ID of the opportunity to fetch Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/opportunities/detailed/12345' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Detailed opportunity retrieved successfully",
"result" : {
"opportunity_id" : "12345",
"opportunity_name" : "Enterprise Deal",
"type" : "Strategic",
"assignee" : "jane.doe",
"diligence_status" : "In Review",
"score" : 92,
"synopsis" : "Large-scale enterprise opportunity",
"summary" : "Comprehensive deal analysis and summary",
"status" : "In Progress",
"due_date" : "2025-05-15T12:00:00Z",
"created_at" : "2025-04-02T14:30:00Z"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Update Opportunity PATCH /v1/api/opportunities/{opportunity_id}
Resource URL /v1/api/opportunities/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_id Unique ID of the opportunity to update Yes String N/A
Field Description Required Type opportunity_name Name of the opportunity No String status Status of the opportunity No String type Type of the opportunity No String diligence_status Diligence status No String score Score (0–100) No Number synopsis Short description of the opportunity No String summary Detailed summary No String assignee Assigned person No String due_date Due date (ISO 8601 date-time format) No String (date-time)
Note : Exact request body fields depend on the OpportunityUpdateModel schema definition.
curl -X 'PATCH' \
'https://braegen.ai/v1/api/opportunities/12345' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"opportunity_name": "Updated Business Deal",
"status": "In Progress",
"score": 90
}'
{
"is_error" : false ,
"message" : "Opportunity updated successfully",
"result" : {
"opportunity_id" : "12345",
"opportunity_name" : "Updated Business Deal",
"status" : "In Progress",
"score" : 90
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Update Opportunity Status POST /v1/api/opportunities/update_status/{opportunity_id}
Resource URL /v1/api/opportunities/update_status/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_id Unique ID of the opportunity to update status Yes String N/A
Field Description Required Type status New status of the opportunity Yes String
Note : The fields are based on the StatusUpdateModel schema.
curl -X 'POST' \
'https://braegen.ai/v1/api/opportunities/update_status/12345' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"status": "Closed"
}'
{
"is_error" : false ,
"message" : "Opportunity status updated successfully",
"result" : {
"opportunity_id" : "12345",
"status" : "Closed"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Update Opportunity Status with Attachments POST /v1/api/opportunities/update_status_with_attachments/{opportunity_id}
Resource URL /v1/api/opportunities/update_status_with_attachments/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Parameter Description Required Type Default Value opportunity_id Unique ID of the opportunity to update status with attachments Yes String N/A
Field Description Required Type status New status of the opportunity Yes String comment Comment regarding the status update No String attachments Files to attach (e.g., PDFs, images, docs) No Array of files
Note : The fields come from the schema Body_update_opportunity_status_v1_api_opportunities_update_status_with_attachments__opportunity_id__post.
curl -X 'POST' \
'https://braegen.ai/v1/api/opportunities/update_status_with_attachments/12345' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'status=Approved' \
-F 'comment=Supporting documents attached' \
-F 'attachments=@/path/to/document.pdf'
{
"is_error" : false ,
"message" : "Opportunity status and attachments updated successfully",
"result" : {
"opportunity_id" : "12345",
"status" : "Approved"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Send Email To Claimants GET /v1/api/opportunities/status/{status}/{username}/{session_id}
Resource URL /v1/api/opportunities/status/{status}/{username}/{session_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
This endpoint performs a sequence of operations:
Checks if opportunities are in the specified status (typically "New").
Finds related claimants.
Retrieves all associated entity data.
Generates access links with tokens for each claimant.
Sends emails to all claimants.
If successful, updates the opportunity status to "Reach-out Request".
Parameter Description Required Type Default Value status Status to filter opportunities by Yes String N/A username Username performing the action Yes String N/A session_id Session ID for tracking or logging Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/opportunities/status/New/john.doe/abc123-session' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Emails sent successfully and status updated to Reach-out Request",
"result" : {
"emails_sent" : 5,
"status_updated" : true
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Get Status List GET /v1/api/next_status/{opportunity_id}
Resource URL /v1/api/next_status/{opportunity_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Retrieves the list of possible next statuses that can be applied to a given opportunity based on its current state.
Parameter Description Required Type Default Value opportunity_id ID of the opportunity Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/next_status/12345' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Next statuses retrieved successfully",
"result" : [
"Reach-out Request" ,
"Claim Evaluation" ,
"Final Review"
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Get Diligence Status List GET /v1/api/get_diligence_status_list
Resource URL /v1/api/get_diligence_status_list/ Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Fetches the list of all available diligence statuses that can be used for filtering or assigning to opportunities.
This endpoint does not require any parameters.
curl -X 'GET' \
'https://braegen.ai/v1/api/get_diligence_status_list/' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Diligence status list retrieved successfully",
"result" : [
"Pending" ,
"In Progress" ,
"Completed" ,
"Rejected"
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - All Statuses GET /v1/api/all_statuses
Resource URL /v1/api/all_statuses/ Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Retrieves a comprehensive list of all statuses available for opportunities.
This endpoint does not require any parameters.
curl -X 'GET' \
'https://braegen.ai/v1/api/all_statuses/' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "All statuses retrieved successfully",
"result" : [
"New" ,
"In Progress" ,
"Completed" ,
"Closed" ,
"Rejected" ,
"Reach-out Request"
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Opportunity Operations - Get Status List By Process Id GET /v1/api/get_status_list_by_process_id/{process_id}
Resource URL /v1/api/get_status_list_by_process_id/{process_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Retrieves the list of available statuses based on the provided process_id. This allows filtering or associating statuses specific to the process.
Parameter Description Required Type Default Value process_id ID of the process Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/get_status_list_by_process_id/abc123' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Status list for process retrieved successfully",
"result" : [
"New" ,
"In Progress" ,
"Completed" ,
"Pending Review"
]
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error