مرجع API

۶۴ عملیات نسخه ۱. خطاها problem+json هستند و پاسخ‌ها ممکن است فیلد تازه بگیرند؛ فیلدهای ناشناخته را نادیده بگیرید.

نشانی پایه
https://pooshe.cloud/api/v1
احراز هویت
Authorization: Bearer slk_…
مستند ماشینی
OpenAPI 3.1 (JSON)

کلید

get/api/v1/keyany valid key

کلید فعلی، فضای کاری و دامنه‌های مؤثر آن

Any valid key may call this, whatever its scopes. A good first call to check configuration.

پاسخ 200KeyInfo
فیلدهای پاسخ
keyrequiredobject
workspacerequiredobject
actingAsrequiredobject
rateLimitrequiredobject
curl -sS "https://pooshe.cloud/api/v1/key" \
  -H "Authorization: Bearer $POOSHE_API_KEY"

فایل‌ها و پوشه‌ها

get/api/v1/drivefiles:read

محتوای یک پوشه (بدون folderId: ریشه)

پارامترها
folderIdquery · stringFolder id; omit for the root
limitquery · integerPage size (1–500, default 200)
cursorquery · string`nextCursor` from the previous page
پاسخ 200DriveListing
فیلدهای پاسخ
folderrequiredobject | null
breadcrumbrequiredobject[]Root first; empty at the root and on pages after the first
foldersrequiredFolderSummary[]Subfolders (first page only)
documentsrequiredDriveFile & object[]
nextCursorrequiredstring | nullPass as `cursor` to get the next page; null on the last page
totalFilesrequiredinteger-9007199254740991…9007199254740991
curl -sS "https://pooshe.cloud/api/v1/drive" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/drive/foldersfiles:read

همه پوشه‌ها به‌صورت فهرست تخت

پاسخ 200FolderTree
فیلدهای پاسخ
foldersrequiredobject[]
curl -sS "https://pooshe.cloud/api/v1/drive/folders" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/drive/foldersfiles:write

ساخت پوشه

Names are unique per parent (case-insensitive); depth ≤ 20.

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namerequiredstringlength 1–120
parentIdstring | nullOmit or null for the root
پاسخ 201Folder
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
parentIdrequiredstring | null
createdByIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
trashedAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/drive/folders" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"قراردادها"}'
patch/api/v1/drive/folders/{id}files:write

تغییر نام یا جابه‌جایی پوشه

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namestringlength 1–120
parentIdstring | null
پاسخ 200Folder
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
parentIdrequiredstring | null
createdByIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
trashedAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X PATCH "https://pooshe.cloud/api/v1/drive/folders/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
post/api/v1/drive/folders/{id}/trashfiles:write

انتقال پوشه و محتوایش به سطل زباله

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200FolderTrashed
فیلدهای پاسخ
foldersrequiredintegerFolders moved to the trash (with subfolders) · -9007199254740991…9007199254740991
filesrequiredinteger-9007199254740991…9007199254740991
curl -sS -X POST "https://pooshe.cloud/api/v1/drive/folders/ID/trash" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
post/api/v1/drive/folders/{id}/restorefiles:write

بازگرداندن پوشه از سطل زباله

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200FolderRestored
فیلدهای پاسخ
filesrequiredinteger-9007199254740991…9007199254740991
namerequiredstringFinal name (a suffix is added if the old one is taken)
parentIdrequiredstring | null
curl -sS -X POST "https://pooshe.cloud/api/v1/drive/folders/ID/restore" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
post/api/v1/drive/movefiles:write

جابه‌جایی فایل‌ها به یک پوشه (همه یا هیچ)

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
documentIdsrequiredstring[]≤ 500 items
folderIdrequiredstring | null
پاسخ 200MoveResult
فیلدهای پاسخ
movedrequiredinteger-9007199254740991…9007199254740991
curl -sS -X POST "https://pooshe.cloud/api/v1/drive/move" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"documentIds":[],"folderId":"…"}'
get/api/v1/drive/trashfiles:read

محتوای سطل زباله و مدت نگهداری

پاسخ 200Trash
فیلدهای پاسخ
retentionDaysrequiredinteger-9007199254740991…9007199254740991
foldersrequiredobject[]
documentsrequiredobject[]
curl -sS "https://pooshe.cloud/api/v1/drive/trash" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
delete/api/v1/drive/trash/{documentId}files:write

