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,
  "win_probability": 50,
  "deal_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "closed_date": "<string>",
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "referred_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_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
    }
  ]
}
'
{
  "success": true,
  "data": {
    "id": "aaa11111-bbbb-cccc-dddd-eeeeeeee1111",
    "name": "Acme Corp Staffing Agreement",
    "amount": 150000,
    "win_probability": 75,
    "deal_status_id": "ccc33333-dddd-eeee-ffff-000000003333",
    "client_id": "bbb22222-cccc-dddd-eeee-ffffffff2222",
    "job_id": "eee55555-ffff-0000-1111-222222225555",
    "created_at": "2024-01-15T10:00:00Z"
  }
}

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.

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_id
string<uuid>

Associated job UUID.

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.

custom_fields
object[]

Custom field values to set on creation.

Response

Deal created

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