Skip to main content
POST
/
v1
/
deals
Create deal
curl --request POST \
  --url https://api.stardex.ai/v1/deals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "client_linkedin_url": "<string>",
  "amount": 123,
  "currency_code": "<string>",
  "compensation": 1,
  "compensation_currency_code": "<string>",
  "pricing_rate": 50,
  "win_probability": 50,
  "deal_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "closed_date": "<string>",
  "job_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "referred_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "client_contact_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "custom_fields": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "value": "<string>",
      "add_values": [
        "<string>"
      ],
      "remove_values": [
        "<string>"
      ],
      "add_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "remove_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "clear_all": true
    }
  ]
}
'
import requests

url = "https://api.stardex.ai/v1/deals"

payload = {
"name": "<string>",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_linkedin_url": "<string>",
"amount": 123,
"currency_code": "<string>",
"compensation": 1,
"compensation_currency_code": "<string>",
"pricing_rate": 50,
"win_probability": 50,
"deal_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"closed_date": "<string>",
"job_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"referred_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"client_contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_fields": [
{
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"add_values": ["<string>"],
"remove_values": ["<string>"],
"add_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"clear_all": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
client_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
client_linkedin_url: '<string>',
amount: 123,
currency_code: '<string>',
compensation: 1,
compensation_currency_code: '<string>',
pricing_rate: 50,
win_probability: 50,
deal_status_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>',
closed_date: '<string>',
job_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
referred_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
client_contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_fields: [
{
attribute_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
value: '<string>',
add_values: ['<string>'],
remove_values: ['<string>'],
add_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
clear_all: true
}
]
})
};

fetch('https://api.stardex.ai/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.stardex.ai/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>',
'client_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'client_linkedin_url' => '<string>',
'amount' => 123,
'currency_code' => '<string>',
'compensation' => 1,
'compensation_currency_code' => '<string>',
'pricing_rate' => 50,
'win_probability' => 50,
'deal_status_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>',
'closed_date' => '<string>',
'job_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'referred_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'owner_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'client_contact_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_fields' => [
[
'attribute_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>',
'add_values' => [
'<string>'
],
'remove_values' => [
'<string>'
],
'add_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'clear_all' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.stardex.ai/v1/deals"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_linkedin_url\": \"<string>\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.stardex.ai/v1/deals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_linkedin_url\": \"<string>\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.stardex.ai/v1/deals")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_linkedin_url\": \"<string>\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "id": "aaa11111-bbbb-cccc-dddd-eeeeeeee1111",
    "name": "Acme Corp Staffing Agreement",
    "amount": 150000,
    "currency_code": "USD",
    "compensation": 750000,
    "compensation_currency_code": "USD",
    "pricing_rate": 20,
    "win_probability": 75,
    "deal_status_id": "ccc33333-dddd-eeee-ffff-000000003333",
    "client_id": "bbb22222-cccc-dddd-eeee-ffffffff2222",
    "job_ids": [
      "eee55555-ffff-0000-1111-222222225555"
    ],
    "owner_ids": [
      "ddd44444-eeee-ffff-0000-111111114444"
    ],
    "client_contact_ids": [
      "ab12cd34-ef56-7890-ab12-cd34ef567890"
    ],
    "created_at": "2024-01-15T10:00:00Z"
  }
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

Authenticate with a Bearer token: API key, OAuth token, or session token.

Body

application/json
name
string
required

Deal name (required).

Minimum string length: 1
client_id
string<uuid>

Client company UUID.

client_linkedin_url
string<uri>

Client company LinkedIn URL. Used to look up or create the client company if client_id is not provided.

amount
number

Deal amount — the fee the firm invoices the client.

currency_code
string

ISO 4217 currency code (e.g. USD, EUR, GBP). Defaults to the organization setting or USD.

Required string length: 3
compensation
number

Candidate's expected total annual compensation.

Required range: x >= 0
compensation_currency_code
string

ISO 4217 currency code for compensation. Defaults to currency_code (or the organization default / USD).

Required string length: 3
pricing_rate
number

Recruitment fee percentage (0–100).

Required range: 0 <= x <= 100
win_probability
number

Win probability (0–100).

Required range: 0 <= x <= 100
deal_status_id
string<uuid>

Deal status UUID. Use List deal statuses endpoint to get the UUID.

description
string

Description.

closed_date
string

ISO 8601 expected or actual close date.

job_ids
string<uuid>[]

Job UUIDs to link to this deal. Creates entries in the deal_jobs table.

referred_by
string<uuid>

Person UUID of the referrer.

owner_ids
string<uuid>[]

Team member UUIDs to assign as deal owners. If omitted, the caller is auto-assigned when authenticated as a team member.

client_contact_ids
string<uuid>[]

Client contact UUIDs to attach as deal contacts. Get IDs from a client company page or by creating contacts via POST /v1/client-contacts. Each contact must belong to this team. When omitted, the deal is created with no contacts attached.

custom_fields
object[]

Custom field values to set on creation.

Response

Deal created

success
enum<boolean>
required
Available options:
true
data
object
required