حذف همیشگی فایل از سطل زباله

پارامترها
documentIdrequiredpath · string
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X DELETE "https://pooshe.cloud/api/v1/drive/trash/DOCUMENTID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"

آپلود

post/api/v1/uploadsfiles:write

شروع آپلود یک‌درخواستی

Step 1 of 3: reserves quota and returns a version id. Then PUT the bytes and POST finalize. For files over ~50 MB or unreliable networks use upload sessions.

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
fileNamerequiredstringlength 1–255
sizerequiredintegerExact size in bytes; the body must match it · −∞…9007199254740991
mimestringlength 0–120
documentIdstringUpload a new version of this file instead of a new file · length 0–40
titlestringlength 0–200
folderIdstring | null
پاسخ 201UploadTicket
فیلدهای پاسخ
documentIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
versionIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
maxBytesrequiredinteger-9007199254740991…9007199254740991
curl -sS -X POST "https://pooshe.cloud/api/v1/uploads" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"proposal.pdf","size":482113,"folderId":null}'
put/api/v1/uploads/{versionId}/contentfiles:write

ارسال بایت‌های فایل

Content-Length is required and must equal the declared size. Streamed to storage, never buffered.

پارامترها
versionIdrequiredpath · string

بدنه: بایت‌های خام با Content-Type: application/octet-stream و Content-Length.

پاسخ 200UploadReceived
فیلدهای پاسخ
sizerequiredinteger-9007199254740991…9007199254740991
curl -sS -X PUT "https://pooshe.cloud/api/v1/uploads/VERSIONID/content" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @file.bin
post/api/v1/uploads/{versionId}/finalizefiles:write

نهایی‌سازی آپلود و شروع بررسی

Idempotent. The version becomes ready after the virus scan (seconds); poll GET /versions/{id} or subscribe to the document.ready webhook.

پارامترها
versionIdrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200UploadStatus
فیلدهای پاسخ
statusrequiredstringquarantined right after finalize: the virus scan and processing run in the background; poll GET /versions/{id}
curl -sS -X POST "https://pooshe.cloud/api/v1/uploads/VERSIONID/finalize" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
post/api/v1/upload-sessionsfiles:write

شروع آپلود چندبخشی قابل ادامه

Returns the part size and count. PUT each part (any order, retry freely), then POST complete. Sessions last 24 h.

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
fileNamerequiredstringlength 1–255
sizerequiredinteger−∞…9007199254740991
mimestringlength 0–120
titlestringlength 0–200
documentIdstringlength 0–40
folderIdstring | null
پاسخ 201UploadSession
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
versionIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
documentIdstringOpaque id (cuid2, ≤ 40 chars)
statusrequired"open" | "completing" | "completed" | "aborted" | "expired" | string
sizerequiredinteger-9007199254740991…9007199254740991
partSizerequiredintegerEvery part but the last is exactly this many bytes · -9007199254740991…9007199254740991
totalPartsrequiredinteger-9007199254740991…9007199254740991
receivedPartsrequiredinteger[]Part numbers already stored; resume by sending the others
expiresAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/upload-sessions" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"…","size":1}'
get/api/v1/upload-sessions/{id}files:read

وضعیت آپلود چندبخشی و بخش‌های رسیده

پارامترها
idrequiredpath · string
پاسخ 200UploadSession
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
versionIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
documentIdstringOpaque id (cuid2, ≤ 40 chars)
statusrequired"open" | "completing" | "completed" | "aborted" | "expired" | string
sizerequiredinteger-9007199254740991…9007199254740991
partSizerequiredintegerEvery part but the last is exactly this many bytes · -9007199254740991…9007199254740991
totalPartsrequiredinteger-9007199254740991…9007199254740991
receivedPartsrequiredinteger[]Part numbers already stored; resume by sending the others
expiresAtrequiredstring (date-time)
curl -sS "https://pooshe.cloud/api/v1/upload-sessions/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
delete/api/v1/upload-sessions/{id}files:write

لغو آپلود چندبخشی و آزادسازی فضا

پارامترها
idrequiredpath · string
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X DELETE "https://pooshe.cloud/api/v1/upload-sessions/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
put/api/v1/upload-sessions/{id}/parts/{n}files:write

ارسال بخش n

Sending the same part again replaces it, so retries are safe without an Idempotency-Key.

پارامترها
idrequiredpath · string
nrequiredpath · string

