LetsBot मेन्यू
शुरू करें हिन्दी भाषा

Meta Business Partner UK में रजिस्टर्ड कंपनी

भाषा

CRM · API एंडपॉइंट

POST /api/v1/crm/deals नया

Create a deal

Creates a deal. Without stage_id it starts in the first open stage of pipeline_id (the default pipeline when omitted).

Creates a deal. Without stage_id it starts in the first open stage of pipeline_id (the default pipeline when omitted). Scope: crm.

Required: title. Optional: pipeline_id, stage_id (see List pipelines and stages), amount, currency (3 letters), contact_id, company_id, owner_user_id, expected_close_date (YYYY-MM-DD).

JSON बॉडी

{
  "title": "Epoxy kit order — 40 units",
  "pipeline_id": 1,
  "amount": 12000,
  "currency": "SAR",
  "contact_id": 42,
  "company_id": 7,
  "expected_close_date": "2026-10-31"
}

उदाहरण अनुरोध

curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals" \
  -H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Epoxy kit order — 40 units",
  "pipeline_id": 1,
  "amount": 12000,
  "currency": "SAR",
  "contact_id": 42,
  "company_id": 7,
  "expected_close_date": "2026-10-31"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals", {
  method: "POST",
  headers: {
    "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "Epoxy kit order — 40 units",
    "pipeline_id": 1,
    "amount": 12000,
    "currency": "SAR",
    "contact_id": 42,
    "company_id": 7,
    "expected_close_date": "2026-10-31"
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
    {
        "title": "Epoxy kit order — 40 units",
        "pipeline_id": 1,
        "amount": 12000,
        "currency": "SAR",
        "contact_id": 42,
        "company_id": 7,
        "expected_close_date": "2026-10-31"
    }
    JSON,
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://your-workspace.letsbot.net/api/v1/crm/deals",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "title": "Epoxy kit order — 40 units",
        "pipeline_id": 1,
        "amount": 12000,
        "currency": "SAR",
        "contact_id": 42,
        "company_id": 7,
        "expected_close_date": "2026-10-31",
    },
)

print(response.json())

प्रतिक्रियाएँ

Created201
{
  "success": true,
  "data": {
    "id": 15,
    "title": "Epoxy kit order — 40 units",
    "amount": 12000,
    "currency": "SAR",
    "pipeline_id": 1,
    "stage": {
      "id": 11,
      "name": "New"
    },
    "status": "open",
    "expected_close_date": "2026-10-31",
    "contact": {
      "id": 42,
      "name": "Ahmed Ali",
      "phone": "966500000000"
    },
    "company_id": 7,
    "owner": {
      "id": 3,
      "name": "Sara Ahmed"
    },
    "lost_reason_id": null,
    "lost_note": null,
    "won_at": null,
    "lost_at": null,
    "custom_fields": {},
    "created_at": "2026-10-02T10:00:00+03:00",
    "updated_at": "2026-10-08T09:30:00+03:00",
    "url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
  }
}
Validation failed422
{
  "success": false,
  "error": "The title field is required.",
  "code": "validation_failed",
  "errors": {
    "title": [
      "The title field is required."
    ]
  }
}

जब आप तैयार हों, हम तैयार हैं

इस एंडपॉइंट को अपने नंबर पर आज़माएँ

API मुफ़्त ट्रायल के दौरान काम करता है। खाता बनाएँ, अपना WhatsApp नंबर जोड़ें और API → प्रमाणीकरण डेटा से अपनी कुंजी कॉपी करें।