{"openapi":"3.1.0","info":{"title":"Axenties Public API","description":"Read-only public REST API (P0). Authenticate with `Authorization: Bearer crm_pat_...`. Cursor pagination, RFC-9457 errors, per-key rate limiting.","version":"v1"},"servers":[{"url":"http://crm.axenties.com","description":"Generated server url"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Audit","description":"Your own public-API request audit log."},{"name":"Batch","description":"Bulk create (≤100 items, partial success)."},{"name":"Deals","description":"Deals (sales requests) with money in minor units + ISO currency."},{"name":"Notes","description":"Free-text notes attached to a deal or a contact."},{"name":"Custom fields","description":"Company-level custom-field definitions (typed schema)."},{"name":"Contacts","description":"Contacts (the deal-owning contact record)."},{"name":"Webhooks","description":"Subscribe to events; signed at-least-once delivery with retries."},{"name":"Tasks","description":"Tasks / reminders (soft-deleted tasks are excluded)."},{"name":"Pipelines","description":"Pipelines (funnels) and their stages."},{"name":"Products","description":"Product catalogue (price in minor units, currency KZT)."}],"paths":{"/api/v1/public/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook subscriptions","operationId":"list","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionView"}}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook subscription (returns the signing secret once)","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedResponse"}}}}}}},"/api/v1/public/webhooks/{id}/deliveries/{deliveryId}/replay":{"post":{"tags":["Webhooks"],"summary":"Re-queue a delivery for immediate redelivery","operationId":"replay","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DeliveryView"}}}}}}},"/api/v1/public/tasks":{"get":{"tags":["Tasks"],"summary":"List tasks (cursor-paginated)","operationId":"list_1","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPageTaskDto"}}}}}},"post":{"tags":["Tasks"],"summary":"Create a task","operationId":"create_1","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaskDto"}}}}}}},"/api/v1/public/tasks/{id}/complete":{"post":{"tags":["Tasks"],"summary":"Mark a task completed","operationId":"complete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaskDto"}}}}}}},"/api/v1/public/products":{"get":{"tags":["Products"],"summary":"List products (cursor-paginated)","operationId":"list_2","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPageProductDto"}}}}}},"post":{"tags":["Products"],"summary":"Create a product","operationId":"create_2","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}}}},"/api/v1/public/deals":{"get":{"tags":["Deals"],"summary":"List deals (cursor-paginated)","operationId":"list_3","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pipeline_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"stage_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"assigned_user_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPageDealDto"}}}}}},"post":{"tags":["Deals"],"summary":"Create a deal","operationId":"create_3","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealDto"}}}}}}},"/api/v1/public/deals/{id}/restore":{"post":{"tags":["Deals"],"summary":"Restore an archived deal","operationId":"restore","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealDto"}}}}}}},"/api/v1/public/deals/{id}/move":{"post":{"tags":["Deals"],"summary":"Move a deal to a pipeline/stage","operationId":"move","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Move"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealDto"}}}}}}},"/api/v1/public/deals/{dealId}/notes":{"get":{"tags":["Notes"],"summary":"List a deal's notes","operationId":"dealNotes","parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}}}}}},"post":{"tags":["Notes"],"summary":"Add a note to a deal","operationId":"addDealNote","parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NoteDto"}}}}}}},"/api/v1/public/deals/batch":{"post":{"tags":["Batch"],"summary":"Create up to 100 deals","operationId":"deals","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Create"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}}}}},"/api/v1/public/deals/batch/update":{"post":{"tags":["Batch"],"summary":"Update up to 100 deals (partial success)","operationId":"updateDeals","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealItem"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}}}}},"/api/v1/public/custom_fields":{"get":{"tags":["Custom fields"],"summary":"List custom-field definitions for an entity (currently: contact)","operationId":"definitions","parameters":[{"name":"entity","in":"query","required":false,"schema":{"type":"string","default":"contact"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldDefinitionDto"}}}}}}},"post":{"tags":["Custom fields"],"summary":"Define a typed custom field","operationId":"define","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Define"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionDto"}}}}}}},"/api/v1/public/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts (cursor-paginated)","operationId":"list_4","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPageContactDto"}}}}}},"post":{"tags":["Contacts"],"summary":"Create a contact","operationId":"create_4","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}}}}},"/api/v1/public/contacts/{contactId}/notes":{"get":{"tags":["Notes"],"summary":"List a contact's notes","operationId":"contactNotes","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}}}}}},"post":{"tags":["Notes"],"summary":"Add a note to a contact","operationId":"addContactNote","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NoteDto"}}}}}}},"/api/v1/public/contacts/batch":{"post":{"tags":["Batch"],"summary":"Create up to 100 contacts","operationId":"contacts","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Create"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}}}}},"/api/v1/public/contacts/batch/update":{"post":{"tags":["Batch"],"summary":"Update up to 100 contacts (partial success)","operationId":"updateContacts","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactItem"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}}}}},"/api/v1/public/tasks/{id}":{"get":{"tags":["Tasks"],"summary":"Get a task by id","operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaskDto"}}}}}},"delete":{"tags":["Tasks"],"summary":"Delete a task (soft)","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Tasks"],"summary":"Update a task","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaskDto"}}}}}}},"/api/v1/public/products/{id}":{"get":{"tags":["Products"],"summary":"Get a product by id","operationId":"get_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}}},"delete":{"tags":["Products"],"summary":"Delete a product (hard delete with cascade cleanup)","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Products"],"summary":"Update a product","operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}}}},"/api/v1/public/deals/{id}":{"get":{"tags":["Deals"],"summary":"Get a deal by id","operationId":"get_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealDto"}}}}}},"delete":{"tags":["Deals"],"summary":"Archive a deal (soft); ?permanent=true hard-deletes an archived deal","operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Deals"],"summary":"Update a deal (If-Match optional)","operationId":"update_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealDto"}}}}}}},"/api/v1/public/contacts/{id}":{"get":{"tags":["Contacts"],"summary":"Get a contact by id","operationId":"get_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}}}},"delete":{"tags":["Contacts"],"summary":"GDPR right-to-erasure — anonymise a contact (requires ?erase=true)","operationId":"erase","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"erase","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Contacts"],"summary":"Update a contact (If-Match optional)","operationId":"update_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}}}}},"/api/v1/public/contacts/{id}/custom_fields":{"get":{"tags":["Contacts"],"summary":"List a contact's custom-field values (typed + free-form)","operationId":"customFields","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueDto"}}}}}}},"patch":{"tags":["Contacts"],"summary":"Set a defined custom-field value on a contact","operationId":"setCustomField","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetValue"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomFieldValueDto"}}}}}}},"/api/v1/public/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook subscription","operationId":"get_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionView"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook subscription","operationId":"delete_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List a subscription's recent deliveries","operationId":"deliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryView"}}}}}}}},"/api/v1/public/webhooks/{id}/deliveries/{deliveryId}":{"get":{"tags":["Webhooks"],"summary":"Get one delivery (with payload + last response)","operationId":"delivery","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DeliveryView"}}}}}}},"/api/v1/public/pipelines":{"get":{"tags":["Pipelines"],"summary":"List pipelines (cursor-paginated)","operationId":"list_5","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPagePipelineDto"}}}}}}},"/api/v1/public/pipelines/{id}":{"get":{"tags":["Pipelines"],"summary":"Get a pipeline by id","operationId":"get_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PipelineDto"}}}}}}},"/api/v1/public/pipelines/{id}/stages":{"get":{"tags":["Pipelines"],"summary":"List a pipeline's stages","operationId":"stages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PipelineStageDto"}}}}}}}},"/api/v1/public/deals/{id}/line_items":{"get":{"tags":["Deals"],"summary":"List a deal's line items","operationId":"lineItems","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealLineItemDto"}}}}}}}},"/api/v1/public/contacts/{id}/export":{"get":{"tags":["Contacts"],"summary":"GDPR export — all data held for one contact (deals, notes, custom fields)","operationId":"export","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactExportDto"}}}}}}},"/api/v1/public/contacts/{id}/deals":{"get":{"tags":["Contacts"],"summary":"List a contact's deals (cursor-paginated)","operationId":"deals_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CursorPageDealDto"}}}}}}},"/api/v1/public/audit-log":{"get":{"tags":["Audit"],"summary":"List recent public-API requests for your company","operationId":"list_6","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntryDto"}}}}}}}},"/api/v1/public/notes/{noteId}":{"delete":{"tags":["Notes"],"summary":"Delete a note","operationId":"delete_4","parameters":[{"name":"noteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"CreateRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1},"event_types":{"type":"array","items":{"type":"string"},"minItems":1},"description":{"type":"string"}},"required":["event_types","url"]},"CreatedResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"secret":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"DeliveryView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"event_type":{"type":"string"},"status":{"type":"string"},"attempt_count":{"type":"integer","format":"int32"},"last_status_code":{"type":"integer","format":"int32"},"last_error":{"type":"string"},"last_response":{"type":"string"},"payload":{"type":"string"},"next_attempt_at":{"type":"string","format":"date-time"},"delivered_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Create":{"type":"object","properties":{"task_type":{"type":"string","maxLength":4096,"minLength":0},"description":{"type":"string","maxLength":4096,"minLength":0},"tags":{"type":"string","maxLength":2048,"minLength":0},"due":{"type":"string","format":"date-time"},"assigned_user_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"},"funnel_step_id":{"type":"string","format":"uuid"}}},"TaskDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"task_type":{"type":"string"},"description":{"type":"string"},"tags":{"type":"string"},"status":{"type":"string"},"due":{"type":"string","format":"date-time"},"contact_id":{"type":"string","format":"uuid"},"funnel_step_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"},"assigned_user_id":{"type":"string","format":"uuid"},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"ProductDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"price_minor":{"type":"integer","format":"int64"},"currency":{"type":"string"},"quantity":{"type":"integer","format":"int64"},"available":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"DealDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"amount_minor":{"type":"integer","format":"int64"},"currency":{"type":"string"},"pipeline_id":{"type":"string","format":"uuid"},"pipeline_name":{"type":"string"},"stage_id":{"type":"string","format":"uuid"},"stage_name":{"type":"string"},"contact_id":{"type":"string","format":"uuid"},"assigned_user_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"success":{"type":"boolean"},"is_archived":{"type":"boolean"},"tags":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Move":{"type":"object","properties":{"pipeline_id":{"type":"string","format":"uuid"},"stage_id":{"type":"string","format":"uuid"}},"required":["pipeline_id"]},"NoteDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"text":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"BatchResult":{"type":"object","properties":{"created":{"type":"integer","format":"int32"},"failed":{"type":"integer","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}},"Item":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"ok":{"type":"boolean"},"id":{"type":"string","format":"uuid"},"error":{"type":"string"}}},"DealItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/Update"}},"required":["id"]},"Update":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"description":{"type":"string","maxLength":2000,"minLength":0},"amount_minor":{"type":"integer","format":"int64"}}},"Define":{"type":"object","properties":{"field_name":{"type":"string","minLength":1},"field_type":{"type":"string","minLength":1},"required":{"type":"boolean"},"allow_multiple_selection":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["field_name","field_type"]},"CustomFieldDefinitionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"field_name":{"type":"string"},"field_type":{"type":"string"},"is_required":{"type":"boolean"},"display_order":{"type":"integer","format":"int32"},"allow_multiple_selection":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}}},"ContactDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"company_name":{"type":"string"},"lead_source":{"type":"string"},"marketing_channel":{"type":"string"},"lifecycle_stage":{"type":"string"},"bin_iin":{"type":"string"},"legal_address":{"type":"string"},"contact_position":{"type":"string"},"is_individual":{"type":"boolean"},"consent_ads":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ContactItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/Update"}},"required":["id"]},"SetValue":{"type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"text_value":{"type":"string"},"selected_option_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["template_id"]},"CustomFieldValueDto":{"type":"object","properties":{"source":{"type":"string"},"template_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"SubscriptionView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"description":{"type":"string"},"disabled_reason":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CursorPageTaskDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaskDto"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"}}},"CursorPageProductDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"}}},"CursorPagePipelineDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PipelineDto"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"}}},"PipelineDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PipelineStageDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pipeline_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"display_order":{"type":"integer","format":"int32"},"archived":{"type":"boolean"},"successful":{"type":"boolean"},"probability":{"type":"number","format":"double"},"sla_minutes":{"type":"integer","format":"int32"}}},"CursorPageDealDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DealDto"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"}}},"DealLineItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"product_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"number","format":"double"},"unit_price_minor":{"type":"integer","format":"int64"},"total_minor":{"type":"integer","format":"int64"},"currency":{"type":"string"},"line_order":{"type":"integer","format":"int32"},"discount_type":{"type":"string"},"discount_value":{"type":"number","format":"double"},"effective_unit_price_minor":{"type":"integer","format":"int64"}}},"CursorPageContactDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactDto"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"}}},"ContactExportDto":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/ContactDto"},"deals":{"type":"array","items":{"$ref":"#/components/schemas/DealDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueDto"}},"exported_at":{"type":"string","format":"date-time"}}},"AuditEntryDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"principal":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer","format":"int32"},"source_ip":{"type":"string"},"request_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"securitySchemes":{"ApiKey":{"type":"http","description":"API key (Personal Access Token).","scheme":"bearer","bearerFormat":"crm_pat"}}}}