بدنه: بایت‌های خام با Content-Type: application/octet-stream و Content-Length.

پاسخ 200PartReceived
فیلدهای پاسخ
partNumberrequiredinteger-9007199254740991…9007199254740991
sizerequiredinteger-9007199254740991…9007199254740991
curl -sS -X PUT "https://pooshe.cloud/api/v1/upload-sessions/ID/parts/1" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @file.bin
post/api/v1/upload-sessions/{id}/completefiles:write

سرهم کردن بخش‌ها و نهایی‌سازی

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200UploadCompleted
فیلدهای پاسخ
statusrequired"completed"
versionIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
curl -sS -X POST "https://pooshe.cloud/api/v1/upload-sessions/ID/complete" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

فایل، نسخه و دانلود

get/api/v1/documentsfiles:read

فهرست فایل‌ها، تازه‌ترین اول

پارامترها
qquery · stringFilter by title
limitquery · integerPage size (1–50, default 20)
cursorquery · string`nextCursor` from the previous page
پاسخ 200DocumentList
فیلدهای پاسخ
itemsrequiredobject[]
nextCursorrequiredstring | nullPass as `cursor` to get the next page; null on the last page
curl -sS "https://pooshe.cloud/api/v1/documents" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/documents/{id}files:read

یک فایل با همه نسخه‌ها (اندازه، SHA-256، وضعیت)

پارامترها
idrequiredpath · string
پاسخ 200Document
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
titlerequiredstring
statusrequiredstring
trackablerequiredboolean
folderIdrequiredstring | null
currentVersionIdrequiredstring | null
createdByIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
trashedAtrequiredstring (date-time) | null
versionsrequiredobject[]
curl -sS "https://pooshe.cloud/api/v1/documents/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
patch/api/v1/documents/{id}files:write

تغییر نام فایل یا صفحه‌های کلیدی

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
titlestringlength 1–200
keyPagesinteger[]≤ 20 items
پاسخ 200DocumentPatched
فیلدهای پاسخ
okrequiredtrue
keyPagesinteger[]
curl -sS -X PATCH "https://pooshe.cloud/api/v1/documents/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
post/api/v1/documents/{id}/trashfiles:write

انتقال فایل به سطل زباله (لینک‌هایش از کار می‌افتند)

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X POST "https://pooshe.cloud/api/v1/documents/ID/trash" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
post/api/v1/documents/{id}/restorefiles:write

بازگرداندن فایل از سطل زباله

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X POST "https://pooshe.cloud/api/v1/documents/ID/restore" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
get/api/v1/versions/{id}files:read

وضعیت پردازش یک نسخه

پارامترها
idrequiredpath · string
پاسخ 200Version
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
documentIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
numberrequiredinteger-9007199254740991…9007199254740991
statusrequired"uploading" | "quarantined" | "scanning" | "processing" | "ready" | "failed" | "rejected" | string
errorCoderequiredstring | null
pageCountrequiredinteger | null
curl -sS "https://pooshe.cloud/api/v1/versions/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/versions/{id}/originalfiles:read

دانلود بایت‌های اصلی

Audited. Content-Disposition carries the original file name.

پارامترها
idrequiredpath · string
پاسخ 200فایل (application/octet-stream)
curl -sS "https://pooshe.cloud/api/v1/versions/ID/original" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -o file.bin

CRM

get/api/v1/contactscrm:read

فهرست مخاطبان با میزان تعامل

پارامترها
qquery · stringName, e-mail or phone
companyIdquery · stringOnly this company
limitquery · integerPage size (1–100, default 50)
cursorquery · string`nextCursor` from the previous page
پاسخ 200ContactList
فیلدهای پاسخ
itemsrequiredContact & object[]
nextCursorrequiredstring | nullPass as `cursor` to get the next page; null on the last page
curl -sS "https://pooshe.cloud/api/v1/contacts" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/contactscrm:write

ساخت مخاطب

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namerequiredstringlength 1–120
emailstring | null
phonestring | null
jobTitlestring | null
notestringlength 0–2000
companyIdstring | null
companyNamestring | null
ownerIdstringlength 0–40
پاسخ 201Contact
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
emailrequiredstring | null
phonerequiredstring | null
jobTitlerequiredstring | null
noterequiredstring
companyIdrequiredstring | null
ownerIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/contacts" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"رضا احمدی","email":"reza@example.com","companyName":"شرکت نمونه"}'
get/api/v1/contacts/{id}crm:read

