होमप्राइसिंग

डेवलपर्स

REST API

रिकॉर्ड, प्रोडक्ट, कस्टम ऑब्जेक्ट और लिस्ट, अंदर और बाहर JSON।

https://api.trypromptlab.com/api/v1
बेस URL
Authorization: Bearer pl_live_…
ऑथ हेडर
  • 10 / सेकंड
  • 300 / मिनट
  • 10,000 / घंटा
हर API की पर रेट लिमिट · 429

API की

SettingsDevelopersAPI keysवर्कस्पेस के मालिक और एडमिन
  • बनाते समय सिर्फ़ एक बार दिखती है।
  • इसे बनाने वाले एडमिन की तरह काम करती है, उन्हीं अनुमतियों के साथ।
  • वह व्यक्ति वर्कस्पेस छोड़ दे तो काम करना बंद कर देती है।
  • इसे कभी भी रद्द किया जा सकता है।

एंडपॉइंट

GET/{resource}सूची
GET/{resource}/{id}एक पाइए
POST/{resource}बनाइए
PATCH/{resource}/{id}बदलिए
DELETE/{resource}/{id}मिटाइए
{resource} इनमें से एक हैcontactsaccountsopportunitiesnotestasksproducts
कस्टम ऑब्जेक्ट और लिस्ट/objects/lists

उदाहरण

अनुरोध
curl -X POST https://api.trypromptlab.com/api/v1/accounts \
  -H "Authorization: Bearer pl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme","website":"https://acme.com"}'
जवाब · 201
{
  "data": {
    "id": "665f1c2a9b1e8a0012ab34cd",
    "object": "account",
    "name": "Acme",
    "website": "https://acme.com",
    "createdAt": "2026-10-22T08:15:51.000Z",
    "updatedAt": "2026-10-22T08:15:51.000Z"
  }
}
PATCH · अनुरोध
curl -X PATCH https://api.trypromptlab.com/api/v1/opportunities/<id> \
  -H "Authorization: Bearer pl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"stage":"QUALIFIED"}'

जवाब

सूची
{
  "data": [ … ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 42,
    "totalPages": 5
  }
}
मिटाना
{
  "data": {
    "id": "665f1c2a…",
    "deleted": true
  }
}
त्रुटि
{
  "statusCode": 401,
  "message": "…",
  "error": "invalid_api_key"
}

त्रुटियाँ

स्टेटसमतलब
400बॉडी या क्वेरी गलत है। अनजान फ़ील्ड पर `property X should not exist` मिलता है।
401API की नहीं है, गलत है या रद्द हो चुकी है
403API की बनाने वाले एडमिन के पास इस रिकॉर्ड या काम की पहुँच नहीं है
404इस id का कोई रिकॉर्ड नहीं
429रेट लिमिट पार: रुकिए और फिर कोशिश कीजिए
500सर्वर त्रुटि: बाद में फिर कोशिश कीजिए। API की अब भी काम करती है।

रिसोर्स

limit: अधिकतम 100, डिफ़ॉल्ट 10। sortOrder: asc या desc।

/contacts

"object": "contact"
फ़ील्डटाइपनोट्स
firstNamestringज़रूरी
lastNamestring
middleNamestring
jobTitlestring
departmentstring
decisionRoleenumDECISION_MAKERINFLUENCERTECHNICAL_EVALUATORBUYERPROCUREMENTEND_USERGATEKEEPER
emailstring
emailsstring[]
phoneobjectvaluelabel: work | mobile | home | other
phoneNumbersobject[]valuelabel: work | mobile | home | other
linkedInstring
addressobjectstreetAddresscitystatezipCodecountry
regionstring
accountIdid→ accounts
opportunityIdid→ opportunities
isPrimaryboolean
customFieldsobject
सूची के फ़िल्टरpagelimitsearchaccountIdopportunityIdsortBysortOrder

/accounts

"object": "account"
फ़ील्डटाइपनोट्स
namestringज़रूरी
websitestring
linkedInstring
phonestring
addressobjectstreetAddresscitystatezipCodecountry
regionstring
primaryIndustrystring
businessTypeenumMANUFACTURERDISTRIBUTORTRADEREND_USER
descriptionstring
sourcestring
estimatedAnnualRevenuenumber
employeeCountnumber
ownerIdid
customFieldsobject
सूची के फ़िल्टरpagelimitsearchprimaryIndustrybusinessTypesortBysortOrder

/opportunities

"object": "opportunity"

अपॉर्चुनिटी का स्टेज PATCH और नए stage से बदलिए।

