Create Deal
curl --request POST \
--url https://api.example.com/v1/deals \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"stage": "<string>",
"status": "<string>",
"pipeline": "<string>",
"estimated_value": 123,
"contact_id": "<string>",
"owner_id": "<string>",
"priority": "<string>",
"deal_type": "<string>",
"notes": "<string>",
"tags": [
{}
],
"description": "<string>",
"follow_up_date": "<string>",
"probability": 123,
"currency": "<string>",
"related_company_id": "<string>",
"relationship_partner_id": "<string>",
"matter_lead_id": "<string>",
"team_member_ids": [
{}
],
"fee_model": "<string>"
}
'import requests
url = "https://api.example.com/v1/deals"
payload = {
"name": "<string>",
"stage": "<string>",
"status": "<string>",
"pipeline": "<string>",
"estimated_value": 123,
"contact_id": "<string>",
"owner_id": "<string>",
"priority": "<string>",
"deal_type": "<string>",
"notes": "<string>",
"tags": [{}],
"description": "<string>",
"follow_up_date": "<string>",
"probability": 123,
"currency": "<string>",
"related_company_id": "<string>",
"relationship_partner_id": "<string>",
"matter_lead_id": "<string>",
"team_member_ids": [{}],
"fee_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
stage: '<string>',
status: '<string>',
pipeline: '<string>',
estimated_value: 123,
contact_id: '<string>',
owner_id: '<string>',
priority: '<string>',
deal_type: '<string>',
notes: '<string>',
tags: [{}],
description: '<string>',
follow_up_date: '<string>',
probability: 123,
currency: '<string>',
related_company_id: '<string>',
relationship_partner_id: '<string>',
matter_lead_id: '<string>',
team_member_ids: [{}],
fee_model: '<string>'
})
};
fetch('https://api.example.com/v1/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/deals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'stage' => '<string>',
'status' => '<string>',
'pipeline' => '<string>',
'estimated_value' => 123,
'contact_id' => '<string>',
'owner_id' => '<string>',
'priority' => '<string>',
'deal_type' => '<string>',
'notes' => '<string>',
'tags' => [
[
]
],
'description' => '<string>',
'follow_up_date' => '<string>',
'probability' => 123,
'currency' => '<string>',
'related_company_id' => '<string>',
'relationship_partner_id' => '<string>',
'matter_lead_id' => '<string>',
'team_member_ids' => [
[
]
],
'fee_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/deals"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/deals")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Deals
Create Deal
Create a new deal in your workspace
POST
/
v1
/
deals
Create Deal
curl --request POST \
--url https://api.example.com/v1/deals \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"stage": "<string>",
"status": "<string>",
"pipeline": "<string>",
"estimated_value": 123,
"contact_id": "<string>",
"owner_id": "<string>",
"priority": "<string>",
"deal_type": "<string>",
"notes": "<string>",
"tags": [
{}
],
"description": "<string>",
"follow_up_date": "<string>",
"probability": 123,
"currency": "<string>",
"related_company_id": "<string>",
"relationship_partner_id": "<string>",
"matter_lead_id": "<string>",
"team_member_ids": [
{}
],
"fee_model": "<string>"
}
'import requests
url = "https://api.example.com/v1/deals"
payload = {
"name": "<string>",
"stage": "<string>",
"status": "<string>",
"pipeline": "<string>",
"estimated_value": 123,
"contact_id": "<string>",
"owner_id": "<string>",
"priority": "<string>",
"deal_type": "<string>",
"notes": "<string>",
"tags": [{}],
"description": "<string>",
"follow_up_date": "<string>",
"probability": 123,
"currency": "<string>",
"related_company_id": "<string>",
"relationship_partner_id": "<string>",
"matter_lead_id": "<string>",
"team_member_ids": [{}],
"fee_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
stage: '<string>',
status: '<string>',
pipeline: '<string>',
estimated_value: 123,
contact_id: '<string>',
owner_id: '<string>',
priority: '<string>',
deal_type: '<string>',
notes: '<string>',
tags: [{}],
description: '<string>',
follow_up_date: '<string>',
probability: 123,
currency: '<string>',
related_company_id: '<string>',
relationship_partner_id: '<string>',
matter_lead_id: '<string>',
team_member_ids: [{}],
fee_model: '<string>'
})
};
fetch('https://api.example.com/v1/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/deals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'stage' => '<string>',
'status' => '<string>',
'pipeline' => '<string>',
'estimated_value' => 123,
'contact_id' => '<string>',
'owner_id' => '<string>',
'priority' => '<string>',
'deal_type' => '<string>',
'notes' => '<string>',
'tags' => [
[
]
],
'description' => '<string>',
'follow_up_date' => '<string>',
'probability' => 123,
'currency' => '<string>',
'related_company_id' => '<string>',
'relationship_partner_id' => '<string>',
'matter_lead_id' => '<string>',
'team_member_ids' => [
[
]
],
'fee_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/deals"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/deals")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"stage\": \"<string>\",\n \"status\": \"<string>\",\n \"pipeline\": \"<string>\",\n \"estimated_value\": 123,\n \"contact_id\": \"<string>\",\n \"owner_id\": \"<string>\",\n \"priority\": \"<string>\",\n \"deal_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"description\": \"<string>\",\n \"follow_up_date\": \"<string>\",\n \"probability\": 123,\n \"currency\": \"<string>\",\n \"related_company_id\": \"<string>\",\n \"relationship_partner_id\": \"<string>\",\n \"matter_lead_id\": \"<string>\",\n \"team_member_ids\": [\n {}\n ],\n \"fee_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Request
Body Parameters
string
required
Deal name
string
Deal stage name
string
default:"active"
Deal status (
active, won, lost)string
Pipeline name
number
Estimated deal value
string
Primary contact ID (alias for
main_contact_id)string
Deal owner user ID (alias for
owner_user_id)string
Priority level
string
Deal/matter type (alias for
matter_type)string
Deal notes
array
Array of tag strings
string
High-level description
string
Next follow-up date (ISO 8601)
number
Win probability (0-100)
string
Currency code (e.g.,
USD, EUR)string
Related company ID
string
Relationship partner user ID
string
Matter lead user ID
array
Array of team member user IDs
string
Fee/service model
Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Response
object
The created deal object with all fields
curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/deals \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp Partnership",
"stage": "Proposal",
"pipeline": "Sales",
"estimated_value": 50000,
"contact_id": "contact-001",
"priority": "high"
}'
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
response = requests.post(f"{BASE_URL}/v1/deals", headers=headers, json={
"name": "Acme Corp Partnership",
"stage": "Proposal",
"pipeline": "Sales",
"estimated_value": 50000
})
print(response.json())
const response = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/deals',
{
method: 'POST',
headers: {
'Authorization': 'Bearer wbk_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Acme Corp Partnership',
stage: 'Proposal',
pipeline: 'Sales',
estimated_value: 50000
})
}
);
const { data } = await response.json();
Example Response
{
"data": {
"id": "deal-001",
"name": "Acme Corp Partnership",
"stage": "Proposal",
"status": "active",
"pipeline": "Sales",
"estimated_value": 50000,
"main_contact_id": "contact-001",
"owner_user_id": null,
"priority": "high",
"tags": [],
"created_date": "2026-03-06T10:00:00Z",
"updated_date": null
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing name |
| 403 | insufficient_permissions | Missing deals:write permission |
| 429 | rate_limited | Rate limit exceeded |