یک مخاطب با لینک‌ها، رویدادها و پاسخ‌ها

پارامترها
idrequiredpath · string
پاسخ 200ContactDetail
فیلدهای پاسخ
contactrequiredContact
ownerrequiredobject | null
linksrequiredany[]
timelinerequiredany[]
responsesrequiredany[]
canEditrequiredboolean
curl -sS "https://pooshe.cloud/api/v1/contacts/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
patch/api/v1/contacts/{id}crm:write

ویرایش مخاطب

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namestringlength 1–120
emailstring | null
phonestring | null
jobTitlestring | null
notestringlength 0–2000
companyIdstring | null
companyNamestring | null
ownerIdstringlength 0–40
پاسخ 200Contact
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
emailrequiredstring | null
phonerequiredstring | null
jobTitlerequiredstring | null
noterequiredstring
companyIdrequiredstring | null
ownerIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X PATCH "https://pooshe.cloud/api/v1/contacts/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
delete/api/v1/contacts/{id}crm:write

حذف مخاطب

پارامترها
idrequiredpath · string
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X DELETE "https://pooshe.cloud/api/v1/contacts/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/companiescrm:read

فهرست شرکت‌ها

پارامترها
qquery · stringName or domain
پاسخ 200CompanyList
فیلدهای پاسخ
itemsrequiredCompany[]
curl -sS "https://pooshe.cloud/api/v1/companies" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/companiescrm:write

ساخت شرکت

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namerequiredstringlength 1–120
domainstring | null
notestringlength 0–2000
پاسخ 201Company
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
domainrequiredstring | null
noterequiredstring
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/companies" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'
get/api/v1/companies/{id}crm:read

یک شرکت با مخاطبانش

پارامترها
idrequiredpath · string
پاسخ 200CompanyDetail
فیلدهای پاسخ
companyrequiredCompany
curl -sS "https://pooshe.cloud/api/v1/companies/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
patch/api/v1/companies/{id}crm:write

ویرایش شرکت

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namestringlength 1–120
domainstring | null
notestringlength 0–2000
پاسخ 200Company
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
domainrequiredstring | null
noterequiredstring
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X PATCH "https://pooshe.cloud/api/v1/companies/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
delete/api/v1/companies/{id}crm:write

حذف شرکت (مخاطبانش می‌مانند)

پارامترها
idrequiredpath · string
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X DELETE "https://pooshe.cloud/api/v1/companies/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/leadscrm:read

سرنخ‌های داغ بر اساس تعامل اخیر

پارامترها
scopequery · "team"`team` for every member’s contacts (needs the permission)
پاسخ 200LeadList
فیلدهای پاسخ
itemsrequiredobject[]
curl -sS "https://pooshe.cloud/api/v1/leads" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
get/api/v1/followupscrm:read

یادآوری‌های پیگیری

پارامترها
contactIdquery · stringOnly this contact
پاسخ 200FollowUpList
فیلدهای پاسخ
itemsrequiredFollowUp[]
curl -sS "https://pooshe.cloud/api/v1/followups" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/followupscrm:write

ساخت یادآوری پیگیری

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
contactIdrequiredstringlength 0–40
dueInDaysinteger0…365
dueAtstring (date-time)
notestringlength 0–1000
پاسخ 201FollowUp
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
contactIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
ownerIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
kindrequiredstring
statusrequired"open" | "done" | "dismissed"
dueAtrequiredstring (date-time)
noterequiredstring
doneAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/followups" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"contactId":"…"}'
patch/api/v1/followups/{id}crm:write

انجام‌شده یا کنار گذاشتن پیگیری

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
statusrequired"done" | "dismissed"
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X PATCH "https://pooshe.cloud/api/v1/followups/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"status":"done"}'
get/api/v1/notescrm:read

یادداشت‌های مخاطب، شرکت یا فرصت

پارامترها
contactIdquery · stringContact
companyIdquery · stringCompany
opportunityIdquery · stringOpportunity
پاسخ 200NoteList
فیلدهای پاسخ
notesrequiredNote[]
curl -sS "https://pooshe.cloud/api/v1/notes" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/notescrm:write

