Dasturchilar
REST API
Beshta yozuv turi, har birida bir xil beshta amal, kirish va chiqishda JSON.
https://api.trypromptlab.com/api/v1
Asosiy URL
Authorization: Bearer pl_live_…
Avtorizatsiya sarlavhasi
- 10 / soniya
- 300 / daqiqa
- 10 000 / soat
Har bir kalit uchun soʻrov limitlari · 429
API kalitlari
SettingsDevelopersAPI keysWorkspace egalari va adminlari
- Yaratilganda faqat bir marta koʻrsatiladi.
- Uni yaratgan admin nomidan, xuddi shu huquqlar bilan ishlaydi.
- Oʻsha odam workspaceʼdan chiqsa, ishlashdan toʻxtaydi.
- Istalgan vaqtda bekor qilish mumkin.
Endpointlar
| GET | /{resource} | Roʻyxat |
| GET | /{resource}/{id} | Bittasini olish |
| POST | /{resource} | Yaratish |
| PATCH | /{resource}/{id} | Yangilash |
| DELETE | /{resource}/{id} | Oʻchirish |
Misol
curl -X POST https://api.trypromptlab.com/api/v1/companies \
-H "Authorization: Bearer pl_live_…" \
-H "Content-Type: application/json" \
-d '{"name":"Acme","website":"https://acme.com"}'{
"data": {
"id": "665f1c2a9b1e8a0012ab34cd",
"object": "company",
"name": "Acme",
"website": "https://acme.com",
"createdAt": "2026-10-22T08:15:51.000Z",
"updatedAt": "2026-10-22T08:15:51.000Z"
}
}curl -X PATCH https://api.trypromptlab.com/api/v1/deals/<id> \
-H "Authorization: Bearer pl_live_…" \
-H "Content-Type: application/json" \
-d '{"stage":"QUALIFIED"}'Javoblar
{
"data": [ … ],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"totalPages": 5
}
}{
"data": {
"id": "665f1c2a…",
"deleted": true
}
}{
"statusCode": 401,
"message": "…",
"error": "invalid_api_key"
}Xatolar
| Status | Maʼnosi |
|---|---|
| 400 | Soʻrov tanasi yoki parametrlari notoʻgʻri. Nomaʼlum maydon `property X should not exist` qaytaradi. |
| 401 | Kalit yoʻq, notoʻgʻri yoki bekor qilingan |
| 403 | Kalitni yaratgan adminning bu yozuv yoki amalga ruxsati yoʻq |
| 404 | Bu id bilan yozuv yoʻq |
| 429 | Limitdan oshdi: kuting va qayta urinib koʻring |
| 500 | Server xatosi: keyinroq qayta urinib koʻring. Kalit ishlashda davom etadi. |
Resurslar
limit: koʻpi bilan 100, standart 10. sortOrder: asc yoki desc.
/contacts
"object": "contact"| Maydon | Turi | Izohlar |
|---|---|---|
firstName | string | Majburiy |
lastName | string | |
middleName | string | |
jobTitle | string | |
department | string | |
decisionRole | enum | DECISION_MAKERINFLUENCERTECHNICAL_EVALUATORBUYERPROCUREMENTEND_USERGATEKEEPER |
email | string | |
emails | string[] | |
phone | object | valuelabel: work | mobile | home | other |
phoneNumbers | object[] | valuelabel: work | mobile | home | other |
linkedIn | string | |
address | object | streetAddresscitystatezipCodecountry |
region | string | |
accountId | id→ companies | |
leadId | id→ deals | |
isPrimary | boolean | |
customFields | object |
Roʻyxat filtrlaripagelimitsearchaccountIdleadIdsortBysortOrder
/companies
"object": "company"| Maydon | Turi | Izohlar |
|---|---|---|
name | string | Majburiy |
website | string | |
linkedIn | string | |
phone | string | |
address | object | streetAddresscitystatezipCodecountry |
region | string | |
primaryIndustry | string | |
businessType | enum | MANUFACTURERDISTRIBUTORTRADEREND_USER |
description | string | |
source | string | |
estimatedAnnualRevenue | number | |
employeeCount | number | |
ownerId | id | |
customFields | object |
Roʻyxat filtrlaripagelimitsearchprimaryIndustrybusinessTypesortBysortOrder
/deals
"object": "deal"Bitimni PATCH va yangi stage bilan boshqa bosqichga oʻtkazing.
| Maydon | Turi | Izohlar |
|---|---|---|
name | string | |
accountId | id→ companies | Majburiy |
contactIds | id[]→ contacts | |
assignedSalesOwner | id | |
stage | string | |
priority | enum | LOWMEDIUMHIGH |
source | enum | EXPOLINKEDINDIRECT_MEETINGWEBSITE_INQUIRYDISTRIBUTOR_REFERRALCOLD_CALLEXISTING_CUSTOMER_REFERRALCONFERENCEEMAIL_CAMPAIGNEMAILTRADE_PUBLICATIONSALESFORCEHUBSPOTACUMATICAOTHER |
lossReason | enum | PRICECOMPETITORTIMINGNO_BUDGETPRODUCT_FITOTHER |
closeDate | date | |
estimatedOpportunityValueUSD | number | |
expectedAnnualVolumeMT | number | |
nextFollowUpDate | date | |
customFields | object |
Roʻyxat filtrlaripagelimitsearchstageaccountIdcontactIdassignedSalesOwnersortBysortOrder
/notes
"object": "note"| Maydon | Turi | Izohlar |
|---|---|---|
content | string | Majburiy |
title | string | |
accountId | id→ companies | |
contactId | id→ contacts | |
leadId | id→ deals | |
customFields | object |
Roʻyxat filtrlaripagelimitaccountIdcontactIdleadId
/tasks
"object": "task"Vazifani PATCH va "status": "completed" bilan yoping.
| Maydon | Turi | Izohlar |
|---|---|---|
name | string | Majburiy |
description | string | |
assigneeIds | id[] | |
priority | enum | lowmediumhighurgent |
taskType | string | |
dueDate | date | |
accountId | id→ companies | |
contacts | id[]→ contacts | |
opportunityId | id→ deals | |
customFields | object | |
status | enum | Faqat PATCHtodoin_progresscompletedexpired |
Roʻyxat filtrlaripagelimitsearchstatusaccountIdcontactIdopportunityIdsortBysortOrder