फ़ील्डटाइपनोट्स
namestring
accountIdid→ accountsज़रूरी
contactIdsid[]→ contacts
assignedSalesOwnerid
stagestring
priorityenumLOWMEDIUMHIGH
sourceenumEXPOLINKEDINDIRECT_MEETINGWEBSITE_INQUIRYDISTRIBUTOR_REFERRALCOLD_CALLEXISTING_CUSTOMER_REFERRALCONFERENCEEMAIL_CAMPAIGNEMAILTRADE_PUBLICATIONSALESFORCEHUBSPOTACUMATICAOTHER
lossReasonenumPRICECOMPETITORTIMINGNO_BUDGETPRODUCT_FITOTHER
closeDatedate
estimatedOpportunityValueUSDnumber
expectedAnnualVolumeMTnumber
nextFollowUpDatedate
customFieldsobject
सूची के फ़िल्टरpagelimitsearchstageaccountIdcontactIdassignedSalesOwnersortBysortOrder

/notes

"object": "note"
फ़ील्डटाइपनोट्स
contentstringज़रूरी
titlestring
accountIdid→ accounts
contactIdid→ contacts
opportunityIdid→ opportunities
customFieldsobject
सूची के फ़िल्टरpagelimitaccountIdcontactIdopportunityId

/tasks

"object": "task"

टास्क PATCH और "status": "completed" से बंद कीजिए।

फ़ील्डटाइपनोट्स
namestringज़रूरी
descriptionstring
assigneeIdsid[]
priorityenumlowmediumhighurgent
taskTypestring
dueDatedate
accountIdid→ accounts
contactsid[]→ contacts
opportunityIdid→ opportunities
customFieldsobject
statusenumसिर्फ़ PATCHtodoin_progresscompletedexpired
सूची के फ़िल्टरpagelimitsearchstatusaccountIdcontactIdopportunityIdsortBysortOrder

/products

"object": "product"

price ज़रूरी है, जब तक hidePrice true न हो।

फ़ील्डटाइपनोट्स
namestringज़रूरी
unitTypestringज़रूरी
currencystringज़रूरी
productCodestring
categorystring
statusenumactiveinactive
productDescriptionstring
pricenumber
costPricenumber
vatPercentagenumber
hidePriceboolean
customFieldsobject
सूची के फ़िल्टरpagelimitsearchstatuscategorysortBysortOrder

कस्टम ऑब्जेक्ट और लिस्ट

इनके फ़ील्ड हर वर्कस्पेस में अलग होते हैं। पहले fields पढ़िए, फिर हर फ़ील्ड की key के हिसाब से values भेजिए। अनजान key पर 400 मिलता है।

/objects

"object": "object""object": "object_record"

GET /objects/{objectId} ऑब्जेक्ट के fields लौटाता है। रिकॉर्ड का डेटा values में रहता है।

GET/objectsसूची
GET/objects/{objectId}एक पाइए
GET/objects/{objectId}/recordsसूची
GET/objects/{objectId}/records/{recordId}एक पाइए
POST/objects/{objectId}/recordsबनाइए
PATCH/objects/{objectId}/records/{recordId}बदलिए
DELETE/objects/{objectId}/records/{recordId}मिटाइए

/lists

"object": "list""object": "list_entry"

POST एक रिकॉर्ड जोड़ता है: recordId (लिस्ट के recordType का) और चाहें तो values। दोबारा जोड़ने पर वही एंट्री लौटती है।

GET/listsसूची
GET/lists/{listId}एक पाइए
GET/lists/{listId}/entriesसूची
GET/lists/{listId}/entries/{entryId}एक पाइए
POST/lists/{listId}/entriesबनाइए
PATCH/lists/{listId}/entries/{entryId}बदलिए
DELETE/lists/{listId}/entries/{entryId}मिटाइए
ऑब्जेक्ट और उसके फ़ील्ड
{
  "data": {
    "id": "665f1c2a9b1e8a0012ab34cd",
    "object": "object",
    "name": "Payments",
    "fields": [
      { "key": "payment", "label": "Payment", "type": "string", "required": false },
      { "key": "status", "label": "Status", "type": "status", "required": false,
        "options": [{ "value": "status_0", "label": "Paid" }] },
      { "key": "amount", "label": "Amount", "type": "currency", "required": false }
    ]
  }
}
रिकॉर्ड बनाइए
curl -X POST https://api.trypromptlab.com/api/v1/objects/<objectId>/records \
  -H "Authorization: Bearer pl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"values":{"payment":"INV-104","status":"status_0","amount":250}}'
लिस्ट में रिकॉर्ड जोड़िए
curl -X POST https://api.trypromptlab.com/api/v1/lists/<listId>/entries \
  -H "Authorization: Bearer pl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"recordId":"<account id>","values":{"tier":"gold"}}'