افزودن یادداشت

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
bodyrequiredstringlength 1–4000
contactIdstringlength 0–40
companyIdstringlength 0–40
opportunityIdstringlength 0–40
پاسخ 201Note
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
bodyrequiredstring
authorIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
contactIdrequiredstring | null
companyIdrequiredstring | null
opportunityIdrequiredstring | null
createdAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/notes" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"body":"…"}'
get/api/v1/opportunitiescrm:read

فرصت‌های فروش و جمع هر مرحله

پارامترها
contactIdquery · stringContact
companyIdquery · stringCompany
پاسخ 200OpportunityList
فیلدهای پاسخ
opportunitiesrequiredOpportunity[]
byStagerequiredobject
curl -sS "https://pooshe.cloud/api/v1/opportunities" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/opportunitiescrm:write

ساخت فرصت فروش

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
titlerequiredstringlength 1–160
contactIdstring | null
companyIdstring | null
stage"lead" | "qualified" | "proposal" | "negotiation" | "won" | "lost"
valueRialstring | number | null
expectedCloseAtstring (date-time) | null
lostReasonstring | null
ownerIdstringlength 0–40
پاسخ 201Opportunity
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
titlerequiredstring
stagerequiredstring
valueRialrequiredstring | null
contactIdrequiredstring | null
companyIdrequiredstring | null
ownerIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
expectedCloseAtrequiredstring (date-time) | null
closedAtrequiredstring (date-time) | null
lostReasonrequiredstring | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/opportunities" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"title":"قرارداد سالانه","valueRial":"1000000000","stage":"proposal"}'
get/api/v1/opportunities/{id}crm:read

یک فرصت فروش

پارامترها
idrequiredpath · string
پاسخ 200OpportunityDetail
فیلدهای پاسخ
opportunityOpportunity
curl -sS "https://pooshe.cloud/api/v1/opportunities/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
patch/api/v1/opportunities/{id}crm:write

ویرایش فرصت (مرحله، مبلغ، تاریخ…)

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
titlestringlength 1–160
contactIdstring | null
companyIdstring | null
stage"lead" | "qualified" | "proposal" | "negotiation" | "won" | "lost"
valueRialstring | number | null
expectedCloseAtstring (date-time) | null
lostReasonstring | null
ownerIdstringlength 0–40
پاسخ 200Opportunity
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
titlerequiredstring
stagerequiredstring
valueRialrequiredstring | null
contactIdrequiredstring | null
companyIdrequiredstring | null
ownerIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
expectedCloseAtrequiredstring (date-time) | null
closedAtrequiredstring (date-time) | null
lostReasonrequiredstring | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X PATCH "https://pooshe.cloud/api/v1/opportunities/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
patch/api/v1/responses/{id}crm:write

رسیدگی‌شده کردن پاسخ بیننده

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X PATCH "https://pooshe.cloud/api/v1/responses/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

پیش‌فاکتور

get/api/v1/catalogquotes:read

کالاها و خدمات

پارامترها
qquery · stringSearch
allquery · "1"`1` to include inactive items
پاسخ 200CatalogList
فیلدهای پاسخ
itemsrequiredCatalogItem[]
curl -sS "https://pooshe.cloud/api/v1/catalog" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/catalogquotes:write

افزودن کالا یا خدمت

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namerequiredstringlength 1–160
skustring | null
unitstringlength 1–20
unitPriceRialrequiredstring | number
taxableboolean
descriptionstring | null
activeboolean
پاسخ 201CatalogItem
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
skurequiredstring | null
unitrequiredstring
unitPriceRialrequiredstringAmount in Rial as a decimal string (64-bit safe)
taxablerequiredboolean
descriptionrequiredstring | null
activerequiredboolean
curl -sS -X POST "https://pooshe.cloud/api/v1/catalog" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"مشاوره","unitPriceRial":"5000000"}'
patch/api/v1/catalog/{id}quotes:write

ویرایش کالا یا خدمت

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
namestringlength 1–160
skustring | null
unitstringlength 1–20
unitPriceRialstring | number
taxableboolean
descriptionstring | null
activeboolean
پاسخ 200CatalogItem
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
namerequiredstring
skurequiredstring | null
unitrequiredstring
unitPriceRialrequiredstringAmount in Rial as a decimal string (64-bit safe)
taxablerequiredboolean
descriptionrequiredstring | null
activerequiredboolean
curl -sS -X PATCH "https://pooshe.cloud/api/v1/catalog/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
get/api/v1/quotesquotes:read

فهرست پیش‌فاکتورها

پارامترها
statusquery · stringdraft, issued, sent, accepted…
contactIdquery · stringContact
پاسخ 200QuoteList
فیلدهای پاسخ
quotesrequiredQuote[]
curl -sS "https://pooshe.cloud/api/v1/quotes" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
post/api/v1/quotesquotes:write

ساخت پیش‌نویس پیش‌فاکتور

Amounts are integer Rial strings; tax and totals are computed by the server.

پارامترها
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
titlerequiredstringlength 1–160
contactIdstring | null
companyIdstring | null
opportunityIdstring | null
draftobject
پاسخ 201Quote
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
numberrequiredstring
titlerequiredstring
statusrequiredstring
contactIdrequiredstring | null
companyIdrequiredstring | null
opportunityIdrequiredstring | null
currentVersionrequiredinteger-9007199254740991…9007199254740991
documentIdrequiredstring | null
sentAtrequiredstring (date-time) | null
acceptedAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X POST "https://pooshe.cloud/api/v1/quotes" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"title":"…"}'
get/api/v1/quotes/{id}quotes:read

یک پیش‌فاکتور با نسخه‌ها و جمع‌ها

پارامترها
idrequiredpath · string
پاسخ 200QuoteDetail
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
curl -sS "https://pooshe.cloud/api/v1/quotes/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY"
patch/api/v1/quotes/{id}quotes:write

ویرایش پیش‌نویس

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
titlestringlength 1–160
contactIdstring | null
companyIdstring | null
draftobject
پاسخ 200Quote
فیلدهای پاسخ
idrequiredstringOpaque id (cuid2, ≤ 40 chars)
numberrequiredstring
titlerequiredstring
statusrequiredstring
contactIdrequiredstring | null
companyIdrequiredstring | null
opportunityIdrequiredstring | null
currentVersionrequiredinteger-9007199254740991…9007199254740991
documentIdrequiredstring | null
sentAtrequiredstring (date-time) | null
acceptedAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
updatedAtrequiredstring (date-time)
curl -sS -X PATCH "https://pooshe.cloud/api/v1/quotes/ID" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
post/api/v1/quotes/{id}/issuequotes:write

صدور نسخه رسمی و ساخت PDF

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
پاسخ 201QuoteIssued
curl -sS -X POST "https://pooshe.cloud/api/v1/quotes/ID/issue" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
post/api/v1/quotes/{id}/sendquotes:write

ساخت لینک هوشمند پیش‌فاکتور

The PDF renders in the background after issue; until it is ready this returns 409 quote_pdf_not_ready: retry after a few seconds.

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
expiresInDaysinteger1…365
restrictToContactboolean
پاسخ 201QuoteSent
فیلدهای پاسخ
linkIdrequiredstringOpaque id (cuid2, ≤ 40 chars)
urlrequiredstring
curl -sS -X POST "https://pooshe.cloud/api/v1/quotes/ID/send" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
post/api/v1/quotes/{id}/statusquotes:write

ردشده یا لغوشده کردن پیش‌فاکتور

پارامترها
idrequiredpath · string
Idempotency-Keyheader · stringAny unique string (≤ 200 printable ASCII; a UUID is ideal). Retrying with the same key and body returns the first response (Idempotent-Replayed: true) instead of acting twice. Kept 24 h. Same key, different body → 422 idempotency_key_reused; while the first is still running → 409 idempotency_in_progress.
بدنه درخواست (JSON)
statusrequired"rejected" | "cancelled"
پاسخ 200Ok
فیلدهای پاسخ
okrequiredtrue
curl -sS -X POST "https://pooshe.cloud/api/v1/quotes/ID/status" \
  -H "Authorization: Bearer $POOSHE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"status":"rejected"}'

گزارش

get/api/v1/analytics/teamanalytics:read

گزارش تیم: لینک‌ها، بازدیدها و پاسخ‌ها

پارامترها
daysquery · 7 | 30 | 907, 30 or 90
پاسخ 200TeamReport
فیلدهای پاسخ
daysrequiredinteger-9007199254740991…9007199254740991
sincerequiredstring (date-time)
estimatedrequiredtrue
scoperequiredstring
totalsrequiredobject
documentsrequiredany[]
membersrequiredany[]
curl -sS "https://pooshe.cloud/api/v1/analytics/team" \
  -H "Authorization: Bearer $POOSHE_API_KEY"