public swagger.json

{"components":{"schemas":{"CommonResponseDto":{"properties":{"success":{"type":"boolean"}},"type":"object","required":["success"]},"PublicPaginationCommonDto":{"properties":{"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object"},"PublicSearchCommonDto":{"properties":{"search":{"type":"string","default":null,"description":"Search query string to filter results."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object"},"PublicCreateThemeDto":{"properties":{"name":{"type":"string","description":"Name of the theme."},"comments":{"type":"string","description":"Optional comments for the theme."}},"type":"object","required":["name"]},"PublicAddSubthemeDto":{"properties":{"subthemeId":{"type":"string","description":"ID of the theme to add as a subtheme."}},"type":"object","required":["subthemeId"]},"PublicRemoveSubthemeDto":{"properties":{"subthemeId":{"type":"string","description":"ID of the subtheme to remove."}},"type":"object","required":["subthemeId"]},"PublicGetThemeItemsDto":{"properties":{"folderId":{"type":"string","description":"Filter items by folder ID."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object"},"PublicCreateThemeItemDto":{"properties":{"entityId":{"type":"string","description":"ID of the entity to link to this theme."},"entityType":{"type":"string","enum":["DEAL","NOTE","CONTACT","COMPANY"],"description":"Type of entity: DEAL, NOTE, CONTACT, or COMPANY."}},"type":"object","required":["entityId","entityType"]},"PublicThemeDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"comments":{"type":"string"},"isGroupTheme":{"type":"boolean"},"isSubtag":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","name","isGroupTheme","isSubtag","createdAt","updatedAt"]},"PublicViewAllThemesDto":{"properties":{"themes":{"items":{"$ref":"#/components/schemas/PublicThemeDto"},"type":"array"}},"type":"object","required":["themes"]},"PublicThemeItemDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"entityType":{"type":"string","description":"Entity type of the tagged item (e.g. CONTACT, COMPANY, DEAL, NOTE)."},"entityId":{"type":"string","description":"ID of the entity tagged under this theme."},"tagId":{"type":"string","description":"ID of the theme this item belongs to."},"tagFolderId":{"type":"string","description":"ID of the folder this item belongs to."},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","title","entityType","entityId","tagId","tagFolderId","createdAt","updatedAt"]},"PublicViewAllThemeItemsDto":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicThemeItemDto"},"type":"array"},"total":{"type":"integer"}},"type":"object","required":["items","total"]},"PublicThemeFolderDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"entityType":{"type":"string","description":"Entity type this folder groups (e.g. CONTACT, COMPANY, DEAL, NOTE, TAG)."},"subtagId":{"type":"string","description":"ID of the subtheme if entityType is TAG."},"canDelete":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","name","entityType","canDelete","createdAt","updatedAt"]},"PublicViewAllThemeFoldersDto":{"properties":{"folders":{"items":{"$ref":"#/components/schemas/PublicThemeFolderDto"},"type":"array"},"total":{"type":"integer"}},"type":"object","required":["folders","total"]},"PublicDealCompanyDto":{"properties":{"name":{"type":"string"},"url":{"type":"string"},"logoUrl":{"type":"string","description":"Company logo URL."},"cartaIssuerId":{"type":"string","description":"Carta issuer ID associated with this company."},"cartaCorporationId":{"type":"string","description":"Carta corporation ID associated with this company."},"industry":{"type":"string","description":"Industry the company operates in."},"location":{"type":"string","description":"Headquarters or primary location of the company."},"description":{"type":"string","description":"Short description or summary about the company."}},"type":"object"},"PublicDealPeopleDto":{"properties":{"advisers":{"items":{"type":"string"},"type":"array","description":"Array of contact IDs linked as advisers to the deal."},"introducer":{"items":{"type":"string"},"type":"array","description":"Array of contact IDs linked as introducers to the deal."},"management":{"items":{"type":"string"},"type":"array","description":"Array of contact IDs linked as management to the deal."}},"type":"object"},"PublicDealDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"company":{"$ref":"#/components/schemas/PublicDealCompanyDto"},"comment":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"creatorId":{"type":"string"},"pipelineId":{"type":"string"},"stageId":{"type":"string"},"addedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"dealLead":{"type":"string"},"dealLeadName":{"type":"string","description":"Display name of the deal lead."},"fields":{"type":"object"},"people":{"$ref":"#/components/schemas/PublicDealPeopleDto","description":"Contacts linked to the deal by role (advisers, introducer, management). Note: these fields may have different names on the UI."}},"type":"object","required":["id"]},"PublicViewAllDealsDto":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/PublicDealDto"},"type":"array"}},"type":"object","required":["deals"]},"PublicDealCreateDto":{"properties":{"company":{"$ref":"#/components/schemas/PublicDealCompanyDto"},"comment":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"pipelineId":{"type":"string"},"stageId":{"type":"string"},"addedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"dealLead":{"type":"string","description":"User ID to assign as deal lead"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. If a domain matches an existing company in your organization, the company record is linked directly; otherwise the domain is resolved via external enrichment. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"people":{"$ref":"#/components/schemas/PublicDealPeopleDto","description":"Contacts linked to the deal by role (advisers, introducer, management). Note: these fields may have different names on the UI."}},"type":"object"},"PublicDealBatchCreateDto":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/PublicDealCreateDto"},"type":"array","maxItems":100,"minItems":1,"description":"Array of deals to create. Maximum 100 items per request."}},"type":"object","required":["deals"]},"PublicDealPatchDto":{"properties":{"company":{"$ref":"#/components/schemas/PublicDealCompanyDto"},"comment":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"stageId":{"type":"string"},"addedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"dealLead":{"type":"string","description":"User ID to assign as deal lead"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. If a domain matches an existing company in your organization, the company record is linked directly; otherwise the domain is resolved via external enrichment. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"people":{"$ref":"#/components/schemas/PublicDealPeopleDto","description":"Contacts linked to the deal by role (advisers, introducer, management). Note: these fields may have different names on the UI."}},"type":"object"},"PublicDealBatchPatchItemDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"ID of the deal to update."},"company":{"$ref":"#/components/schemas/PublicDealCompanyDto"},"comment":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"stageId":{"type":"string"},"addedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"dealLead":{"type":"string","description":"User ID to assign as deal lead"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. If a domain matches an existing company in your organization, the company record is linked directly; otherwise the domain is resolved via external enrichment. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"people":{"$ref":"#/components/schemas/PublicDealPeopleDto","description":"Contacts linked to the deal by role (advisers, introducer, management). Note: these fields may have different names on the UI."}},"type":"object","required":["id"]},"PublicDealBatchPatchDto":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/PublicDealBatchPatchItemDto"},"type":"array","maxItems":100,"minItems":1,"description":"Array of deals to update. Each item must include an `id` field. Maximum 100 items per request."}},"type":"object","required":["deals"]},"PublicDealBatchResponseDto":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/PublicDealDto"},"type":"array"}},"type":"object","required":["deals"]},"PublicFilterDto":{"properties":{"field_id":{"type":"string","description":"Field ID to filter on. Use the corresponding List Fields endpoint to discover valid IDs."},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","in","between"],"description":"Comparison operator. \"between\" requires a two-element array value."},"value":{"description":"Filter value. For \"in\": string array. For \"between\": [from, to] array.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"type":"object","required":["field_id","operator","value"]},"PublicAggregateRequestDto":{"properties":{"group_by":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"description":"Field ID to group by, wrapped in a single-element array. Only one field at a time is supported. Use the corresponding List Fields endpoint to discover valid IDs."},"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Filters to narrow records before aggregation."}},"type":"object","required":["group_by"]},"PublicAggregateGroupDto":{"properties":{"count":{"type":"number","description":"Number of records in this group."}},"type":"object","required":["count"],"additionalProperties":true},"PublicAggregateResponseDto":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/PublicAggregateGroupDto"},"type":"array","description":"Array of groups, each containing the group key, field values, and count."},"totalCount":{"type":"number","description":"Total number of records across all groups."}},"type":"object","required":["groups","totalCount"]},"PublicAggregateDealsDto":{"properties":{"pipeline_id":{"type":"string","description":"Pipeline ID. Defaults to the organization's default pipeline."},"group_by":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"description":"Field ID to group by, wrapped in a single-element array. Only one field at a time is supported. Use the corresponding List Fields endpoint to discover valid IDs."},"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Filters to narrow records before aggregation."}},"type":"object","required":["group_by"]},"PublicSearchDealsDto":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Structured filters to narrow results. Each entry is `{ field_id, operator, value }`. Use the List Deal Fields endpoint to discover valid `field_id` values. Use `stage` / `pipelineId` / `added_date` field_ids in place of dedicated params. Special filters: `stages_visited` matches deals that visited a stage at any point (use instead of `stage` for \"reached or further\" semantics)."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicUpdateDealStageDto":{"properties":{"pipelineId":{"type":"string","description":"Pipeline the stage belongs to. When omitted, the organization default pipeline is used."},"name":{"type":"string"},"description":{"type":"string","description":"Description of the stage."},"kanban":{"type":"boolean"},"funnel":{"type":"boolean"},"secondFunnel":{"type":"boolean"},"default":{"type":"boolean","description":"Whether this is the default stage for new deals."}},"type":"object"},"PublicReorderFundraisingStageDto":{"properties":{"direction":{"type":"string","enum":["up","down"],"description":"Move the stage one step in the list. \"up\" moves it earlier, \"down\" moves it later. Provide either direction or position, not both."},"position":{"minimum":0,"type":"integer","description":"Zero-based target index in the stage list. Clamped to the list bounds. Provide either direction or position, not both."}},"type":"object"},"PublicReorderDealStageDto":{"properties":{"pipelineId":{"type":"string","description":"Pipeline the stage belongs to. When omitted, the organization default pipeline is used."},"direction":{"type":"string","enum":["up","down"],"description":"Move the stage one step in the list. \"up\" moves it earlier, \"down\" moves it later. Provide either direction or position, not both."},"position":{"minimum":0,"type":"integer","description":"Zero-based target index in the stage list. Clamped to the list bounds. Provide either direction or position, not both."}},"type":"object"},"PublicInteractionParticipantDto":{"properties":{"email":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"}},"type":"object","required":["email"]},"PublicInteractionDto":{"properties":{"title":{"type":"string"},"type":{"type":"string"},"date":{"type":"string"},"sender":{"type":"string"},"participants":{"items":{"$ref":"#/components/schemas/PublicInteractionParticipantDto"},"type":"array"}},"type":"object","required":["title","type","date","sender","participants"]},"PublicViewAllInteractionsDto":{"properties":{"interactions":{"items":{"$ref":"#/components/schemas/PublicInteractionDto"},"type":"array"},"futureInteractions":{"items":{"$ref":"#/components/schemas/PublicInteractionDto"},"type":"array","description":"The next upcoming calendar event with contacts at the resolved domain(s). Capped at 1 entry — independent of the `limit` query parameter."},"count":{"type":"number","description":"Total number of past interactions matching the filter (independent of pagination)."}},"type":"object","required":["interactions","futureInteractions","count"]},"PublicGetEntityInteractionsQueryDto":{"properties":{"type":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object"},"PublicViewAllEntityInteractionsDto":{"properties":{"interactions":{"items":{"$ref":"#/components/schemas/PublicInteractionDto"},"type":"array"},"futureInteractions":{"items":{"$ref":"#/components/schemas/PublicInteractionDto"},"type":"array","description":"The next upcoming calendar event with contacts at the resolved domain(s). Capped at 1 entry — independent of the `limit` query parameter."},"count":{"type":"number","description":"Total number of past interactions matching the filter (independent of pagination)."}},"type":"object","required":["interactions","futureInteractions","count"]},"PublicRelationContactDto":{"properties":{"email":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"}},"type":"object","required":["email"]},"PublicRelationDto":{"properties":{"contact":{"$ref":"#/components/schemas/PublicRelationContactDto","description":"Contact participant on the relation."},"userName":{"type":"string"},"startDate":{"type":"string"},"eventCount":{"type":"number"},"emailCount":{"type":"number"},"strength":{"type":"string"},"notesCount":{"type":"number"},"dealsCount":{"type":"number"}},"type":"object"},"PublicViewAllEntityRelationsDto":{"properties":{"relations":{"items":{"$ref":"#/components/schemas/PublicRelationDto"},"type":"array"},"count":{"type":"number","description":"Total number of relations matching the filter (independent of pagination)."}},"type":"object","required":["relations","count"]},"PublicAttachmentDto":{"properties":{"id":{"type":"string","description":"Stable file identifier. Pass this as file_id to get_file_content."},"fileName":{"type":"string","description":"Original file name supplied at upload time."},"mimeType":{"type":"string","description":"MIME type of the file."},"uploadedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}],"description":"Upload timestamp."},"url":{"type":"string","description":"Signed URL to download the file. Treat as ephemeral — re-fetch the entity for a fresh URL."}},"type":"object","required":["id","fileName"]},"PublicFundraisingDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"creatorId":{"type":"string"},"stageId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"fields":{"type":"object"},"files":{"items":{"$ref":"#/components/schemas/PublicAttachmentDto"},"type":"array"}},"type":"object","required":["id"]},"PublicViewAllFundraisingDto":{"properties":{"fundraising":{"items":{"$ref":"#/components/schemas/PublicFundraisingDto"},"type":"array"}},"type":"object","required":["fundraising"]},"PublicFundraisingCreateDto":{"properties":{"name":{"type":"string"},"stageId":{"type":"string"},"investorId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Optional investor ID to link."},"originContactId":{"type":"string","description":"Common ID of the contact to link as origin. The contact must already exist in the caller's organization — the request fails with 404 if not. When provided, the fundraising's `name` and `image` are overridden with the linked contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default fundraising image when the contact has no `photo_url`."},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."}},"type":"object","required":["name"]},"PublicFundraisingPatchDto":{"properties":{"name":{"type":"string"},"stageId":{"type":"string"},"investorId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Optional investor ID to link."},"originContactId":{"type":"string","description":"Common ID of the contact to link as origin. The contact must already exist in the caller's organization — the request fails with 404 if not. When provided, the fundraising's `name` and `image` are overridden with the linked contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default fundraising image when the contact has no `photo_url`."},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."}},"type":"object"},"PublicSearchFundraisingsDto":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Structured filters to narrow results. Each entry is `{ field_id, operator, value }`. Use the List Fundraising Fields endpoint to discover valid `field_id` values."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicUpdateFundraisingStageDto":{"properties":{"name":{"type":"string"},"kanban":{"type":"boolean"}},"type":"object"},"PublicListDto":{"properties":{"listId":{"type":"string"},"listName":{"type":"string"},"folderId":{"type":"string"},"folderName":{"type":"string"},"parentFolderId":{"type":"string"},"type":{"enum":["list","folder"],"type":"string"},"inside":{"items":{"$ref":"#/components/schemas/PublicListDto"},"type":"array"}},"type":"object"},"PublicViewAllListsDto":{"properties":{"lists":{"items":{"$ref":"#/components/schemas/PublicListDto"},"type":"array"}},"type":"object","required":["lists"]},"PublicContactLocationDto":{"properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"coordinates":{},"location":{"type":"string"}},"type":"object"},"PublicContactYearMonthDto":{"properties":{"year":{"type":"number"},"month":{"type":"number"}},"type":"object"},"PublicContactJobDto":{"properties":{"companyName":{"type":"string"},"companyUrl":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"startedOn":{"$ref":"#/components/schemas/PublicContactYearMonthDto"},"endedOn":{"$ref":"#/components/schemas/PublicContactYearMonthDto"}},"type":"object"},"PublicContactSocialLinksDto":{"properties":{"linkedinUrl":{"type":"string"},"githubUrl":{"type":"string"},"facebookUrl":{"type":"string"},"twitterUrl":{"type":"string"}},"type":"object"},"PublicContactDto":{"properties":{"id":{"type":"string"},"listId":{"type":"string"},"ownerId":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"emailDetail":{"type":"string"},"emailDetailSecond":{"type":"string"},"emailDetailThird":{"type":"string"},"emailDetailFourth":{"type":"string"},"phone":{"type":"string"},"businessPhone":{"type":"string"},"thirdPhone":{"type":"string"},"fourthPhone":{"type":"string"},"location":{"$ref":"#/components/schemas/PublicContactLocationDto"},"homeLocation":{"$ref":"#/components/schemas/PublicContactLocationDto"},"industry":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"themes":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"jobs":{"items":{"$ref":"#/components/schemas/PublicContactJobDto"},"type":"array"},"headline":{"type":"string"},"title":{"type":"string"},"socialLinks":{"$ref":"#/components/schemas/PublicContactSocialLinksDto"},"knownTo":{"items":{"type":"string"},"type":"array","description":"Array of user IDs that this contact is known to."},"fields":{"type":"object"},"dynamicInfo":{"type":"object","description":"Legacy key-value store. Each value must be a string or number."},"files":{"items":{"$ref":"#/components/schemas/PublicAttachmentDto"},"type":"array"}},"type":"object","required":["id","name"]},"PublicViewAllContactsDto":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/PublicContactDto"},"type":"array"}},"type":"object","required":["contacts"]},"PublicCreateContactDto":{"properties":{"listId":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"emailDetail":{"format":"email","type":"string"},"emailDetailSecond":{"format":"email","type":"string"},"emailDetailThird":{"format":"email","type":"string"},"emailDetailFourth":{"format":"email","type":"string"},"phone":{"type":"string"},"businessPhone":{"type":"string"},"thirdPhone":{"type":"string"},"fourthPhone":{"type":"string"},"location":{"$ref":"#/components/schemas/PublicContactLocationDto"},"homeLocation":{"$ref":"#/components/schemas/PublicContactLocationDto"},"industry":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"jobs":{"items":{"$ref":"#/components/schemas/PublicContactJobDto"},"type":"array"},"headline":{"type":"string"},"title":{"type":"string"},"socialLinks":{"$ref":"#/components/schemas/PublicContactSocialLinksDto"},"fields":{"type":"object"},"knownTo":{"items":{"type":"string"},"type":"array","description":"Array of user IDs that this contact is known to. Users must belong to the same organization."},"dynamicInfo":{"type":"object","description":"Legacy key-value store. Each value must be a string or number."}},"type":"object","required":["name"]},"PublicUpdateContactDto":{"properties":{"name":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"emailDetail":{"format":"email","type":"string"},"emailDetailSecond":{"format":"email","type":"string"},"emailDetailThird":{"format":"email","type":"string"},"emailDetailFourth":{"format":"email","type":"string"},"phone":{"type":"string"},"businessPhone":{"type":"string"},"thirdPhone":{"type":"string"},"fourthPhone":{"type":"string"},"location":{"$ref":"#/components/schemas/PublicContactLocationDto","description":"Fully replaces the work location when provided."},"homeLocation":{"$ref":"#/components/schemas/PublicContactLocationDto","description":"Fully replaces the home location when provided."},"industry":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"jobs":{"items":{"$ref":"#/components/schemas/PublicContactJobDto"},"type":"array","description":"Fully replaces the jobs array when provided."},"headline":{"type":"string"},"title":{"type":"string"},"socialLinks":{"$ref":"#/components/schemas/PublicContactSocialLinksDto","description":"Partially updates social links — only provided fields are overwritten."},"fields":{"type":"object"},"knownTo":{"items":{"type":"string"},"type":"array","description":"Array of user IDs that this contact is known to. Users must belong to the same organization. Fully replaces the existing list when provided."},"dynamicInfo":{"type":"object","description":"Legacy key-value store. Each value must be a string or number."}},"type":"object"},"PublicEntityPermissionDto":{"properties":{"allOrganization":{"type":"boolean","description":"If true, every member of the org can access. Otherwise restricted to owner/users/roles."},"users":{"items":{"format":"email","type":"string"},"type":"array","maxItems":100,"description":"List of user emails (in the same organization) granted access."},"roles":{"items":{"type":"string","enum":["ADMIN","LEADERSHIP","DEAL_TEAM","PORTFOLIO","FINANCE","INVESTOR_RELATIONS","ADMIN_SUPPORT","OTHER"]},"type":"array","maxItems":20,"description":"Company roles granted access. One of: ADMIN, LEADERSHIP, DEAL_TEAM, PORTFOLIO, FINANCE, INVESTOR_RELATIONS, ADMIN_SUPPORT, OTHER."}},"type":"object","description":"Access control for an entity (notes, etc.). Fields are independent — set only what you want to change."},"PublicCreateContactListDto":{"properties":{"name":{"type":"string","description":"Display name of the contact list."},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control. If omitted, the list defaults to org-wide visibility."}},"type":"object","required":["name"]},"PublicCreateContactFolderDto":{"properties":{"name":{"type":"string","description":"Display name of the folder."},"parentFolderId":{"pattern":"^folder-","type":"string","description":"Optional parent folder id. When provided, the new folder is nested inside it; otherwise it is created at the root."},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control. If omitted, the folder defaults to org-wide visibility."}},"type":"object","required":["name"]},"PublicUpdateContactListDto":{"properties":{"name":{"type":"string","description":"New display name for the list."},"folderId":{"pattern":"^folder-","type":"string","nullable":true,"description":"Move the list into the given folder, or pass `null` to move it to the root. Omit the field to leave the parent unchanged."},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control. Only the list owner or an admin can change this. Omit to leave the permission unchanged."}},"type":"object"},"PublicUpdateContactFolderDto":{"properties":{"name":{"type":"string","description":"New display name for the folder."},"parentFolderId":{"pattern":"^folder-","type":"string","nullable":true,"description":"Move the folder under the given parent folder, or pass `null` to move it to the root. Omit the field to leave the parent unchanged."},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control. Only the folder owner or an admin can change this. Cascades to child lists. Omit to leave unchanged."}},"type":"object"},"PublicInvestorDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"originType":{"type":"string","enum":["Contact","Company"]},"originContactId":{"type":"string"},"fields":{"type":"object"},"files":{"items":{"$ref":"#/components/schemas/PublicAttachmentDto"},"type":"array"}},"type":"object","required":["id"]},"PublicViewAllInvestorsDto":{"properties":{"investors":{"items":{"$ref":"#/components/schemas/PublicInvestorDto"},"type":"array"}},"type":"object","required":["investors"]},"PublicInvestorCreateDto":{"properties":{"name":{"type":"string"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"originContactId":{"type":"string","description":"Common ID of the contact to link as origin. The contact must already exist in the caller's organization — the request fails with 404 if not. When provided, the investor's `name` and `image` are overridden with the linked contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default investor image when the contact has no `photo_url`."}},"type":"object","required":["name"]},"PublicInvestorPatchDto":{"properties":{"name":{"type":"string"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"originContactId":{"type":"string","description":"Common ID of the contact to link as origin. The contact must already exist in the caller's organization — the request fails with 404 if not. When provided, the investor's `name` and `image` are overridden with the linked contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default investor image when the contact has no `photo_url`."}},"type":"object"},"PublicSearchInvestorsDto":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Structured filters to narrow results. Each entry is `{ field_id, operator, value }`. Use the List Investor Fields endpoint to discover valid `field_id` values."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicCompanyDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"image":{"type":"string"},"creatorId":{"type":"string"},"lists":{"items":{"type":"string"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/PublicAttachmentDto"},"type":"array"},"fields":{"type":"object"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","name"]},"PublicViewAllCompaniesDto":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/PublicCompanyDto"},"type":"array"}},"type":"object","required":["companies"]},"PublicCompanyListDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"}},"type":"object","required":["id","name"]},"PublicViewAllCompanyListsDto":{"properties":{"lists":{"items":{"$ref":"#/components/schemas/PublicCompanyListDto"},"type":"array"}},"type":"object","required":["lists"]},"PublicCompanyCreateDto":{"properties":{"name":{"type":"string"},"image":{"type":"string"},"lists":{"items":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"type":"array"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."}},"type":"object","required":["name"]},"PublicCompanyPatchDto":{"properties":{"name":{"type":"string"},"image":{"type":"string"},"lists":{"items":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"type":"array"},"fields":{"type":"object","description":"Custom field values keyed by field ID. For fields of type `company`, provide either a company ID or a domain string (e.g. `\"stripe.com\"`). For `company-list` fields, provide an array of company IDs and/or domain strings. For fields of type `deal`, provide a deal ID. For `deal-list` fields, provide an array of deal IDs. For `contacts-list` fields, provide an array of contact IDs."},"cartaIssuerId":{"type":"string","description":"Carta GL Issuer UUID"},"cartaCorporationId":{"type":"string","description":"Carta Corporation UUID"}},"type":"object"},"PublicSearchCompaniesDto":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","description":"Structured filters to narrow results. Each entry is `{ field_id, operator, value }`. Use the List Company Fields endpoint to discover valid `field_id` values. To filter by a company list, use `{ field_id: \"lists\", operator: \"in\", value: [listId] }`."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicSearchPeopleDto":{"properties":{"query":{"type":"string","description":"Free-text query (typically a person's name) used to search public LinkedIn profiles."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object","required":["query"]},"PublicPersonSearchResultDto":{"properties":{"name":{"type":"string"},"title":{"type":"string"},"company":{"type":"string"},"linkedinUrl":{"type":"string","description":"LinkedIn profile URL. Pass this to the enrich endpoint to retrieve full profile data."},"imageUrl":{"type":"string"}},"type":"object","required":["name","linkedinUrl"]},"PublicPeopleSearchResultsDto":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PublicPersonSearchResultDto"},"type":"array"}},"type":"object","required":["results"]},"PublicEnrichPersonDto":{"properties":{"linkedinUrl":{"pattern":"linkedin\\.com\\/in\\/","type":"string","description":"LinkedIn profile URL of the person to enrich (e.g. https://linkedin.com/in/janedoe)."}},"type":"object","required":["linkedinUrl"]},"PublicEnrichedPersonDto":{"properties":{"existingContactId":{"type":"string","description":"ID of an existing contact in this organization that matches the enriched LinkedIn URL or email. If set, prefer updating that contact over creating a duplicate."},"name":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"},"headline":{"type":"string"},"photoUrl":{"type":"string"},"emailDetail":{"type":"string"},"emailDetailSecond":{"type":"string"},"emailDetailThird":{"type":"string"},"emailDetailFourth":{"type":"string"},"location":{"$ref":"#/components/schemas/PublicContactLocationDto"},"homeLocation":{"$ref":"#/components/schemas/PublicContactLocationDto"},"industry":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"jobs":{"items":{"$ref":"#/components/schemas/PublicContactJobDto"},"type":"array"},"socialLinks":{"$ref":"#/components/schemas/PublicContactSocialLinksDto"}},"type":"object"},"PublicCreateNoteDto":{"properties":{"title":{"minLength":1,"type":"string"},"text":{"type":"string"},"folderId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"uid":{"type":"string","description":"External unique identifier from other systems"},"creationDate":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}],"description":"Historical creation date to preserve original timestamps"},"owner":{"type":"string","description":"Owner email. If not provided, the API key owner will be used. Not changeable after creation"},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control. If omitted, the note defaults to org-wide visibility."}},"type":"object","required":["title"]},"PublicUpdateNoteDto":{"properties":{"title":{"type":"string"},"text":{"type":"string"},"folderId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"uid":{"type":"string","description":"External unique identifier from other systems"},"creationDate":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}],"description":"Historical creation date to preserve original timestamps"},"permission":{"$ref":"#/components/schemas/PublicEntityPermissionDto","description":"Access control updates. Only the provided fields are changed."}},"type":"object"},"PublicGetNotesDto":{"properties":{"folderId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Filter notes by folder ID."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicGetNotesByDomainDto":{"properties":{"domain":{"minLength":1,"type":"string","description":"Company domain or full URL (e.g. \"acme.com\", \"www.acme.com\", or \"https://acme.com/about\"). URLs are normalized to the registrable domain. Aggregates notes linked to any entity at this domain."},"entityTypes":{"items":{"enum":["Company","Deal","Fundraising","Investor","Contact"],"type":"string"},"type":"array","maxItems":5,"description":"Restrict aggregation to notes linked via specific entity types. Defaults to all five."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object","required":["domain"]},"PublicNoteByDomainDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"title":{"type":"string"},"owner":{"type":"string"},"text":{"type":"string"},"source":{"type":"string"},"creationDate":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"originEntityType":{"enum":["Company","Deal","Fundraising","Investor","Contact"],"type":"string","description":"The entity type whose link to the domain caused this note to be included."}},"type":"object","required":["id","title","owner","originEntityType"]},"PublicViewNotesByDomainDto":{"properties":{"notes":{"items":{"$ref":"#/components/schemas/PublicNoteByDomainDto"},"type":"array"},"total":{"type":"integer","description":"Total number of matched notes before pagination. Use with `offset`/`limit` to page through results."}},"type":"object","required":["notes","total"]},"PublicNotificationTypeToggleDto":{"properties":{"type":{"type":"string","enum":["ASSIGNEE_TO_DEAL_TASK","DEAL_TASK_REMINDER","REPORT_DEAL","NOTE_USER_TAG","DEAL_TAG","NOTE_DEAL_MENTION","NOTE_COMPANY_DEAL_MENTION","NOTE_PERSON_MENTION","NOTE_COMPANY_MENTION","NOTE_INVESTOR_MENTION","NOTE_FUNDRAISING_MENTION","NOTE_FUNDRAISING_INVESTOR_MENTION","JOB_CHANGE_ALERT"],"description":"Notification type to change. One of NOTIFICATION_TYPES_AS_SETTINGS."},"enabled":{"type":"boolean","description":"true to receive this notification type, false to mute it."}},"type":"object","required":["type","enabled"]},"PublicUpdateDigestDto":{"properties":{"frequency":{"type":"string","enum":["immediate","daily","weekly"],"description":"Email delivery cadence: \"immediate\" sends each email as it happens; \"daily\" / \"weekly\" batch them into a single digest. Independent of the master email switch."},"time":{"pattern":"^(?:([01]?\\d|2[0-3]):[0-5]\\d|(1[0-2]|0?[1-9])(?::[0-5]\\d)?\\s*[AaPp][Mm])$","type":"string","description":"Send time as 24-hour HH:MM (\"08:30\") or 12-hour with am/pm (\"8:30 PM\", \"8 AM\"). Returned as 24-hour HH:MM. Daily/weekly only — kept from your current digest, or 09:00 if you have none."},"dayOfWeek":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"description":"Weekday the weekly digest is sent, e.g. \"monday\". Weekly only — kept from your current digest, or Monday if you have none."},"timezone":{"type":"string","description":"IANA timezone the send time is interpreted in, e.g. \"America/New_York\". Defaults to your own timezone."}},"type":"object","required":["frequency"]},"PublicUpdateNotificationSettingsDto":{"properties":{"emailNotifications":{"type":"boolean","description":"Master email-notifications switch. Per-type toggles only take effect while this is on."},"digest":{"$ref":"#/components/schemas/PublicUpdateDigestDto","description":"Email delivery cadence (immediate / daily / weekly digest) and its schedule."},"types":{"items":{"$ref":"#/components/schemas/PublicNotificationTypeToggleDto"},"type":"array","description":"Per-type email toggles to set (explicit on/off). Requires the master switch to be on."}},"type":"object"},"PublicNotificationTypeSettingDto":{"properties":{"type":{"type":"string"},"label":{"type":"string","description":"Human-readable label for the notification type."},"enabled":{"type":"boolean"}},"type":"object","required":["type","label","enabled"]},"PublicNotificationDigestDto":{"properties":{"frequency":{"type":"string","enum":["immediate","daily","weekly"],"description":"Email delivery cadence: immediate, daily, or weekly."},"time":{"type":"string","description":"Send time as HH:MM (24h) in the timezone below. null for immediate."},"dayOfWeek":{"type":"string","description":"Weekday the weekly digest is sent (e.g. \"monday\"). null for immediate/daily."},"timezone":{"type":"string","description":"IANA timezone the send time is interpreted in. null for immediate."}},"type":"object","required":["frequency"]},"PublicNotificationSettingsDto":{"properties":{"emailNotifications":{"type":"boolean","description":"Master email-notifications switch."},"types":{"items":{"$ref":"#/components/schemas/PublicNotificationTypeSettingDto"},"type":"array"},"digest":{"$ref":"#/components/schemas/PublicNotificationDigestDto","description":"Current email delivery cadence (immediate / daily / weekly digest)."}},"type":"object","required":["emailNotifications","types","digest"]},"PublicReportIdDto":{"properties":{"id":{"minLength":1,"type":"string","description":"Report identifier."}},"type":"object","required":["id"]},"PublicReportDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"entityType":{"enum":["deal","investor","fundraising","company","notes","contact","fees","user","list","report","recent-activity","notes-digest","themes","tag-item"],"type":"string","description":"The kind of records this report queries. Reports return rows of the matching entity (deals, contacts, or fundraising opportunities)."},"creatorId":{"type":"string"},"pipelineId":{"type":"string","description":"Pipeline this deal report is scoped to. Deal reports only."},"columns":{"items":{"type":"string"},"type":"array","description":"Field IDs displayed as columns, in order. Derived from the stored colDef[] via the field registry; columns whose underlying field has been deleted are omitted."},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","name","entityType","creatorId","columns"]},"PublicReportSummaryDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"entityType":{"enum":["deal","investor","fundraising","company","notes","contact","fees","user","list","report","recent-activity","notes-digest","themes","tag-item"],"type":"string","description":"The kind of records this report queries. Reports return rows of the matching entity (deals, contacts, or fundraising opportunities)."},"creatorId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","name","entityType","creatorId"]},"PublicViewAllReportsDto":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/PublicReportSummaryDto"},"type":"array"}},"type":"object","required":["reports"]},"PublicListReportsDto":{"properties":{"entityType":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Required. Entity type to list reports for. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}},"type":"object","required":["entityType"]},"PublicReportEntityTypeQueryDto":{"properties":{"entityType":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}},"type":"object","required":["entityType"]},"PublicReportDataQueryDto":{"properties":{"entityType":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object","required":["entityType"]},"PublicCreateReportDto":{"properties":{"name":{"maxLength":255,"type":"string","minLength":1,"description":"Display name for the report."},"entityType":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"description":"Entity type this report queries. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."},"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","maxItems":50,"description":"Stored filters that define what the report returns. Use the matching List Fields endpoint (deals/contacts/fundraising) to discover valid `field_id` values. Same shape as the aggregate endpoint filters."},"groupBy":{"items":{"type":"string"},"type":"array","maxItems":5,"description":"Optional. Field IDs the report should group by when rendered in the internal UI. Use the matching List Fields endpoint to discover valid IDs. Stored on the report; the public Get Report Data endpoint currently returns flat rows regardless of this setting."},"pipelineId":{"type":"string","description":"Only used when `entityType` is `deal`."},"columns":{"items":{"type":"string"},"type":"array","maxItems":200,"description":"Optional. Field IDs to display as columns, in order. Each id is expanded server-side into a full ag-grid column definition using the field's type, label, and options. Use the matching List Fields endpoint to discover valid IDs."},"permissionType":{"enum":["share","private"],"type":"string","description":"Optional. Sharing scope of the new report. Defaults to the platform default (typically organization-wide)."}},"type":"object","required":["name","entityType"]},"PublicUpdateReportDto":{"properties":{"name":{"maxLength":255,"type":"string","minLength":1,"description":"Display name for the report."},"filters":{"items":{"$ref":"#/components/schemas/PublicFilterDto"},"type":"array","maxItems":50,"description":"Replacement filter set. Same shape as the create endpoint. Omit to leave filters unchanged. Pass an empty array to clear filters."},"groupBy":{"items":{"type":"string"},"type":"array","maxItems":5,"description":"Replacement group-by field IDs. Omit to leave grouping unchanged. Pass an empty array to clear grouping."},"columns":{"items":{"type":"string"},"type":"array","maxItems":200,"description":"Replacement list of column field IDs, in order. Same shape as the create endpoint. Omit to leave columns unchanged. Pass an empty array to clear columns (renders with no columns)."},"pipelineId":{"type":"string","description":"Replacement pipeline scope. Only applies to deal reports. Omit to leave unchanged."}},"type":"object"},"PublicCreateReportScheduleDto":{"properties":{"rrule":{"minLength":1,"type":"string","description":"Bare iCalendar RRULE body. **Must match the shape the in-app schedule editor renders**: `FREQ=WEEKLY;BYDAY=;BYHOUR=;BYMINUTE=;BYSECOND=0` where `` is a comma list of `MO,TU,WE,TH,FR,SA,SU`, `` is `0-23`, `` is `0-59`. Example: `FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=9;BYMINUTE=0;BYSECOND=0`. INTERVAL must be 1 (default). BYHOUR / BYMINUTE must have exactly one value each. Any other shape (FREQ=DAILY / MONTHLY / YEARLY, missing BYHOUR/BYMINUTE, multiple hours, INTERVAL>1) will break the schedule editor when the schedule is later opened. Do NOT include `DTSTART;...` — pair with the `timezone` field below and the server builds the iCal block. When `timezone` is omitted, BYHOUR / BYMINUTE are interpreted in UTC."},"recipients":{"items":{"format":"email","type":"string"},"type":"array","uniqueItems":true,"maxItems":100,"minItems":1,"description":"Email addresses to send the report to. Every address must belong to an active user in the caller's organization."},"active":{"type":"boolean","description":"Whether the schedule is active. Defaults to true."},"timezone":{"minLength":1,"type":"string","description":"IANA timezone (e.g. `America/New_York`, `Europe/London`). Determines how `BYHOUR` / `BYMINUTE` in `rrule` are interpreted. Omit for UTC."}},"type":"object","required":["rrule","recipients"]},"PublicUpdateReportScheduleDto":{"properties":{"rrule":{"minLength":1,"type":"string","description":"Replacement bare RRULE body. Same shape constraint as Create: `FREQ=WEEKLY;BYDAY=;BYHOUR=;BYMINUTE=;BYSECOND=0` so the in-app schedule editor can render the schedule on next open. No `DTSTART;...` prefix. Required if `timezone` is supplied. Omit to leave unchanged."},"recipients":{"items":{"format":"email","type":"string"},"type":"array","uniqueItems":true,"maxItems":100,"minItems":1,"description":"Replacement recipient list. Every address must belong to an active user in the caller's organization. Omit to leave unchanged."},"active":{"type":"boolean","description":"Pause or resume the schedule."},"timezone":{"minLength":1,"type":"string","description":"Replacement IANA timezone (e.g. `America/New_York`). Only meaningful together with `rrule` — supplying it alone is rejected. Omit to leave the existing timezone unchanged."}},"type":"object"},"PublicReportScheduleDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"reportId":{"type":"string"},"rrule":{"type":"string"},"recipients":{"items":{"type":"string"},"type":"array"},"active":{"type":"boolean"},"nextSendAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"lastSentAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","reportId","rrule","recipients","active"]},"PublicReportDataResponseDto":{"properties":{"reportId":{"type":"string"},"entityType":{"enum":["deal","investor","fundraising","company","notes","contact","fees","user","list","report","recent-activity","notes-digest","themes","tag-item"],"type":"string"},"count":{"type":"integer","description":"Total number of records matching the report. May exceed the number of rows returned in this page (use `offset`/`limit` to paginate)."},"rows":{"items":{},"type":"array","description":"Page of records matching the report. Shape depends on `entityType` — see the corresponding `PublicDealDto`, `PublicContactDto`, or `PublicFundraisingDto` definitions."}},"type":"object","required":["reportId","entityType","count","rows"]},"ObjectCountsDto":{"properties":{"contacts":{"type":"integer","description":"Number of unique contacts across the tenant (deduplicated across lists)."},"deals":{"type":"integer","description":"Number of deals across the tenant."},"fundraisings":{"type":"integer","description":"Number of fundraising opportunities across the tenant."},"investors":{"type":"integer","description":"Number of investors across the tenant."},"notes":{"type":"integer","description":"Number of notes across the tenant."}},"type":"object","required":["contacts","deals","fundraisings","investors","notes"]},"ObjectsCountResponseDto":{"properties":{"organization":{"type":"string","description":"Organization the counts belong to."},"counts":{"type":"object","$ref":"#/components/schemas/ObjectCountsDto","description":"Per-entity counts across the tenant."}},"type":"object","required":["organization","counts"]},"ContactCountViewDto":{"properties":{"type":{"type":"string","enum":["list","report"],"description":"Whether the count is for a saved list or a saved report."},"id":{"type":"string","description":"Identifier of the list or report that was counted."},"entityType":{"type":"string","description":"Entity type that was counted (always \"contact\" for this endpoint)."}},"type":"object","required":["type","id","entityType"]},"ContactCountResponseDto":{"properties":{"organization":{"type":"string","description":"Organization the count belongs to."},"view":{"type":"object","$ref":"#/components/schemas/ContactCountViewDto","description":"The list or report that was counted."},"count":{"type":"integer","description":"Contact count for the view, matching exactly what the front end shows for that list/report regardless of membership in other lists."}},"type":"object","required":["organization","view","count"]},"GetContactCountDto":{"properties":{"listId":{"type":"string","description":"Count contacts in this list. Mutually exclusive with reportId."},"reportId":{"type":"string","description":"Count contacts matching this saved contact report. Mutually exclusive with listId."}},"type":"object"},"PublicExtraConfigDto":{"properties":{"formatting":{"type":"string","enum":["number","percent","string","boolean","date"],"description":"Formatting type for the field value. Allowed values: number, percent, string, boolean, date."},"decimalPoints":{"type":"string","description":"Number of decimal points for number/percent formatting.","default":"1"},"suffix":{"type":"string","description":"Suffix to append to the displayed value.","default":""},"dateDisplayFormat":{"type":"string","description":"Date display format pattern (e.g. \"YYYY-MM-dd\").","default":"YYYY-MM-dd"}},"type":"object"},"PublicCreateCustomFieldDto":{"properties":{"fieldId":{"type":"string","description":"Unique identifier of the field used for business logic. Must be unique within the entity."},"label":{"type":"string","description":"Display name of the field shown in the UI."},"category":{"type":"string","description":"Category used for visual grouping of fields in the UI."},"type":{"type":"string","enum":["input","textarea","dropdown","datepicker","multiselect","users-array","contacts-list","checkbox","number","formula","deal","deal-list","company","company-list","attachment","url-link"],"description":"Field type that determines business logic behavior. Allowed values: input, textarea, dropdown, datepicker, multiselect, users-array, contacts-list, checkbox, number, formula, deal, deal-list, company, company-list, attachment, url-link."},"default":{"description":"Default value for the field. Varies by field type. Examples: empty string (\"\") for \"input\", empty array ([]) for \"multiselect\", false for \"checkbox\".","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"},{"type":"object"}],"default":""},"options":{"items":{},"type":"array","description":"Additional configuration for field types that support predefined values, such as \"multiselect\", \"dropdown\". Defines the list of selectable options for these field types."},"invisibleField":{"type":"boolean","description":"Whether the field should be hidden in the UI."},"invisibleLabel":{"type":"boolean","description":"Whether the field label should be hidden in the UI."},"leftMenu":{"type":"boolean","description":"Whether the field should appear in the left menu navigation."},"mandatory":{"type":"boolean","description":"Whether the field is required to be populated."},"formula":{"type":"string","description":"Formula expression for fields of type \"formula\". Ignored for other field types.","default":""},"extraConfig":{"$ref":"#/components/schemas/PublicExtraConfigDto","description":"Extra configuration for field formatting and display. Applicable to field types that support value formatting, such as \"formula\", \"number\", and others. Controls how the field value is rendered (e.g. number of decimal points, suffix, date format)."},"externalServiceFieldPath":{"type":"string","description":"Field path used to map data from an external service response. Supports dot notation for nested properties (e.g. \"employees.current_count\"). Must be used together with externalServiceType. Defaults to \"NONE\" if not provided."},"externalServiceType":{"type":"string","enum":["APOLLO","PITCHBOOK","GAIN_PRO","NONE","SELF","CARTA","CARTA_DWH"],"description":"External service used for automatic field enrichment. The target entity must have the corresponding external service integration enabled, otherwise the field will not be enriched. Must be used together with externalServiceFieldPath. Defaults to \"NONE\" if not provided. Allowed values: APOLLO, PITCHBOOK, GAIN_PRO, NONE, SELF, CARTA, CARTA_DWH."},"readonly":{"type":"boolean","description":"Whether the field is read-only and cannot be edited by users.","default":false},"condition":{"type":"string","description":"Conditional expression that controls field visibility. When set, the field is only shown if the condition evaluates to true. Defaults to empty string (no condition) if not provided.","default":""}},"type":"object","required":["fieldId","label","category","type","default","options","invisibleField","invisibleLabel","leftMenu","mandatory"]},"PublicCreateContactCustomFieldDto":{"properties":{"type":{"type":"string","enum":["input","dropdown","multiselect","checkbox"],"description":"Field type that determines business logic behavior. Allowed values: input, dropdown, multiselect, checkbox."},"fieldId":{"type":"string","description":"Unique identifier of the field used for business logic. Must be unique within the entity."},"label":{"type":"string","description":"Display name of the field shown in the UI."},"category":{"type":"string","description":"Category used for visual grouping of fields in the UI."},"default":{"description":"Default value for the field. Varies by field type. Examples: empty string (\"\") for \"input\", empty array ([]) for \"multiselect\", false for \"checkbox\".","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"},{"type":"object"}],"default":""},"options":{"items":{},"type":"array","description":"Additional configuration for field types that support predefined values, such as \"multiselect\", \"dropdown\". Defines the list of selectable options for these field types."},"invisibleField":{"type":"boolean","description":"Whether the field should be hidden in the UI."},"invisibleLabel":{"type":"boolean","description":"Whether the field label should be hidden in the UI."},"leftMenu":{"type":"boolean","description":"Whether the field should appear in the left menu navigation."},"mandatory":{"type":"boolean","description":"Whether the field is required to be populated."},"formula":{"type":"string","description":"Formula expression for fields of type \"formula\". Ignored for other field types.","default":""},"extraConfig":{"$ref":"#/components/schemas/PublicExtraConfigDto","description":"Extra configuration for field formatting and display. Applicable to field types that support value formatting, such as \"formula\", \"number\", and others. Controls how the field value is rendered (e.g. number of decimal points, suffix, date format)."},"externalServiceFieldPath":{"type":"string","description":"Field path used to map data from an external service response. Supports dot notation for nested properties (e.g. \"employees.current_count\"). Must be used together with externalServiceType. Defaults to \"NONE\" if not provided."},"externalServiceType":{"type":"string","enum":["APOLLO","PITCHBOOK","GAIN_PRO","NONE","SELF","CARTA","CARTA_DWH"],"description":"External service used for automatic field enrichment. The target entity must have the corresponding external service integration enabled, otherwise the field will not be enriched. Must be used together with externalServiceFieldPath. Defaults to \"NONE\" if not provided. Allowed values: APOLLO, PITCHBOOK, GAIN_PRO, NONE, SELF, CARTA, CARTA_DWH."},"readonly":{"type":"boolean","description":"Whether the field is read-only and cannot be edited by users.","default":false},"condition":{"type":"string","description":"Conditional expression that controls field visibility. When set, the field is only shown if the condition evaluates to true. Defaults to empty string (no condition) if not provided.","default":""}},"type":"object","required":["type","fieldId","label","category","default","options","invisibleField","invisibleLabel","leftMenu","mandatory"]},"PublicUpdateCustomFieldDto":{"properties":{"label":{"type":"string","description":"Display name of the field shown in the UI."},"category":{"type":"string","description":"Category used for visual grouping of fields in the UI."},"type":{"type":"string","enum":["input","textarea","dropdown","datepicker","multiselect","users-array","contacts-list","checkbox","number","formula","deal","deal-list","company","company-list","attachment","url-link"],"description":"Field type that determines business logic behavior. Allowed values: input, textarea, dropdown, datepicker, multiselect, users-array, contacts-list, checkbox, number, formula, deal, deal-list, company, company-list, attachment, url-link."},"default":{"description":"Default value for the field. Varies by field type. Examples: empty string (\"\") for \"input\", empty array ([]) for \"multiselect\", false for \"checkbox\".","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"},{"type":"object"}]},"options":{"items":{},"type":"array","description":"Additional configuration for field types that support predefined values, such as \"multiselect\", \"dropdown\". Defines the list of selectable options for these field types."},"invisibleField":{"type":"boolean","description":"Whether the field should be hidden in the UI."},"invisibleLabel":{"type":"boolean","description":"Whether the field label should be hidden in the UI."},"leftMenu":{"type":"boolean","description":"Whether the field should appear in the left menu navigation."},"mandatory":{"type":"boolean","description":"Whether the field is required to be populated."},"formula":{"type":"string","description":"Formula expression for fields of type \"formula\". Ignored for other field types."},"extraConfig":{"$ref":"#/components/schemas/PublicExtraConfigDto","description":"Extra configuration for field formatting and display. Applicable to field types that support value formatting, such as \"formula\", \"number\", and others. Controls how the field value is rendered (e.g. number of decimal points, suffix, date format)."},"externalServiceFieldPath":{"type":"string","description":"Field path used to map data from an external service response. Supports dot notation for nested properties (e.g. \"employees.current_count\"). Must be used together with externalServiceType."},"externalServiceType":{"type":"string","enum":["APOLLO","PITCHBOOK","GAIN_PRO","NONE","SELF","CARTA","CARTA_DWH"],"description":"External service used for automatic field enrichment. The target entity must have the corresponding external service integration enabled, otherwise the field will not be enriched. Must be used together with externalServiceFieldPath. Allowed values: APOLLO, PITCHBOOK, GAIN_PRO, NONE, SELF, CARTA, CARTA_DWH."},"readonly":{"type":"boolean","description":"Whether the field is read-only and cannot be edited by users."},"condition":{"type":"string","description":"Conditional expression that controls field visibility. When set, the field is only shown if the condition evaluates to true."}},"type":"object"},"PublicUpdateContactCustomFieldDto":{"properties":{"type":{"type":"string","enum":["input","dropdown","multiselect","checkbox"],"description":"Field type that determines business logic behavior. Allowed values: input, dropdown, multiselect, checkbox."},"label":{"type":"string","description":"Display name of the field shown in the UI."},"category":{"type":"string","description":"Category used for visual grouping of fields in the UI."},"default":{"description":"Default value for the field. Varies by field type. Examples: empty string (\"\") for \"input\", empty array ([]) for \"multiselect\", false for \"checkbox\".","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"},{"type":"object"}]},"options":{"items":{},"type":"array","description":"Additional configuration for field types that support predefined values, such as \"multiselect\", \"dropdown\". Defines the list of selectable options for these field types."},"invisibleField":{"type":"boolean","description":"Whether the field should be hidden in the UI."},"invisibleLabel":{"type":"boolean","description":"Whether the field label should be hidden in the UI."},"leftMenu":{"type":"boolean","description":"Whether the field should appear in the left menu navigation."},"mandatory":{"type":"boolean","description":"Whether the field is required to be populated."},"formula":{"type":"string","description":"Formula expression for fields of type \"formula\". Ignored for other field types."},"extraConfig":{"$ref":"#/components/schemas/PublicExtraConfigDto","description":"Extra configuration for field formatting and display. Applicable to field types that support value formatting, such as \"formula\", \"number\", and others. Controls how the field value is rendered (e.g. number of decimal points, suffix, date format)."},"externalServiceFieldPath":{"type":"string","description":"Field path used to map data from an external service response. Supports dot notation for nested properties (e.g. \"employees.current_count\"). Must be used together with externalServiceType."},"externalServiceType":{"type":"string","enum":["APOLLO","PITCHBOOK","GAIN_PRO","NONE","SELF","CARTA","CARTA_DWH"],"description":"External service used for automatic field enrichment. The target entity must have the corresponding external service integration enabled, otherwise the field will not be enriched. Must be used together with externalServiceFieldPath. Allowed values: APOLLO, PITCHBOOK, GAIN_PRO, NONE, SELF, CARTA, CARTA_DWH."},"readonly":{"type":"boolean","description":"Whether the field is read-only and cannot be edited by users."},"condition":{"type":"string","description":"Conditional expression that controls field visibility. When set, the field is only shown if the condition evaluates to true."}},"type":"object"},"PublicReorderCustomFieldDto":{"properties":{"direction":{"type":"string","enum":["up","down"],"description":"Move the field one step in the field list. \"up\" moves it earlier, \"down\" moves it later. Provide either direction or position, not both."},"position":{"minimum":0,"type":"integer","description":"Zero-based target index in the field list. Clamped to the list bounds. Provide either direction or position, not both."}},"type":"object"},"PublicCampaignRecipientDto":{"properties":{"email":{"maxLength":254,"type":"string","format":"email"},"name":{"maxLength":200,"type":"string"},"firstName":{"maxLength":200,"type":"string"},"lastName":{"maxLength":200,"type":"string"},"companyName":{"maxLength":200,"type":"string"},"contactId":{"type":"string"}},"type":"object","required":["email"]},"PublicCampaignAsmDto":{"properties":{"groupId":{"type":"number"},"groupsToDisplay":{"items":{"type":"number"},"type":"array"}},"type":"object","required":["groupId"]},"PublicEmailCampaignSummaryDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"recipientCount":{"type":"number"},"sentAt":{},"scheduledAt":{}},"type":"object","required":["id","name","status","recipientCount"]},"PublicCampaignAttachmentMetaDto":{"properties":{"filename":{"type":"string"},"type":{"type":"string"},"sizeBytes":{"type":"number"},"disposition":{"type":"string"}},"type":"object","required":["filename","type"]},"PublicMergeVariableDto":{"properties":{"name":{"type":"string"},"token":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name","token","description"]},"PublicEmailCampaignDetailDto":{"properties":{"htmlContent":{"type":"string"},"textContent":{"type":"string"},"editorMode":{"enum":["wysiwyg","code"],"type":"string"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"recipients":{"items":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"type":"array"},"replyTo":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"attachments":{"items":{"$ref":"#/components/schemas/PublicCampaignAttachmentMetaDto"},"type":"array"},"availableVariables":{"items":{"$ref":"#/components/schemas/PublicMergeVariableDto"},"type":"array","description":"Merge tags (e.g. {{firstName}}) substituted per-recipient at send time."},"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"name":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"recipientCount":{"type":"number"},"sentAt":{},"scheduledAt":{}},"type":"object","required":["editorMode","recipients","attachments","availableVariables","id","name","status","recipientCount"]},"PublicEmailCampaignListDto":{"properties":{"campaigns":{"items":{"$ref":"#/components/schemas/PublicEmailCampaignSummaryDto"},"type":"array"},"total":{"maximum":9007199254740991,"type":"number"}},"type":"object","required":["campaigns","total"]},"PublicCreateEmailCampaignDto":{"properties":{"name":{"maxLength":200,"type":"string","minLength":1,"description":"Internal campaign name (label only, never sent in the email)."},"subject":{"maxLength":998,"type":"string"},"htmlContent":{"maxLength":1000000,"type":"string"},"textContent":{"maxLength":1000000,"type":"string"},"editorMode":{"enum":["wysiwyg","code"],"type":"string"},"fromEmail":{"maxLength":254,"type":"string","format":"email"},"fromName":{"maxLength":200,"type":"string"},"recipients":{"items":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"type":"array"},"replyTo":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"asm":{"$ref":"#/components/schemas/PublicCampaignAsmDto"}},"type":"object","required":["name"]},"PublicUpdateEmailCampaignDto":{"properties":{"name":{"maxLength":200,"type":"string","minLength":1},"subject":{"maxLength":998,"type":"string","minLength":1},"htmlContent":{"maxLength":1000000,"type":"string","minLength":1},"textContent":{"maxLength":1000000,"type":"string","minLength":1},"editorMode":{"enum":["wysiwyg","code"],"type":"string"},"fromEmail":{"maxLength":254,"type":"string","format":"email"},"fromName":{"maxLength":200,"type":"string"},"recipients":{"items":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"type":"array"},"replyTo":{"$ref":"#/components/schemas/PublicCampaignRecipientDto"},"asm":{"$ref":"#/components/schemas/PublicCampaignAsmDto"}},"type":"object"},"PublicGetEmailCampaignsDto":{"properties":{"status":{"enum":["draft","scheduled","sending","sent","failed"],"type":"string","description":"Filter by campaign status (draft, scheduled, sending, sent, failed)."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object"},"ErrorResponseDto":{"properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"type":"object","required":["success","error"]},"MongoIdDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"}},"type":"object","required":["id"]},"PublicViewPipelineStageDto":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object","required":["id","name"]},"PublicViewAllStagesDto":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"},"type":"array"}},"type":"object","required":["stages"]},"PublicViewPipelineDto":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"stages":{"items":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"},"type":"array"}},"type":"object","required":["id","name","stages"]},"PublicViewAllPipelinesDto":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/PublicViewPipelineDto"},"type":"array"}},"type":"object","required":["pipelines"]},"PublicCustomFieldDto":{"properties":{"fieldId":{"type":"string"},"label":{"type":"string"},"category":{"type":"string"},"default":{},"invisibleField":{"type":"boolean"},"invisibleLabel":{"type":"boolean"},"leftMenu":{"type":"boolean"},"mandatory":{"type":"boolean"},"options":{"items":{},"type":"array"},"tabName":{"type":"string"},"type":{"type":"string","enum":["input","textarea","dropdown","datepicker","multiselect","users-array","contacts-list","checkbox","number","texteditor","tags","formula","deal","deal-list","company","company-list","attachment","url-link","fixed"]},"externalServiceFieldPath":{"type":"string","description":"Field path used to map data from an external service response. Supports dot notation for nested properties (e.g. \"employees.current_count\")."},"externalServiceType":{"type":"string","enum":["APOLLO","PITCHBOOK","GAIN_PRO","NONE","SELF","CARTA","CARTA_DWH"],"description":"External service used for automatic field enrichment. Allowed values: APOLLO, PITCHBOOK, GAIN_PRO, NONE, SELF, CARTA, CARTA_DWH."},"formula":{"type":"string","description":"Formula expression for fields of type \"formula\"."},"extraConfig":{"$ref":"#/components/schemas/PublicExtraConfigDto","description":"Extra configuration for field formatting and display. Applicable to field types that support value formatting, such as \"formula\", \"number\", and others. Controls how the field value is rendered (e.g. number of decimal points, suffix, date format)."},"readonly":{"type":"boolean","description":"Whether the field is read-only and cannot be edited by users."},"condition":{"type":"string","description":"Conditional expression that controls field visibility."}},"type":"object","required":["fieldId","label","category","invisibleField","invisibleLabel","leftMenu","mandatory","options","tabName","type"]},"PublicCustomFieldsDto":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/PublicCustomFieldDto"},"type":"array"}},"type":"object","required":["fields"]},"PublicDeleteCustomFieldDto":{"properties":{"fieldId":{"type":"string"}},"type":"object","required":["fieldId"]},"FieldIdDto":{"properties":{"fieldId":{"type":"string"}},"type":"object","required":["fieldId"]},"PublicCreateDealStageDto":{"properties":{"pipelineId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","default":"","description":"Description of the stage."},"kanban":{"type":"boolean","default":false},"funnel":{"type":"boolean","default":false},"secondFunnel":{"type":"boolean","default":false},"default":{"type":"boolean","default":false,"description":"Whether this is the default stage for new deals."}},"type":"object","required":["pipelineId","id","name"]},"PublicDeleteDealStageDto":{"properties":{"pipelineId":{"type":"string"},"stageId":{"type":"string"}},"type":"object","required":["pipelineId","stageId"]},"UnauthorizeErrorResponseDto":{"properties":{"message":{"type":"string"}},"type":"object","required":["message"]},"PublicEntityFieldDto":{"properties":{"fieldId":{"type":"string","description":"Unique field identifier. Use this value in filters and group_by."},"label":{"type":"string","description":"Human-readable field label."},"type":{"type":"string","description":"Field data type (e.g. text, number, date, set, dropdown)."},"source":{"type":"string","enum":["standard","custom"],"description":"Whether this is a built-in standard field or a user-defined custom field."},"options":{"items":{"type":"string"},"type":"array","description":"Allowed values for set/dropdown fields."}},"type":"object","required":["fieldId","label","type","source"]},"PublicEntityFieldsDto":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/PublicEntityFieldDto"},"type":"array","description":"All available entity fields (standard and custom)."}},"type":"object","required":["fields"]},"PublicGetDealsDto":{"properties":{"stages":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by stage IDs. Stage IDs can be found in GET /v1/deals/pipelines endpoint (stages array within each pipeline).\n\n**Note:** To provide multiple values, repeat the parameter in query: `?stages=value1&stages=value2`"},"pipelines":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by pipeline IDs. Pipeline IDs can be found in GET /v1/deals/pipelines endpoint.\n\n**Note:** To provide multiple values, repeat the parameter in query: `?pipelines=value1&pipelines=value2`"},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicStageRefDto":{"properties":{"id":{"type":"string","description":"Stage ID."},"name":{"type":"string","description":"Stage display name."}},"type":"object","required":["id","name"]},"PublicStageTransitionDto":{"properties":{"timestamp":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}],"description":"When the transition occurred."},"fromStage":{"$ref":"#/components/schemas/PublicStageRefDto","description":"The stage the deal moved from. Null for the initial stage assignment.","nullable":true},"toStage":{"$ref":"#/components/schemas/PublicStageRefDto","description":"The stage the deal moved to."},"changedBy":{"type":"string","description":"User ID of the person who made the change."}},"type":"object","required":["timestamp","toStage","changedBy"]},"PublicDealStageHistoryResponseDto":{"properties":{"dealId":{"type":"string","description":"The deal ID."},"transitions":{"items":{"$ref":"#/components/schemas/PublicStageTransitionDto"},"type":"array","description":"Ordered list of stage transitions, oldest first."}},"type":"object","required":["dealId","transitions"]},"DealFieldUploadParamsDto":{"properties":{"dealId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"fieldId":{"minLength":1,"type":"string"}},"type":"object","required":["dealId","fieldId"]},"DealFieldDeleteAttachmentParamsDto":{"properties":{"dealId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"fieldId":{"minLength":1,"type":"string"},"fileId":{"minLength":1,"type":"string","description":"The attachment ID to delete"}},"type":"object","required":["dealId","fieldId","fileId"]},"PublicDealAttachmentDto":{"properties":{"id":{"type":"string"},"s3Path":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string"},"contentLength":{"type":"number"},"uploadedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"previews":{"items":{},"type":"array"},"ownerId":{"type":"string"}},"type":"object","required":["id","s3Path","fileName","mimeType","contentLength","uploadedAt","previews"]},"EntityFieldUploadParamsDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"fieldId":{"minLength":1,"type":"string"}},"type":"object","required":["id","fieldId"]},"EntityFieldDeleteAttachmentParamsDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"fieldId":{"minLength":1,"type":"string"},"fileId":{"minLength":1,"type":"string","description":"The attachment ID to delete"}},"type":"object","required":["id","fieldId","fileId"]},"PublicCreateFundraisingStageDto":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"kanban":{"type":"boolean","default":false,"description":"Whether the stage is visible on the kanban board."}},"type":"object","required":["id","name"]},"PublicDeleteFundraisingStageDto":{"properties":{"stageId":{"type":"string"}},"type":"object","required":["stageId"]},"PublicGetFundraisingDto":{"properties":{"stages":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by stage IDs. Stage IDs can be found in GET /v1/fundraisings/stages endpoint.\n\n**Note:** To provide multiple values, repeat the parameter in query: `?stages=value1&stages=value2`"},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicGetContactsDto":{"properties":{"listIds":{"items":{"type":"string"},"type":"array","maxItems":20,"description":"Filter to contacts in these lists. Pass as repeated query params (e.g. `?listIds=abc&listIds=def`). If omitted, contacts are returned across all lists and folders the caller has access to."},"currentCompany":{"type":"string","description":"Filter to contacts whose CURRENT employer matches this company name (case-insensitive, partial match). Matches headlineCompany and current jobs (jobs with no ended_on); does not match past employers or note mentions."},"titles":{"items":{"type":"string"},"type":"array","maxItems":10,"description":"Filter to contacts whose current title matches ANY of these values (case-insensitive, partial match). Pass as repeated query params (e.g. `?titles=CEO&titles=CFO`)."},"tagsAny":{"items":{"type":"string"},"type":"array","maxItems":10,"description":"Filter to contacts where ANY of these tags/industries appear (case-insensitive, matches tags, industry, or headline). Pass as repeated query params (e.g. `?tagsAny=technology&tagsAny=software`)."},"locationCity":{"type":"string","description":"Filter to contacts whose structured work-location or home-location city matches this value (case-insensitive, partial match)."},"locationCountry":{"type":"string","description":"Filter to contacts whose structured work-location or home-location country matches this value (case-insensitive, partial match)."},"queryTerms":{"items":{"type":"string"},"type":"array","maxItems":5,"description":"OR-logic alternative to `search`: contacts matching ANY term are returned. Pass as repeated query params (e.g. `?queryTerms=investment+banking&queryTerms=M%26A`). When set, `search` is ignored."},"folderIds":{"items":{"type":"string"},"type":"array","maxItems":20,"description":"Filter to contacts belonging to any of these folder IDs. Pass as repeated query params (e.g. `?folderIds=abc&folderIds=def`). Can be combined with `listIds`. If omitted, contacts are returned across all lists and folders the caller has access to."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"PublicNoteDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"title":{"type":"string"},"owner":{"type":"string"},"text":{"type":"string"},"uid":{"type":"string"},"source":{"type":"string"},"folderId":{"type":"string"},"inFolder":{"type":"boolean"},"files":{"items":{"$ref":"#/components/schemas/PublicAttachmentDto"},"type":"array"},"creationDate":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","title","owner","inFolder","files","createdAt","updatedAt"]},"PublicNoteFolderDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"title":{"type":"string"},"owner":{"type":"string"},"createdAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"updatedAt":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]}},"type":"object","required":["id","title","owner","createdAt","updatedAt"]},"PublicViewAllNoteFoldersDto":{"properties":{"folders":{"items":{"$ref":"#/components/schemas/PublicNoteFolderDto"},"type":"array"}},"type":"object","required":["folders"]},"PublicViewAllNotesDto":{"properties":{"notes":{"items":{"$ref":"#/components/schemas/PublicNoteDto"},"type":"array"}},"type":"object","required":["notes"]},"NoteAttachmentUploadParamsDto":{"properties":{"noteId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"}},"type":"object","required":["noteId"]},"NoteAttachmentDeleteParamsDto":{"properties":{"noteId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"fileId":{"minLength":1,"type":"string","description":"The attachment ID to delete"}},"type":"object","required":["noteId","fileId"]},"PublicNoteAttachmentDto":{"properties":{"id":{"type":"string","description":"Stable identifier for the uploaded file. Used to delete the attachment."},"name":{"type":"string","description":"Original file name supplied at upload time."},"url":{"type":"string","description":"URL pointing to the file. Re-fetch the note to get a fresh signed URL when needed."}},"type":"object","required":["id","name","url"]},"PublicLinkedNotesDto":{"properties":{"notes":{"items":{"$ref":"#/components/schemas/PublicNoteDto"},"type":"array"}},"type":"object","required":["notes"]},"PublicAddUserDto":{"properties":{"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"companyRole":{"enum":["ADMIN","LEADERSHIP","DEAL_TEAM","PORTFOLIO","FINANCE","INVESTOR_RELATIONS","ADMIN_SUPPORT","OTHER"],"type":"string"},"teams":{"items":{"type":"string"},"type":"array"}},"type":"object","required":["name","email","companyRole"]},"PublicUserDto":{"properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"companyRole":{"enum":["ADMIN","LEADERSHIP","DEAL_TEAM","PORTFOLIO","FINANCE","INVESTOR_RELATIONS","ADMIN_SUPPORT","OTHER"],"type":"string"},"organization":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","BLOCKED","INVITED"]}},"type":"object","required":["id","email","name","companyRole","organization","status"]},"PublicViewAllUsersDto":{"properties":{"users":{"items":{"$ref":"#/components/schemas/PublicUserDto"},"type":"array"}},"type":"object","required":["users"]},"PublicOrganizationDto":{"properties":{"id":{"type":"string","description":"Organization ID."},"name":{"type":"string","description":"Organization name — the tenant identifier."},"description":{"type":"string","description":"Organization description."}},"type":"object","required":["id","name"]},"PublicCurrentUserDto":{"properties":{"name":{"type":"string","description":"Display name of the current user."},"email":{"type":"string","description":"Email address of the current user."},"organization":{"type":"string","description":"Organization name — the tenant the current user is operating in."}},"type":"object","required":["name","email","organization"]},"PublicTeamDto":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"memberCount":{"type":"number"}},"type":"object","required":["id","name","description","memberCount"]},"PublicViewAllTeamsDto":{"properties":{"teams":{"items":{"$ref":"#/components/schemas/PublicTeamDto"},"type":"array"}},"type":"object","required":["teams"]},"PublicChangeUserStatusDto":{"properties":{"status":{"type":"string","enum":["ACTIVE","BLOCKED"]}},"type":"object","required":["status"]},"PublicUserIdParamsDto":{"properties":{"userId":{"type":"string"}},"type":"object","required":["userId"]},"PublicChangeUserRoleDto":{"properties":{"role":{"enum":["ADMIN","LEADERSHIP","DEAL_TEAM","PORTFOLIO","FINANCE","INVESTOR_RELATIONS","ADMIN_SUPPORT","OTHER"],"type":"string"}},"type":"object","required":["role"]},"PublicToggleModuleDto":{"properties":{"enable":{"type":"boolean"}},"type":"object","required":["enable"]},"PublicCreateCompanyListDto":{"properties":{"name":{"type":"string","description":"Display name of the company list."}},"type":"object","required":["name"]},"PublicUpdateCompanyListDto":{"properties":{"name":{"type":"string","description":"Updated display name of the company list."}},"type":"object"},"ListIdParamsDto":{"properties":{"listId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"}},"type":"object","required":["listId"]},"PublicGetCompaniesDto":{"properties":{"listId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Filter companies by list ID."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."},"search":{"type":"string","default":null,"description":"Search query string to filter results."}},"type":"object"},"CompanyListParamsDto":{"properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"listId":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"}},"type":"object","required":["id","listId"]},"PublicGetInteractionsDto":{"properties":{"domain":{"minLength":1,"type":"string","description":"The domain to search interactions for (e.g. \"acme.com\")."},"type":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."},"limit":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."},"offset":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},"type":"object","required":["domain"]},"UpdateInboundEmailSettingsDto":{"properties":{"enabled":{"type":"boolean","description":"Master toggle for inbound-email processing in this organization."},"allowedSenders":{"items":{"format":"email","type":"string"},"type":"array","maxItems":100,"description":"Emails allowed to trigger inbound-email processing. Max 100."},"agentGuide":{"maxLength":4000,"type":"string","description":"Tenant-specific guidance injected into the agent system prompt. Max 4000 chars."}},"type":"object","required":["enabled","allowedSenders","agentGuide"]},"InboundEmailSettingsResponseDto":{"properties":{"enabled":{"type":"boolean","description":"Master toggle for inbound-email processing in this organization."},"allowedSenders":{"items":{"format":"email","type":"string"},"type":"array","description":"Emails allowed to trigger inbound-email processing. Stored lowercase, deduped."},"agentGuide":{"type":"string","description":"Tenant-specific guidance injected into the inbound-email agent system prompt."}},"type":"object","required":["enabled","allowedSenders","agentGuide"]},"Object":{"type":"object","x-internal":true}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"info":{"title":"Resources","version":"1.0.0","description":"Carta CRM Public API provides programmatic access to your data.  Use this API to integrate Carta CRM with your internal systems, automate workflows, and build custom reporting solutions.\n\nAll endpoints require API key authentication via the Authorization header."},"openapi":"3.0.0","paths":{"/v1/deals/pipelines":{"get":{"operationId":"PublicDealMetadataController.getPipelinesWithStages","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllPipelinesDto"}}},"description":"List of pipelines with their stages"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Pipelines","tags":["Deals"],"description":"A **pipeline** represents the sequence of **stages** a deal passes through from initiation to completion. The Deal and Credit teams use different **pipelines** to manage their workflows effectively.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/fields":{"get":{"operationId":"PublicDealMetadataController.getAllDealFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEntityFieldsDto"}}},"description":"All available deal fields"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Deal Fields","tags":["Deals"],"description":"Returns all available deal fields, both **standard** built-in fields and **custom** user-defined fields. Use the returned `fieldId` values in filter and aggregation endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/custom-fields":{"get":{"operationId":"PublicDealMetadataController.getCustomFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldsDto"}}},"description":"Schema of custom fields for deals"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Custom Fields","tags":["Deals"],"description":"**Custom fields** allow users to store additional information alongside a deal. EBITDA, revenue multiple, and other financial metrics can be tracked using **custom fields**.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/custom-fields/add":{"post":{"operationId":"PublicDealMetadataController.addCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateCustomFieldDto"}}},"description":"PublicCreateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Custom Field","tags":["Deals"],"description":"Adds a new **custom field** to the deal schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/custom-fields/{fieldId}":{"patch":{"operationId":"PublicDealMetadataController.updateCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateCustomFieldDto"}}},"description":"PublicUpdateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Custom Field","tags":["Deals"],"description":"Partially updates an existing **custom field** in the deal schema. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/custom-fields/{fieldId}/reorder":{"patch":{"operationId":"PublicDealMetadataController.reorderCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderCustomFieldDto"}}},"description":"PublicReorderCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Custom Field","tags":["Deals"],"description":"Changes the position of a field in the deal field list. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/custom-fields/delete":{"delete":{"operationId":"PublicDealMetadataController.deleteCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteCustomFieldDto"}}},"description":"PublicDeleteCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Custom Field","tags":["Deals"],"description":"Deletes an existing **custom field** from the deal schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/stages/add":{"post":{"operationId":"PublicDealMetadataController.addStage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateDealStageDto"}}},"description":"PublicCreateDealStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"}}},"description":"Stage created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Stage","tags":["Deals"],"description":"Adds a new **stage** to a deal pipeline.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/stages/{stageId}":{"patch":{"operationId":"PublicDealMetadataController.updateStage","parameters":[{"in":"path","name":"stageId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateDealStageDto"}}},"description":"PublicUpdateDealStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"}}},"description":"Stage updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Stage","tags":["Deals"],"description":"Partially updates an existing **stage** in a deal pipeline. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/stages/{stageId}/reorder":{"patch":{"operationId":"PublicDealMetadataController.reorderStage","parameters":[{"in":"path","name":"stageId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderDealStageDto"}}},"description":"PublicReorderDealStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Stage reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Stage","tags":["Deals"],"description":"Changes the position of a **stage** within a deal pipeline. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`. When `pipelineId` is omitted, the organization default pipeline is used.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/stages/delete":{"delete":{"operationId":"PublicDealMetadataController.deleteStage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteDealStageDto"}}},"description":"PublicDeleteDealStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Stage deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Stage","tags":["Deals"],"description":"Deletes an existing **stage** from a deal pipeline.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals":{"get":{"operationId":"PublicDealController.getDeals","parameters":[{"in":"query","name":"stages","schema":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by stage IDs. Stage IDs can be found in GET /v1/deals/pipelines endpoint (stages array within each pipeline).\n\n**Note:** To provide multiple values, repeat the parameter in query: `?stages=value1&stages=value2`"}},{"in":"query","name":"pipelines","schema":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by pipeline IDs. Pipeline IDs can be found in GET /v1/deals/pipelines endpoint.\n\n**Note:** To provide multiple values, repeat the parameter in query: `?pipelines=value1&pipelines=value2`"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllDealsDto"}}},"description":"List of deals matching the search criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Deals","tags":["Deals"],"description":"Return **deals** based on search criteria, with filtering, sorting, and pagination.\n\nIf the pipeline is not specified, the one marked as the default pipeline is used. To search in other pipelines, you need to explicitly pass the `pipelineId`. To search by stages that are not in the default pipeline, you also need to explicitly specify the `pipelineId`.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicDealController.createDeal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealCreateDto"}}},"description":"PublicDealCreateDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealDto"}}},"description":"Deal created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Deal","tags":["Deals"],"description":"Creates a new deal in the specified pipeline and stage. The deal will be associated with the authenticated organization.\n\n**Auto-Enrichment:** To enable automatic company data enrichment, provide a valid company website URL in the `company.url` field. When a valid URL is supplied, the system will automatically populate additional company information.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}":{"get":{"operationId":"PublicDealController.getDealById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealDto"}}},"description":"Deal found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Deal by ID","tags":["Deals"],"description":"Returns a single **deal** by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicDealController.updateDeal","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealPatchDto"}}},"description":"PublicDealPatchDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealDto"}}},"description":"Deal updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Deal","tags":["Deals"],"description":"Partially updates an existing deal. Only the fields provided in the request body will be modified; all other fields remain unchanged.\n\nUpdates do not trigger auto-enrichment. To enrich the deal after updating, call `POST /v1/deals/:id/enrich`.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicDealController.deleteDeal","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Deal deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Deal","tags":["Deals"],"description":"Permanently removes a deal from the system.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/interactions":{"get":{"operationId":"PublicDealController.getDealInteractions","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityInteractionsDto"}}},"description":"Past + upcoming interactions for the deal"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Deal Interactions","tags":["Deals"],"description":"Return past email and calendar event interactions between your organization and contacts at the deal's company (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). The deal's linked company name/URL is expanded to any aliases linked to it in this organization, and private email providers are filtered out.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/relations":{"get":{"operationId":"PublicDealController.getDealRelations","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityRelationsDto"}}},"description":"Aggregated relations for the deal"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Deal Relations","tags":["Deals"],"description":"Return aggregated relationships (one row per unique participant) for the company on the given deal. Domain(s) are resolved from the deal's linked company.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/stage-history":{"get":{"operationId":"PublicDealController.getDealStageHistory","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealStageHistoryResponseDto"}}},"description":"Stage transition history"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Deal Stage History","tags":["Deals"],"description":"Returns the chronological list of **stage transitions** for a deal, from the earliest recorded change to the most recent.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/batch":{"post":{"operationId":"PublicDealController.batchCreateDeals","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealBatchCreateDto"}}},"description":"PublicDealBatchCreateDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealBatchResponseDto"}}},"description":"Deals created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Batch Create Deals","tags":["Deals"],"description":"Creates multiple deals in a single request (up to 100). Each deal follows the same rules as the single create endpoint.\n\n**Atomicity:** This operation is all-or-nothing. If any deal in the array fails validation or creation, the entire request returns an error. Deals that were processed before the failure may have already been written; on error, check for partial side effects.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicDealController.batchUpdateDeals","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealBatchPatchDto"}}},"description":"PublicDealBatchPatchDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealBatchResponseDto"}}},"description":"Deals updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"One or more deals not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Batch Update Deals","tags":["Deals"],"description":"Partially updates multiple deals in a single request (up to 100). Each item must include an `id` field identifying the deal to update. Only the fields provided will be modified.\n\n**Atomicity:** This operation is all-or-nothing. If any deal in the array fails (e.g. deal not found, invalid field), the entire request returns an error.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/aggregate":{"post":{"operationId":"PublicDealController.aggregateDeals","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateDealsDto"}}},"description":"PublicAggregateDealsDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateResponseDto"}}},"description":"Aggregation results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Aggregate Deals","tags":["Deals"],"description":"Groups deals by one or more fields and returns counts per group. Supports filtering before aggregation.\n\nUse the **List Deal Fields** endpoint to discover valid field IDs for `group_by` and `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/search":{"post":{"operationId":"PublicDealController.searchDeals","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSearchDealsDto"}}},"description":"PublicSearchDealsDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllDealsDto"}}},"description":"Matching deals"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Search Deals with Structured Filters","tags":["Deals"],"description":"Returns **deals** matching the structured filters in the request body. Use this endpoint when you need to filter by custom field values, ranges, or other field-level criteria that cannot be expressed in the simple `GET /v1/deals` query.\n\nUse the **List Deal Fields** endpoint to discover valid `field_id` values for `filters`. `stages_visited` is supported.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/enrich":{"post":{"operationId":"PublicDealController.enrichDeal","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Enrichment queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Read-only API key cannot trigger enrichment"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Enrich Deal","tags":["Deals"],"description":"Queues asynchronous enrichment for an existing **deal**. The system fetches company data (firmographics, employees, location) from the deal's `company.url` and backfills configured fields. Processing completes asynchronously; poll `GET /v1/deals/:id` to retrieve enriched data.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{dealId}/custom-fields/upload/{fieldId}":{"post":{"operationId":"PublicDealAttachmentController.uploadDealFieldAttachment","parameters":[{"in":"path","name":"dealId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealAttachmentDto"}}},"description":"File uploaded successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type or missing file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Attachment to Deal Custom Field","tags":["Deal Attachments"],"description":"Uploads a file attachment to a deal custom field of type `attachment`. Send the file as `multipart/form-data` with the field name `file`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{dealId}/custom-fields/{fieldId}/attachments/{fileId}":{"delete":{"operationId":"PublicDealAttachmentController.deleteDealFieldAttachment","parameters":[{"in":"path","name":"dealId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"File deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Attachment from Deal Custom Field","tags":["Deal Attachments"],"description":"Removes a file attachment from a deal custom field of type `attachment`. The file is also deleted from storage.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/logo":{"post":{"operationId":"PublicDealAttachmentController.uploadDealLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo uploaded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"}},"summary":"Upload Deal Logo","tags":["Deal Attachments"],"description":"Uploads a logo for a deal. Send the file as `multipart/form-data` with the field name `file`. Replaces any existing logo.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicDealAttachmentController.deleteDealLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"}},"summary":"Delete Deal Logo","tags":["Deal Attachments"],"description":"Removes the logo from a deal.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/custom-fields/upload/{fieldId}":{"post":{"operationId":"PublicInvestorAttachmentController.uploadInvestorFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealAttachmentDto"}}},"description":"File uploaded successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type or missing file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Attachment to Investor Custom Field","tags":["Investor Attachments"],"description":"Uploads a file attachment to an investor custom field of type `attachment`. Send the file as `multipart/form-data` with the field name `file`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/custom-fields/{fieldId}/attachments/{fileId}":{"delete":{"operationId":"PublicInvestorAttachmentController.deleteInvestorFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"File deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Attachment from Investor Custom Field","tags":["Investor Attachments"],"description":"Removes a file attachment from an investor custom field of type `attachment`. The file is also deleted from storage.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/logo":{"post":{"operationId":"PublicInvestorAttachmentController.uploadInvestorLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo uploaded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"}},"summary":"Upload Investor Logo","tags":["Investor Attachments"],"description":"Uploads a logo for an investor. Send the file as `multipart/form-data` with the field name `file`. Replaces any existing logo.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicInvestorAttachmentController.deleteInvestorLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"}},"summary":"Delete Investor Logo","tags":["Investor Attachments"],"description":"Removes the logo from an investor.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/custom-fields/upload/{fieldId}":{"post":{"operationId":"PublicCompanyAttachmentController.uploadCompanyFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealAttachmentDto"}}},"description":"File uploaded successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type or missing file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Attachment to Company Custom Field","tags":["Company Attachments"],"description":"Uploads a file attachment to a company custom field of type `attachment`. Send the file as `multipart/form-data` with the field name `file`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/custom-fields/{fieldId}/attachments/{fileId}":{"delete":{"operationId":"PublicCompanyAttachmentController.deleteCompanyFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"File deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Attachment from Company Custom Field","tags":["Company Attachments"],"description":"Removes a file attachment from a company custom field of type `attachment`. The file is also deleted from storage.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/logo":{"post":{"operationId":"PublicCompanyAttachmentController.uploadCompanyLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo uploaded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"}},"summary":"Upload Company Logo","tags":["Company Attachments"],"description":"Uploads a logo for a company. Send the file as `multipart/form-data` with the field name `file`. Replaces any existing logo.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicCompanyAttachmentController.deleteCompanyLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"}},"summary":"Delete Company Logo","tags":["Company Attachments"],"description":"Removes the logo from a company.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/custom-fields/upload/{fieldId}":{"post":{"operationId":"PublicFundraisingAttachmentController.uploadFundraisingFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDealAttachmentDto"}}},"description":"File uploaded successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type or missing file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Attachment to Fundraising Custom Field","tags":["Fundraising Attachments"],"description":"Uploads a file attachment to a fundraising custom field of type `attachment`. Send the file as `multipart/form-data` with the field name `file`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/custom-fields/{fieldId}/attachments/{fileId}":{"delete":{"operationId":"PublicFundraisingAttachmentController.deleteFundraisingFieldAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"File deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid field type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising or field not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Attachment from Fundraising Custom Field","tags":["Fundraising Attachments"],"description":"Removes a file attachment from a fundraising custom field of type `attachment`. The file is also deleted from storage.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/logo":{"post":{"operationId":"PublicFundraisingAttachmentController.uploadFundraisingLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo uploaded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"}},"summary":"Upload Fundraising Logo","tags":["Fundraising Attachments"],"description":"Uploads a logo for a fundraising opportunity. Send the file as `multipart/form-data` with the field name `file`. Replaces any existing logo.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicFundraisingAttachmentController.deleteFundraisingLogo","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Logo deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"}},"summary":"Delete Fundraising Logo","tags":["Fundraising Attachments"],"description":"Removes the logo from a fundraising opportunity.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/stages":{"get":{"operationId":"PublicFundraisingController.getStages","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllStagesDto"}}},"description":"List of available fundraising stages"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Fundraising Stages","tags":["Fundraisings"],"description":"Returns all available fundraising stages. Stages represent the lifecycle phases of a fundraising process.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/custom-fields":{"get":{"operationId":"PublicFundraisingController.getCustomFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldsDto"}}},"description":"Schema of custom fields for fundraising"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Fundraising Custom Fields","tags":["Fundraisings"],"description":"Returns the schema of all custom fields configured for the Fundraising entity. Custom fields allow organizations to extend the default fundraising data model with additional attributes.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/custom-fields/add":{"post":{"operationId":"PublicFundraisingController.addCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateCustomFieldDto"}}},"description":"PublicCreateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Custom Field","tags":["Fundraisings"],"description":"Adds a new **custom field** to the fundraising schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/custom-fields/{fieldId}":{"patch":{"operationId":"PublicFundraisingController.updateCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateCustomFieldDto"}}},"description":"PublicUpdateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Custom Field","tags":["Fundraisings"],"description":"Partially updates an existing **custom field** in the fundraising schema. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/custom-fields/{fieldId}/reorder":{"patch":{"operationId":"PublicFundraisingController.reorderCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderCustomFieldDto"}}},"description":"PublicReorderCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Custom Field","tags":["Fundraisings"],"description":"Changes the position of a field in the fundraising field list. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/custom-fields/delete":{"delete":{"operationId":"PublicFundraisingController.deleteCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteCustomFieldDto"}}},"description":"PublicDeleteCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Custom Field","tags":["Fundraisings"],"description":"Deletes an existing **custom field** from the fundraising schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/stages/add":{"post":{"operationId":"PublicFundraisingController.addStage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateFundraisingStageDto"}}},"description":"PublicCreateFundraisingStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"}}},"description":"Stage created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Fundraising Stage","tags":["Fundraisings"],"description":"Adds a new **stage** to the fundraising lifecycle.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/stages/{stageId}":{"patch":{"operationId":"PublicFundraisingController.updateStage","parameters":[{"in":"path","name":"stageId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateFundraisingStageDto"}}},"description":"PublicUpdateFundraisingStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewPipelineStageDto"}}},"description":"Stage updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Fundraising Stage","tags":["Fundraisings"],"description":"Partially updates an existing **stage** in the fundraising lifecycle. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/stages/{stageId}/reorder":{"patch":{"operationId":"PublicFundraisingController.reorderStage","parameters":[{"in":"path","name":"stageId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderFundraisingStageDto"}}},"description":"PublicReorderFundraisingStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Stage reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Fundraising Stage","tags":["Fundraisings"],"description":"Changes the position of a **stage** in the fundraising lifecycle. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/stages/delete":{"delete":{"operationId":"PublicFundraisingController.deleteStage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteFundraisingStageDto"}}},"description":"PublicDeleteFundraisingStageDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Stage deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Fundraising Stage","tags":["Fundraisings"],"description":"Deletes an existing **stage** from the fundraising lifecycle.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/fields":{"get":{"operationId":"PublicFundraisingController.getAllFundraisingFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEntityFieldsDto"}}},"description":"All available fundraising fields"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Fundraising Fields","tags":["Fundraisings"],"description":"Returns all available fundraising fields, both **standard** built-in fields and **custom** user-defined fields. Use the returned `fieldId` values in filter and aggregation endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/aggregate":{"post":{"operationId":"PublicFundraisingController.aggregateFundraisings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateRequestDto"}}},"description":"PublicAggregateRequestDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateResponseDto"}}},"description":"Aggregation results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Aggregate Fundraisings","tags":["Fundraisings"],"description":"Groups fundraisings by a field and returns counts per group. Supports filtering before aggregation.\n\nUse the **List Fundraising Fields** endpoint to discover valid field IDs for `group_by` and `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/search":{"post":{"operationId":"PublicFundraisingController.searchFundraisings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSearchFundraisingsDto"}}},"description":"PublicSearchFundraisingsDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllFundraisingDto"}}},"description":"Matching fundraisings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Search Fundraisings with Structured Filters","tags":["Fundraisings"],"description":"Returns **fundraisings** matching the structured filters in the request body. Use this endpoint when you need to filter by custom field values, ranges, or other field-level criteria that cannot be expressed in the simple `GET /v1/fundraisings` query.\n\nUse the **List Fundraising Fields** endpoint to discover valid `field_id` values for `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/enrich":{"post":{"operationId":"PublicFundraisingController.enrichFundraising","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Enrichment accepted and queued for asynchronous processing"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Read-only API key cannot trigger enrichment"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Enrich Fundraising","tags":["Fundraisings"],"description":"Queues asynchronous enrichment for an existing **fundraising**. The system fetches company data (firmographics, employees, location) from the fundraising's website and backfills configured fields. Poll `GET /v1/fundraisings/:id` to retrieve enriched data once processing completes.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}":{"get":{"operationId":"PublicFundraisingController.getFundraisingById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFundraisingDto"}}},"description":"Fundraising found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Fundraising by ID","tags":["Fundraisings"],"description":"Returns a single **fundraising** record by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicFundraisingController.updateFundraising","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFundraisingPatchDto"}}},"description":"PublicFundraisingPatchDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFundraisingDto"}}},"description":"Fundraising updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising or origin contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Fundraising","tags":["Fundraisings"],"description":"Partially updates an existing fundraising record. Only the fields provided in the request body will be modified; all other fields remain unchanged.\n\nUpdates do not trigger auto-enrichment. To enrich the fundraising after updating, call `POST /v1/fundraisings/:id/enrich`.\n\n**Origin contact link:** When `originContactId` is included in the patch, the referenced contact must exist in the caller's organization (404 otherwise). The fundraising's `name` and `image` are re-synced to the contact's `name` and `photo_url` — a `name` field sent in the same patch is ignored. When the contact has no `photo_url`, the existing fundraising image is preserved.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicFundraisingController.deleteDeal","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Fundraising deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Fundraising","tags":["Fundraisings"],"description":"Permanently removes a fundraising record from the system.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/interactions":{"get":{"operationId":"PublicFundraisingController.getFundraisingInteractions","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityInteractionsDto"}}},"description":"Past + upcoming interactions for the fundraising"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Fundraising Interactions","tags":["Fundraisings"],"description":"Return past email and calendar event interactions for a fundraising opportunity (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). Domain(s) resolve from the opportunity's company; contact-origin opportunities fall back to the origin contact's emails.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/relations":{"get":{"operationId":"PublicFundraisingController.getFundraisingRelations","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityRelationsDto"}}},"description":"Aggregated relations for the fundraising"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Fundraising Relations","tags":["Fundraisings"],"description":"Return aggregated relationships (one row per unique participant) for a fundraising opportunity.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings":{"get":{"operationId":"PublicFundraisingController.getFundraising","parameters":[{"in":"query","name":"stages","schema":{"items":{"type":"string"},"type":"array","default":[],"description":"Filter by stage IDs. Stage IDs can be found in GET /v1/fundraisings/stages endpoint.\n\n**Note:** To provide multiple values, repeat the parameter in query: `?stages=value1&stages=value2`"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllFundraisingDto"}}},"description":"List of fundraisings matching the search criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Fundraisings","tags":["Fundraisings"],"description":"Returns **fundraisings** based on search criteria, with filtering, sorting, and pagination.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicFundraisingController.createFundraising","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFundraisingCreateDto"}}},"description":"PublicFundraisingCreateDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFundraisingDto"}}},"description":"Fundraising created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Origin contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Fundraising","tags":["Fundraisings"],"description":"Creates a new fundraising record in the specified stage. The fundraising will be associated with the authenticated organization.\n\n**Auto-Enrichment:** To enable automatic company data enrichment, provide a valid company website URL in the `fields.website` field. When a valid URL is supplied, the system will automatically populate additional company information.\n\n**Origin contact link:** When `originContactId` is provided, the referenced contact must already exist in the caller's organization (request fails with 404 otherwise). The fundraising's `name` and `image` are set from the contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default fundraising image when the contact has no `photo_url`.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/lists":{"get":{"operationId":"PublicContactListsController.getLists","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllListsDto"}}},"description":"Lists and folder structure"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get folders and lists structure","tags":["Contacts"],"description":"Returns the full folder and list hierarchy. Each item has a `type` field: if `type` is `FOLDER`, the item contains `folderId`, `folderName` and `inside` (an array of nested items). If `type` is `LIST`, the item contains `listId` and `listName`.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicContactListsController.createList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateContactListDto"}}},"description":"PublicCreateContactListDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicListDto"}}},"description":"Contact list created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Contact List","tags":["Contacts"],"description":"Creates a new **contact list** at the root of the authenticated organization.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/lists/{listId}":{"patch":{"operationId":"PublicContactListsController.updateList","parameters":[{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateContactListDto"}}},"description":"PublicUpdateContactListDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicListDto"}}},"description":"Contact list updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Contact List","tags":["Contacts"],"description":"Renames a list and/or moves it into a folder. Pass `folderId: null` to move the list to the root. Omit a field to leave it unchanged.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicContactListsController.deleteList","parameters":[{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Contact list deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Contact List","tags":["Contacts"],"description":"Permanently removes a **contact list**. Contacts in the list are deleted. The default \"All Contacts\" list cannot be deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/folders":{"post":{"operationId":"PublicContactListsController.createFolder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateContactFolderDto"}}},"description":"PublicCreateContactFolderDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicListDto"}}},"description":"Contact folder created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Contact Folder","tags":["Contacts"],"description":"Creates a new **folder** for organizing contact lists. Pass `parentFolderId` to nest the new folder inside an existing folder.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/folders/{folderId}":{"patch":{"operationId":"PublicContactListsController.updateFolder","parameters":[{"in":"path","name":"folderId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateContactFolderDto"}}},"description":"PublicUpdateContactFolderDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicListDto"}}},"description":"Contact folder updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact folder not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Contact Folder","tags":["Contacts"],"description":"Renames a folder and/or nests it inside another folder. Pass `parentFolderId: null` to move the folder to the root. Omit a field to leave it unchanged.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicContactListsController.deleteFolder","parameters":[{"in":"path","name":"folderId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Contact folder deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact folder not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Contact Folder","tags":["Contacts"],"description":"Deletes a **folder**. Lists and sub-folders inside it are moved to the root; their contacts are not deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/custom-fields":{"get":{"operationId":"PublicContactsController.getCustomFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldsDto"}}},"description":"Schema of custom fields for contact"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Contact Custom Fields","tags":["Contacts"],"description":"Returns the schema of all custom fields configured for the Contact entity. Custom fields allow organizations to extend the default contact data model with additional attributes.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts":{"get":{"operationId":"PublicContactsController.getContacts","parameters":[{"in":"query","name":"listIds","schema":{"items":{"type":"string"},"type":"array","maxItems":20,"description":"Filter to contacts in these lists. Pass as repeated query params (e.g. `?listIds=abc&listIds=def`). If omitted, contacts are returned across all lists and folders the caller has access to."}},{"in":"query","name":"currentCompany","schema":{"type":"string","description":"Filter to contacts whose CURRENT employer matches this company name (case-insensitive, partial match). Matches headlineCompany and current jobs (jobs with no ended_on); does not match past employers or note mentions."}},{"in":"query","name":"titles","schema":{"items":{"type":"string"},"type":"array","maxItems":10,"description":"Filter to contacts whose current title matches ANY of these values (case-insensitive, partial match). Pass as repeated query params (e.g. `?titles=CEO&titles=CFO`)."}},{"in":"query","name":"tagsAny","schema":{"items":{"type":"string"},"type":"array","maxItems":10,"description":"Filter to contacts where ANY of these tags/industries appear (case-insensitive, matches tags, industry, or headline). Pass as repeated query params (e.g. `?tagsAny=technology&tagsAny=software`)."}},{"in":"query","name":"locationCity","schema":{"type":"string","description":"Filter to contacts whose structured work-location or home-location city matches this value (case-insensitive, partial match)."}},{"in":"query","name":"locationCountry","schema":{"type":"string","description":"Filter to contacts whose structured work-location or home-location country matches this value (case-insensitive, partial match)."}},{"in":"query","name":"queryTerms","schema":{"items":{"type":"string"},"type":"array","maxItems":5,"description":"OR-logic alternative to `search`: contacts matching ANY term are returned. Pass as repeated query params (e.g. `?queryTerms=investment+banking&queryTerms=M%26A`). When set, `search` is ignored."}},{"in":"query","name":"folderIds","schema":{"items":{"type":"string"},"type":"array","maxItems":20,"description":"Filter to contacts belonging to any of these folder IDs. Pass as repeated query params (e.g. `?folderIds=abc&folderIds=def`). Can be combined with `listIds`. If omitted, contacts are returned across all lists and folders the caller has access to."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllContactsDto"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Contacts","tags":["Contacts"],"description":"Return **contacts** based on search criteria.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicContactsController.createContact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateContactDto"}}},"description":"PublicCreateContactDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactDto"}}},"description":"Contact created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"List not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Contact","tags":["Contacts"],"description":"Creates a new contact in the specified list. If contact information such as emails or social URLs (e.g. LinkedIn) are provided, an automatic enrichment check will be triggered to populate additional contact details from external data sources.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/fields":{"get":{"operationId":"PublicContactsController.getAllContactFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEntityFieldsDto"}}},"description":"All available contact fields"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Contact Fields","tags":["Contacts"],"description":"Returns all available contact fields, both **standard** built-in fields and **custom** user-defined fields. Use the returned `fieldId` values in filter and aggregation endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}":{"get":{"operationId":"PublicContactsController.getContactById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactDto"}}},"description":"Contact found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Contact by ID","tags":["Contacts"],"description":"Returns a single **contact** by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicContactsController.updateContact","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateContactDto"}}},"description":"PublicUpdateContactDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactDto"}}},"description":"Contact updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Contact","tags":["Contacts"],"description":"Partially updates a contact by its unique identifier. Only provided fields are modified. **Note:** `jobs`, `location`, and `homeLocation` are fully replaced when provided. `socialLinks` is partially updated — only the provided sub-fields are overwritten.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicContactsController.deleteContact","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Contact deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Contact","tags":["Contacts"],"description":"Permanently removes a contact by its unique identifier.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}/interactions":{"get":{"operationId":"PublicContactsController.getContactInteractions","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityInteractionsDto"}}},"description":"Past + upcoming interactions for the contact"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Contact Interactions","tags":["Contacts"],"description":"Return past email and calendar event interactions with a single contact (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). The contact's known emails on the record are used as the participant filter.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/custom-fields/add":{"post":{"operationId":"PublicContactsController.addCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateContactCustomFieldDto"}}},"description":"PublicCreateContactCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Custom Field","tags":["Contacts"],"description":"Adds a new **custom field** to the contact schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/custom-fields/{fieldId}":{"patch":{"operationId":"PublicContactsController.updateCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateContactCustomFieldDto"}}},"description":"PublicUpdateContactCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Custom Field","tags":["Contacts"],"description":"Partially updates an existing **custom field** in the contact schema. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/custom-fields/{fieldId}/reorder":{"patch":{"operationId":"PublicContactsController.reorderCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderCustomFieldDto"}}},"description":"PublicReorderCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Custom Field","tags":["Contacts"],"description":"Changes the position of a field in the contact field list. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/custom-fields/delete":{"delete":{"operationId":"PublicContactsController.deleteCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteCustomFieldDto"}}},"description":"PublicDeleteCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Custom Field","tags":["Contacts"],"description":"Deletes an existing **custom field** from the contact schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}/photo":{"post":{"operationId":"PublicContactsController.uploadContactPhoto","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Photo uploaded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Contact Photo","tags":["Contacts"],"description":"Uploads a photo for a contact. Send the file as `multipart/form-data` with the field name `file`. Replaces any existing photo.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The photo file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicContactsController.deleteContactPhoto","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Photo deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Contact Photo","tags":["Contacts"],"description":"Removes the photo from a contact.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}/lists/{listId}":{"delete":{"operationId":"PublicContactsController.removeContactFromList","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Contact removed from list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Remove Contact from List","tags":["Contacts"],"description":"Removes a contact from the specified list only. The contact remains in other lists it belongs to. To permanently delete a contact from all lists, use `DELETE /v1/contacts/:id` instead.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicContactsController.addContactToList","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Contact added to the list"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact or list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Contact to List","tags":["Contacts"],"description":"Adds an existing contact to the specified list. The contact also remains in any other lists it already belongs to. Use `POST /v1/contacts` (with `listId`) to create a brand-new contact.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/custom-fields":{"get":{"operationId":"PublicInvestorsController.getCustomFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldsDto"}}},"description":"Schema of custom fields for investors"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Custom Fields","tags":["Investors"],"description":"**Custom fields** allow users to store additional information","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/fields":{"get":{"operationId":"PublicInvestorsController.getAllInvestorFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEntityFieldsDto"}}},"description":"All available investor fields"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Investor Fields","tags":["Investors"],"description":"Returns all available investor fields, both **standard** built-in fields and **custom** user-defined fields. Use the returned `fieldId` values in filter and aggregation endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/aggregate":{"post":{"operationId":"PublicInvestorsController.aggregateInvestors","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateRequestDto"}}},"description":"PublicAggregateRequestDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateResponseDto"}}},"description":"Aggregation results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Aggregate Investors","tags":["Investors"],"description":"Groups investors by a field and returns counts per group. Supports filtering before aggregation.\n\nUse the **List Investor Fields** endpoint to discover valid field IDs for `group_by` and `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/custom-fields/add":{"post":{"operationId":"PublicInvestorsController.addCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateCustomFieldDto"}}},"description":"PublicCreateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Custom Field","tags":["Investors"],"description":"Adds a new **custom field** to the investor schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/custom-fields/{fieldId}":{"patch":{"operationId":"PublicInvestorsController.updateCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateCustomFieldDto"}}},"description":"PublicUpdateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Custom Field","tags":["Investors"],"description":"Partially updates an existing **custom field** in the investor schema. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/custom-fields/{fieldId}/reorder":{"patch":{"operationId":"PublicInvestorsController.reorderCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderCustomFieldDto"}}},"description":"PublicReorderCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Custom Field","tags":["Investors"],"description":"Changes the position of a field in the investor field list. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/custom-fields/delete":{"delete":{"operationId":"PublicInvestorsController.deleteCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteCustomFieldDto"}}},"description":"PublicDeleteCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Custom Field","tags":["Investors"],"description":"Deletes an existing **custom field** from the investor schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/enrich":{"post":{"operationId":"PublicInvestorsController.enrichInvestor","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{}},"description":"Successful response"},"202":{"description":"Enrichment queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Read-only API key cannot trigger enrichment"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Enrich Investor","tags":["Investors"],"description":"Triggers asynchronous enrichment for an existing **investor**. The system fetches company data (firmographics, employees, location) from the investor's website and backfills configured fields. Enrichment runs asynchronously; poll `GET /v1/investors/:id` to retrieve enriched data once processing completes.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}":{"get":{"operationId":"PublicInvestorsController.getInvestorById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvestorDto"}}},"description":"Investor found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Investor by ID","tags":["Investors"],"description":"Returns a single **investor** by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicInvestorsController.updateInvestor","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvestorPatchDto"}}},"description":"PublicInvestorPatchDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvestorDto"}}},"description":"Investor updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor or origin contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Investor","tags":["Investors"],"description":"Updates an existing **investors** in the system.\n\nUpdates do not trigger auto-enrichment. To enrich the investor after updating, call `POST /v1/investors/:id/enrich`.\n\n**Origin contact link:** When `originContactId` is included in the patch, the referenced contact must exist in the caller's organization (404 otherwise). The investor's `name` and `image` are re-synced to the contact's `name` and `photo_url` — a `name` field sent in the same patch is ignored. When the contact has no `photo_url`, the existing investor image is preserved.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicInvestorsController.deleteInvestor","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Investor","tags":["Investors"],"description":"Deletes an existing **investors** from the system.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/interactions":{"get":{"operationId":"PublicInvestorsController.getInvestorInteractions","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityInteractionsDto"}}},"description":"Past + upcoming interactions for the investor"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Investor Interactions","tags":["Investors"],"description":"Return past email and calendar event interactions for an investor (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). Domain(s) resolve from the investor's company; contact-origin investors fall back to the origin contact's emails.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/relations":{"get":{"operationId":"PublicInvestorsController.getInvestorRelations","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityRelationsDto"}}},"description":"Aggregated relations for the investor"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Investor Relations","tags":["Investors"],"description":"Return aggregated relationships (one row per unique participant) for an investor.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors":{"get":{"operationId":"PublicInvestorsController.getInvestors","parameters":[{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllInvestorsDto"}}},"description":"List of investors matching the search criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Investors","tags":["Investors"],"description":"Returns **investors** based on search criteria, with filtering, sorting, and pagination.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicInvestorsController.createInvestor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvestorCreateDto"}}},"description":"PublicInvestorCreateDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvestorDto"}}},"description":"Investor created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Origin contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Investor","tags":["Investors"],"description":"Creates a new **investors** in the system.\n\n**Auto-Enrichment:** To enable automatic company data enrichment, provide a valid company website URL in the `fields.website` field. When a valid URL is supplied, the system will automatically populate additional company information.\n\n**Origin contact link:** When `originContactId` is provided, the referenced contact must already exist in the caller's organization (request fails with 404 otherwise). The investor's `name` and `image` are set from the contact's `name` and `photo_url`; any `name` sent in the same request is ignored. Image falls back to the default investor image when the contact has no `photo_url`.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/search":{"post":{"operationId":"PublicInvestorsController.searchInvestors","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSearchInvestorsDto"}}},"description":"PublicSearchInvestorsDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllInvestorsDto"}}},"description":"Matching investors"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Search Investors with Structured Filters","tags":["Investors"],"description":"Returns **investors** matching the structured filters in the request body. Use this endpoint when you need to filter by custom field values, ranges, or other field-level criteria that cannot be expressed in the simple `GET /v1/investors` query.\n\nUse the **List Investor Fields** endpoint to discover valid `field_id` values for `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/notes/folders":{"get":{"operationId":"PublicNotesController.getFolders","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllNoteFoldersDto"}}},"description":"List of note folders"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Note Folders","tags":["Notes"],"description":"Returns all **note folders** accessible to the authenticated user.","security":[{"ApiKeyAuth":[]}]}},"/v1/notes":{"get":{"operationId":"PublicNotesController.getNotes","parameters":[{"in":"query","name":"folderId","schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Filter notes by folder ID."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllNotesDto"}}},"description":"List of notes matching the search criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Notes","tags":["Notes"],"description":"Returns **notes** based on search criteria, with optional folder filtering and pagination.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicNotesController.createNote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateNoteDto"}}},"description":"PublicCreateNoteDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNoteDto"}}},"description":"Note created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Note","tags":["Notes"],"description":"Creates a new **note** with the specified title, optional text content, and optional folder assignment.","security":[{"ApiKeyAuth":[]}]}},"/v1/notes/by-domain":{"get":{"operationId":"PublicNotesController.getNotesByDomain","parameters":[{"in":"query","name":"domain","required":true,"schema":{"minLength":1,"type":"string","description":"Company domain or full URL (e.g. \"acme.com\", \"www.acme.com\", or \"https://acme.com/about\"). URLs are normalized to the registrable domain. Aggregates notes linked to any entity at this domain."}},{"in":"query","name":"entityTypes","required":false,"schema":{"items":{"enum":["Company","Deal","Fundraising","Investor","Contact"],"type":"string"},"type":"array","maxItems":5,"description":"Restrict aggregation to notes linked via specific entity types. Defaults to all five."}},{"in":"query","name":"limit","required":false,"schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","required":false,"schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewNotesByDomainDto"}}},"description":"List of notes aggregated by domain"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Notes by Company Domain","tags":["Notes"],"description":"Returns **notes** related to a company domain, aggregated across notes linked to the company itself, its deals, investors, fundraising opportunities, and contacts at that domain. Each note is tagged with `originEntityType` indicating which linkage caused it to be included. Use `entityTypes` to restrict the aggregation; defaults to all five. The `domain` query parameter accepts either a bare domain or a full URL; URLs are normalized to the registrable domain before matching.","security":[{"ApiKeyAuth":[]}]}},"/v1/notes/{id}":{"get":{"operationId":"PublicNotesController.getNoteById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNoteDto"}}},"description":"Note found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Note by ID","tags":["Notes"],"description":"Returns a single **note** by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicNotesController.updateNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateNoteDto"}}},"description":"PublicUpdateNoteDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNoteDto"}}},"description":"Note updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Note","tags":["Notes"],"description":"Partially updates an existing **note**. Only the fields provided in the request body will be modified; all other fields remain unchanged.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicNotesController.deleteNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Note","tags":["Notes"],"description":"Permanently removes a **note** from the system.","security":[{"ApiKeyAuth":[]}]}},"/v1/email-campaigns":{"get":{"operationId":"PublicEmailCampaignController.listCampaigns","parameters":[{"in":"query","name":"status","schema":{"enum":["draft","scheduled","sending","sent","failed"],"type":"string","description":"Filter by campaign status (draft, scheduled, sending, sent, failed)."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignListDto"}}},"description":"List of email campaigns"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Email Campaigns","tags":["Email Campaigns"],"description":"Returns a paginated list of email campaigns for the organization, optionally filtered by status.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicEmailCampaignController.createCampaign","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateEmailCampaignDto"}}},"description":"PublicCreateEmailCampaignDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignDetailDto"}}},"description":"Created campaign"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"}},"summary":"Create Email Campaign","tags":["Email Campaigns"],"description":"Creates a draft email campaign. The campaign is not sent — sending is done manually from the app.","security":[{"ApiKeyAuth":[]}]}},"/v1/email-campaigns/{id}":{"get":{"operationId":"PublicEmailCampaignController.getCampaign","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignDetailDto"}}},"description":"Email campaign detail"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Campaign not found"}},"summary":"Get Email Campaign","tags":["Email Campaigns"],"description":"Returns full campaign details including HTML content, recipients, and the available merge variables.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicEmailCampaignController.updateCampaign","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateEmailCampaignDto"}}},"description":"PublicUpdateEmailCampaignDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignDetailDto"}}},"description":"Updated campaign"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or campaign not editable"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"}},"summary":"Update Email Campaign","tags":["Email Campaigns"],"description":"Updates a draft/failed campaign. A sent campaign may only be renamed. Does not send the campaign.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicEmailCampaignController.deleteCampaign","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{}},"description":"Successful response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Campaign not found"}},"summary":"Delete Email Campaign","tags":["Email Campaigns"],"description":"Deletes a campaign of any status. Scheduled campaigns are cancelled on SendGrid before deletion.","security":[{"ApiKeyAuth":[]}]}},"/v1/email-campaigns/{id}/attachments":{"post":{"operationId":"PublicEmailCampaignAttachmentController.uploadAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignDetailDto"}}},"description":"Attachment uploaded"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Missing file, too large, or campaign not editable"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Campaign not found"}},"summary":"Upload Email Campaign Attachment","tags":["Email Campaigns"],"description":"Uploads a file attachment to a draft/failed email campaign. Send the file as `multipart/form-data` with the field name `file`. Returns the updated campaign.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to attach"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicEmailCampaignAttachmentController.deleteAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"s3Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailCampaignDetailDto"}}},"description":"Attachment removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Campaign or attachment not found"}},"summary":"Delete Email Campaign Attachment","tags":["Email Campaigns"],"description":"Removes an attachment (identified by its `s3Key`, as returned in the campaign detail) from a draft/failed campaign and deletes the stored file. Returns the updated campaign.","security":[{"ApiKeyAuth":[]}]}},"/v1/notes/{noteId}/attachments":{"post":{"operationId":"PublicNoteAttachmentController.uploadNoteAttachment","parameters":[{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNoteAttachmentDto"}}},"description":"File uploaded successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or missing file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Upload Attachment to Note","tags":["Note Attachments"],"description":"Uploads a file attachment to a note. Send the file as `multipart/form-data` with the field name `file`. Returns the saved attachment metadata.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload"}},"required":["file"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/notes/{noteId}/attachments/{fileId}":{"delete":{"operationId":"PublicNoteAttachmentController.deleteNoteAttachment","parameters":[{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"File deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Attachment from Note","tags":["Note Attachments"],"description":"Removes a file attachment from a note. The file is also deleted from storage.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/notes":{"get":{"operationId":"PublicDealLinkingController.getLinkedNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkedNotesDto"}}},"description":"List of notes linked to the deal"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Linked Notes","tags":["Deals-Linking"],"description":"Returns all **notes** linked to the specified deal.","security":[{"ApiKeyAuth":[]}]}},"/v1/deals/{id}/notes/{noteId}":{"post":{"operationId":"PublicDealLinkingController.linkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note linked to deal successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or linking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Link Note to Deal","tags":["Deals-Linking"],"description":"Establishes a link between an existing **note** and a **deal**. No request body is needed.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicDealLinkingController.unlinkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note unlinked from deal successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or unlinking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Deal or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Unlink Note from Deal","tags":["Deals-Linking"],"description":"Removes the link between a **note** and a **deal**. The note itself is not deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/notes":{"get":{"operationId":"PublicInvestorLinkingController.getLinkedNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkedNotesDto"}}},"description":"List of notes linked to the investor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Linked Notes","tags":["Investors-Linking"],"description":"Returns all **notes** linked to the specified investor.","security":[{"ApiKeyAuth":[]}]}},"/v1/investors/{id}/notes/{noteId}":{"post":{"operationId":"PublicInvestorLinkingController.linkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note linked to investor successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or linking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Link Note to Investor","tags":["Investors-Linking"],"description":"Establishes a link between an existing **note** and an **investor**. No request body is needed.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicInvestorLinkingController.unlinkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note unlinked from investor successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or unlinking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Investor or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Unlink Note from Investor","tags":["Investors-Linking"],"description":"Removes the link between a **note** and an **investor**. The note itself is not deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/notes":{"get":{"operationId":"PublicFundraisingLinkingController.getLinkedNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkedNotesDto"}}},"description":"List of notes linked to the fundraising"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Linked Notes","tags":["Fundraisings-Linking"],"description":"Returns all **notes** linked to the specified fundraising.","security":[{"ApiKeyAuth":[]}]}},"/v1/fundraisings/{id}/notes/{noteId}":{"post":{"operationId":"PublicFundraisingLinkingController.linkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note linked to fundraising successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or linking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Link Note to Fundraising","tags":["Fundraisings-Linking"],"description":"Establishes a link between an existing **note** and a **fundraising**. No request body is needed.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicFundraisingLinkingController.unlinkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note unlinked from fundraising successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or unlinking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Fundraising or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Unlink Note from Fundraising","tags":["Fundraisings-Linking"],"description":"Removes the link between a **note** and a **fundraising**. The note itself is not deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}/notes":{"get":{"operationId":"PublicContactLinkingController.getLinkedNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkedNotesDto"}}},"description":"List of notes linked to the contact"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Linked Notes","tags":["Contacts-Linking"],"description":"Returns all **notes** linked to the specified contact.","security":[{"ApiKeyAuth":[]}]}},"/v1/contacts/{id}/notes/{noteId}":{"post":{"operationId":"PublicContactLinkingController.linkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note linked to contact successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or linking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Link Note to Contact","tags":["Contacts-Linking"],"description":"Establishes a link between an existing **note** and a **contact**. No request body is needed.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicContactLinkingController.unlinkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note unlinked from contact successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or unlinking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Contact or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Unlink Note from Contact","tags":["Contacts-Linking"],"description":"Removes the link between a **note** and a **contact**. The note itself is not deleted.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/notes":{"get":{"operationId":"PublicCompanyLinkingController.getLinkedNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkedNotesDto"}}},"description":"List of notes linked to the company"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Linked Notes","tags":["Companies-Linking"],"description":"Returns all **notes** linked to the specified company. The `:id` path parameter accepts either a platform company ID (Mongo ObjectId) or a company domain (e.g. `acme.com`).","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/notes/{noteId}":{"post":{"operationId":"PublicCompanyLinkingController.linkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note linked to company successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or linking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Link Note to Company","tags":["Companies-Linking"],"description":"Establishes a link between an existing **note** and a **company**. The `:id` path parameter accepts either a platform company ID (Mongo ObjectId) or a company domain (e.g. `acme.com`); if the domain does not match a platform company, it is resolved via Apollo/Clearbit and stored as a preview-only link. No request body is needed.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicCompanyLinkingController.unlinkNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Note unlinked from company successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or unlinking failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or note not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Unlink Note from Company","tags":["Companies-Linking"],"description":"Removes the link between a **note** and a **company**. The note itself is not deleted. The `:id` path parameter accepts either a platform company ID (Mongo ObjectId) or a company domain (e.g. `acme.com`).","security":[{"ApiKeyAuth":[]}]}},"/v1/organization":{"get":{"operationId":"PublicOrganizationConfigurationController.getOrganization","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOrganizationDto"}}},"description":"Organization details"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Organization","tags":["Organization Configuration"],"description":"Returns details of the organization the API key is scoped to. Useful for confirming which client/tenant a key operates on.","security":[{"ApiKeyAuth":[]}]}},"/v1/me":{"get":{"operationId":"PublicOrganizationConfigurationController.getCurrentUser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCurrentUserDto"}}},"description":"Current user and tenant"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Current User","tags":["Organization Configuration"],"description":"Returns the current user and tenant the API key is operating as (name, email, organization). Useful for confirming identity during onboarding and testing.","security":[{"ApiKeyAuth":[]}]}},"/v1/organization/users":{"get":{"operationId":"PublicOrganizationConfigurationController.getUsers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllUsersDto"}}},"description":"List of users"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Users","tags":["Organization Configuration"],"description":"Returns a list of users in the organization associated with the API key.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicOrganizationConfigurationController.addUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddUserDto"}}},"description":"PublicAddUserDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUserDto"}}},"description":"User created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add User","tags":["Organization Configuration"],"description":"Creates a new user in the organization associated with the API key.","security":[{"ApiKeyAuth":[]}]}},"/v1/organization/teams":{"get":{"operationId":"PublicOrganizationConfigurationController.getTeams","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllTeamsDto"}}},"description":"List of teams"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Teams","tags":["Organization Configuration"],"description":"Returns a list of teams in the organization associated with the API key.","security":[{"ApiKeyAuth":[]}]}},"/v1/organization/users/{userId}/status":{"post":{"operationId":"PublicOrganizationConfigurationController.changeUserStatus","parameters":[{"in":"path","name":"userId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChangeUserStatusDto"}}},"description":"PublicChangeUserStatusDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Status changed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Change User Status","tags":["Organization Configuration"],"description":"Changes the status of a user (ACTIVE or BLOCKED).","security":[{"ApiKeyAuth":[]}]}},"/v1/organization/users/{userId}/role":{"post":{"operationId":"PublicOrganizationConfigurationController.changeUserRole","parameters":[{"in":"path","name":"userId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChangeUserRoleDto"}}},"description":"PublicChangeUserRoleDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Role changed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Change User Role","tags":["Organization Configuration"],"description":"Changes the company role of a user.","security":[{"ApiKeyAuth":[]}]}},"/v1/organization/modules/{module}":{"post":{"operationId":"PublicOrganizationConfigurationController.toggleModule","parameters":[{"in":"path","name":"module","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicToggleModuleDto"}}},"description":"PublicToggleModuleDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Module toggled successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid module name or request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Toggle Module","tags":["Organization Configuration"],"description":"Enables or disables an organization module. Available modules: `deals`, `fundraising`, `investors`, `fees`, `themes`, `companies`, `contacts`.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/custom-fields":{"get":{"operationId":"PublicCompanyMetadataController.getCustomFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldsDto"}}},"description":"Schema of custom fields for companies"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Custom Fields","tags":["Companies"],"description":"**Custom fields** allow users to store additional information on companies.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/custom-fields/add":{"post":{"operationId":"PublicCompanyMetadataController.addCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateCustomFieldDto"}}},"description":"PublicCreateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Custom Field","tags":["Companies"],"description":"Adds a new **custom field** to the company schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/custom-fields/{fieldId}":{"patch":{"operationId":"PublicCompanyMetadataController.updateCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateCustomFieldDto"}}},"description":"PublicUpdateCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomFieldDto"}}},"description":"Custom field updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Custom Field","tags":["Companies"],"description":"Partially updates an existing **custom field** in the company schema. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/custom-fields/{fieldId}/reorder":{"patch":{"operationId":"PublicCompanyMetadataController.reorderCustomField","parameters":[{"in":"path","name":"fieldId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReorderCustomFieldDto"}}},"description":"PublicReorderCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field reordered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Reorder Custom Field","tags":["Companies"],"description":"Changes the position of a field in the company field list. Provide either `direction` (\"up\"/\"down\") to move one step, or an explicit zero-based `position`.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/custom-fields/delete":{"delete":{"operationId":"PublicCompanyMetadataController.deleteCustomField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeleteCustomFieldDto"}}},"description":"PublicDeleteCustomFieldDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Custom field deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Custom Field","tags":["Companies"],"description":"Deletes an existing **custom field** from the company schema.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/lists":{"get":{"operationId":"PublicCompanyMetadataController.getCompanyLists","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllCompanyListsDto"}}},"description":"List of company lists"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Company Lists","tags":["Companies"],"description":"Returns all available **company lists** for the authenticated organization.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicCompanyMetadataController.createCompanyList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateCompanyListDto"}}},"description":"PublicCreateCompanyListDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyListDto"}}},"description":"Company list created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Company List","tags":["Companies"],"description":"Creates a new **company list** for the authenticated organization.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/lists/{listId}":{"patch":{"operationId":"PublicCompanyMetadataController.updateCompanyList","parameters":[{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateCompanyListDto"}}},"description":"PublicUpdateCompanyListDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyListDto"}}},"description":"Company list updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Company List","tags":["Companies"],"description":"Updates an existing **company list**. Only the fields provided in the request body will be modified.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicCompanyMetadataController.deleteCompanyList","parameters":[{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Company list deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Company List","tags":["Companies"],"description":"Permanently removes a **company list**. Companies in the list are not deleted, but their association with this list is removed.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/fields":{"get":{"operationId":"PublicCompanyController.getAllCompanyFields","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEntityFieldsDto"}}},"description":"All available company fields"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Company Fields","tags":["Companies"],"description":"Returns all available company fields, both **standard** built-in fields and **custom** user-defined fields. Use the returned `fieldId` values in filter and aggregation endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies":{"get":{"operationId":"PublicCompanyController.getCompanies","parameters":[{"in":"query","name":"listId","schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string","description":"Filter companies by list ID."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllCompaniesDto"}}},"description":"List of companies matching the search criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Companies","tags":["Companies"],"description":"Return **companies** based on search criteria, with filtering, sorting, and pagination.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicCompanyController.createCompany","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyCreateDto"}}},"description":"PublicCompanyCreateDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyDto"}}},"description":"Company created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Company","tags":["Companies"],"description":"Creates a new company in the system. The company will be associated with the authenticated organization.\n\n**Auto-Enrichment:** To enable automatic company data enrichment, provide a valid company website URL in the `website` field. When a valid URL is supplied, the system will automatically populate additional company information.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/search":{"post":{"operationId":"PublicCompanyController.searchCompanies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSearchCompaniesDto"}}},"description":"PublicSearchCompaniesDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllCompaniesDto"}}},"description":"Matching companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Search Companies with Structured Filters","tags":["Companies"],"description":"Returns **companies** matching the structured filters in the request body. Use this endpoint when you need to filter by custom field values, ranges, or other field-level criteria that cannot be expressed in the simple `GET /v1/companies` query.\n\nUse the **List Company Fields** endpoint to discover valid `field_id` values for `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/aggregate":{"post":{"operationId":"PublicCompanyController.aggregateCompanies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateRequestDto"}}},"description":"PublicAggregateRequestDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateResponseDto"}}},"description":"Aggregation results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Aggregate Companies","tags":["Companies"],"description":"Groups companies by one or more fields and returns counts per group. Supports filtering before aggregation.\n\nUse the **List Company Fields** endpoint to discover valid field IDs for `group_by` and `filters`.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}":{"get":{"operationId":"PublicCompanyController.getCompanyById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyDto"}}},"description":"Company found"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Company by ID","tags":["Companies"],"description":"Returns a single **company** by its unique identifier.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicCompanyController.updateCompany","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyPatchDto"}}},"description":"PublicCompanyPatchDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyDto"}}},"description":"Company updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Company","tags":["Companies"],"description":"Partially updates an existing company. Only the fields provided in the request body will be modified; all other fields remain unchanged.\n\nUpdates do not trigger auto-enrichment. To enrich the company after updating, call `POST /v1/companies/:id/enrich`.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicCompanyController.deleteCompany","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Company deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Company","tags":["Companies"],"description":"Permanently removes a company from the system.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/interactions":{"get":{"operationId":"PublicCompanyController.getCompanyInteractions","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityInteractionsDto"}}},"description":"Past + upcoming interactions for the company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Company Interactions","tags":["Companies"],"description":"Return past email and calendar event interactions between your organization and contacts at the company (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). Domain(s) are resolved from the company record and expanded to any aliases linked in this organization; private email providers are filtered out.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/relations":{"get":{"operationId":"PublicCompanyController.getCompanyRelations","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllEntityRelationsDto"}}},"description":"Aggregated relations for the company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Company Relations","tags":["Companies"],"description":"Return aggregated relationships (one row per unique participant) with contacts at the company.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/enrich":{"post":{"operationId":"PublicCompanyController.enrichCompany","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{}},"description":"Successful response"},"202":{"description":"Enrichment queued; no body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Read-only API key cannot trigger enrichment"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Enrich Company","tags":["Companies"],"description":"Queues asynchronous enrichment for an existing **company**. The system fetches company data (firmographics, employees, location) from the company's website and backfills configured fields. Returns 202 Accepted with no body; poll `GET /v1/companies/:id` to retrieve enriched data once processing completes.","security":[{"ApiKeyAuth":[]}]}},"/v1/companies/{id}/lists/{listId}":{"post":{"operationId":"PublicCompanyController.addCompanyToList","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyDto"}}},"description":"Company added to list"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Company to List","tags":["Companies"],"description":"Adds a **company** to the specified **list**.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicCompanyController.removeCompanyFromList","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"listId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCompanyDto"}}},"description":"Company removed from list"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Company or list not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Remove Company from List","tags":["Companies"],"description":"Removes a **company** from the specified **list**.","security":[{"ApiKeyAuth":[]}]}},"/v1/themes":{"get":{"operationId":"PublicThemesController.getThemes","parameters":[{"in":"query","name":"search","schema":{"type":"string","default":null,"description":"Search query string to filter results."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllThemesDto"}}},"description":"List of themes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Themes","tags":["Themes"],"description":"Returns all themes for the organization.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicThemesController.createTheme","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateThemeDto"}}},"description":"PublicCreateThemeDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicThemeDto"}}},"description":"Theme created or existing theme returned"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Theme","tags":["Themes"],"description":"Creates a new theme. If a theme with the same name already exists, returns the existing one.","security":[{"ApiKeyAuth":[]}]}},"/v1/themes/{id}/subthemes":{"post":{"operationId":"PublicThemesController.addSubtheme","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddSubthemeDto"}}},"description":"PublicAddSubthemeDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicThemeDto"}}},"description":"Subtheme linked to parent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Parent or subtheme not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Subtheme","tags":["Themes"],"description":"Makes an existing theme a subtheme of the specified parent theme.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicThemesController.removeSubtheme","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRemoveSubthemeDto"}}},"description":"PublicRemoveSubthemeDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicThemeDto"}}},"description":"Subtheme removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Parent or subtheme link not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Remove Subtheme","tags":["Themes"],"description":"Removes a subtheme link from the specified parent theme.","security":[{"ApiKeyAuth":[]}]}},"/v1/themes/{id}/folders":{"get":{"operationId":"PublicThemesController.getThemeFolders","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllThemeFoldersDto"}}},"description":"List of theme folders"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Theme not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Theme Folders","tags":["Themes"],"description":"Returns the folders within a theme, grouped by entity type.","security":[{"ApiKeyAuth":[]}]}},"/v1/themes/{id}/theme-items":{"get":{"operationId":"PublicThemesController.getThemeItems","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"folderId","schema":{"type":"string","description":"Filter items by folder ID."}},{"in":"query","name":"limit","schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllThemeItemsDto"}}},"description":"List of theme items"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Theme not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Theme Items","tags":["Themes"],"description":"Returns all items (contacts, companies, deals, notes) tagged under the specified theme.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicThemesController.createThemeItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateThemeItemDto"}}},"description":"PublicCreateThemeItemDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicThemeItemDto"}}},"description":"Theme item created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Theme or entity not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Add Theme Item","tags":["Themes"],"description":"Links an entity to the specified theme and updates its comments/tags with a theme mention.","security":[{"ApiKeyAuth":[]}]}},"/v1/themes/{id}/theme-items/{itemId}":{"delete":{"operationId":"PublicThemesController.deleteThemeItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"path","name":"itemId","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Theme item deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Theme or item not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Theme Item","tags":["Themes"],"description":"Removes an item from the theme and cleans up the theme mention from the entity's text/comments/tags.","security":[{"ApiKeyAuth":[]}]}},"/v1/interactions":{"get":{"operationId":"PublicInteractionsController.getInteractions","parameters":[{"in":"query","name":"domain","required":true,"schema":{"minLength":1,"type":"string","description":"The domain to search interactions for (e.g. \"acme.com\")."}},{"in":"query","name":"type","required":false,"schema":{"type":"string","enum":["EMAIL","EVENT"],"description":"Filter by interaction type: EMAIL or EVENT."}},{"in":"query","name":"limit","required":false,"schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","required":false,"schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllInteractionsDto"}}},"description":"Past + upcoming interactions for the domain"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Interactions by Domain","tags":["Interactions"],"description":"Return past email and calendar event interactions between your organization and contacts at the specified domain (sorted by date descending), plus the next upcoming calendar event (capped at 1, independent of `limit`). The supplied domain is expanded to any aliases linked to it in this organization, and private email providers are filtered out.","security":[{"ApiKeyAuth":[]}]}},"/v1/people/search":{"get":{"operationId":"PublicPeopleController.searchPeople","parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"string","description":"Free-text query (typically a person's name) used to search public LinkedIn profiles."}},{"in":"query","name":"limit","required":false,"schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","required":false,"schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPeopleSearchResultsDto"}}},"description":"Matching candidates from public sources"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Search people","tags":["People"],"description":"Searches public LinkedIn profiles matching a free-text query (typically a person's name). Returns a lightweight list of candidates. Use `POST /v1/people/enrich` after the end user has selected a single candidate to retrieve full profile data.","security":[{"ApiKeyAuth":[]}]}},"/v1/people/enrich":{"post":{"operationId":"PublicPeopleController.enrichPerson","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEnrichPersonDto"}}},"description":"PublicEnrichPersonDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEnrichedPersonDto"}}},"description":"Enriched profile"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"No profile found for the provided LinkedIn URL"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Enrich person","tags":["People"],"description":"Enriches a single person by LinkedIn URL, returning profile details (name, title, emails, jobs, tags, location). Only invoke this after the end user has selected a specific candidate returned by `GET /v1/people/search`. If a contact with a matching LinkedIn URL or email already exists in the organization, its ID is returned as `existingContactId` so callers can update the existing record instead of creating a duplicate.","security":[{"ApiKeyAuth":[]}]}},"/v1/reports":{"get":{"operationId":"PublicReportsController.listReports","parameters":[{"in":"query","name":"entityType","required":true,"schema":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Required. Entity type to list reports for. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicViewAllReportsDto"}}},"description":"List of reports"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"List Reports","tags":["Reports"],"description":"Returns saved reports the calling user has access to for the given `entityType` (one of `contact`, `deal`, `fundraising`, `investor`, `company`). Each item is a lightweight projection — `id`, `name`, `entityType`, `creatorId`, `createdAt`, `updatedAt`. Call `GET /v1/reports/:id` to fetch `pipelineId`, `columns`, and the full `configuration`. Per-user system reports (recent activity, notes digest) are excluded.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicReportsController.createReport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateReportDto"}}},"description":"PublicCreateReportDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportDto"}}},"description":"Report created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Report","tags":["Reports"],"description":"Creates a new saved report for `contact`, `deal`, `fundraising`, `investor`, or `company` entities. `filters` use the same structured shape as the aggregate endpoints (`field_id`, `operator`, `value`) — use the matching List Fields endpoint to discover valid `field_id` values. For `deal` reports, an optional `pipelineId` scopes the report to a pipeline (defaults to the user's default pipeline).","security":[{"ApiKeyAuth":[]}]}},"/v1/reports/{id}":{"get":{"operationId":"PublicReportsController.getReport","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"entityType","required":true,"schema":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportDto"}}},"description":"Report details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Report","tags":["Reports"],"description":"Returns the full saved report — id, name, entityType, creatorId, createdAt, updatedAt plus pipelineId, the resolved `columns` list, and the raw ag-grid `configuration` (filters, colDef, grouping). Pair with the list endpoint, which returns only metadata.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicReportsController.deleteReport","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"entityType","required":true,"schema":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Report deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Report","tags":["Reports"],"description":"Permanently removes a saved report. Only the report owner (or an org admin) can delete it.","security":[{"ApiKeyAuth":[]}]},"put":{"operationId":"PublicReportsController.updateReport","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"entityType","required":true,"schema":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage. Allowed values: `contact`, `deal`, `fundraising`, `investor`, `company`."}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateReportDto"}}},"description":"PublicUpdateReportDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportDto"}}},"description":"Report updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Report","tags":["Reports"],"description":"Update a saved report's name, filters, group-by, or pipeline scope. Only the report owner (or an org admin) can update it. Omitted fields are left unchanged. Pass an empty array for `filters` or `groupBy` to clear them.","security":[{"ApiKeyAuth":[]}]}},"/v1/reports/{id}/schedule":{"get":{"operationId":"PublicReportsController.getReportSchedule","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportScheduleDto"}}},"description":"Schedule details"},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}},"description":"No schedule configured for this caller"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Scheduling is not supported for this report type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Report Schedule","tags":["Reports"],"description":"Returns the recurring schedule the **caller** has configured for this report, or **204 No Content** if the caller has none. Each user manages their own schedule on a shared report — schedules created by other users are not visible through this endpoint. Only deal reports support scheduling.","security":[{"ApiKeyAuth":[]}]},"post":{"operationId":"PublicReportsController.createReportSchedule","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateReportScheduleDto"}}},"description":"PublicCreateReportScheduleDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportScheduleDto"}}},"description":"Schedule created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or recipient outside tenant"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Create Report Schedule","tags":["Reports"],"description":"Schedule a deal report to be emailed on a recurring basis. Recipients must be active users of the caller's organization — outside emails are rejected. Each user has their own schedule per report: a second call by the same caller is rejected (use the update endpoint), but other users can still create their own schedule on the same shared report. Only deal reports support scheduling.\n\n**RRULE shape:** the in-app schedule editor only renders rules of the form `FREQ=WEEKLY;BYDAY=;BYHOUR=;BYMINUTE=;BYSECOND=0`. Schedules created via this endpoint with other shapes (e.g. FREQ=DAILY or FREQ=MONTHLY) save successfully and fire correctly, but break the editor on next open. Use `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;...` to express a daily cadence.","security":[{"ApiKeyAuth":[]}]},"put":{"operationId":"PublicReportsController.updateReportSchedule","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateReportScheduleDto"}}},"description":"PublicUpdateReportScheduleDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportScheduleDto"}}},"description":"Schedule updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request or recipient outside tenant"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report or schedule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Report Schedule","tags":["Reports"],"description":"Update the **caller's** schedule for this report — RRULE, recipient list, or active flag. Recipients must be active users of the caller's organization. Omitted fields are left unchanged. Returns 404 if the caller has no schedule on the report, even if another user has one.\n\n**RRULE shape:** if you replace `rrule`, keep the editor-compatible form `FREQ=WEEKLY;BYDAY=;BYHOUR=;BYMINUTE=;BYSECOND=0` so the in-app schedule editor can still render the schedule.","security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"PublicReportsController.deleteReportSchedule","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDto"}}},"description":"Schedule deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report or schedule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Delete Report Schedule","tags":["Reports"],"description":"Remove the **caller's** recurring schedule for this report. Does not delete the report itself, and does not affect schedules other users have on the same report. Returns 404 if the caller has no schedule.","security":[{"ApiKeyAuth":[]}]}},"/v1/reports/{id}/data":{"get":{"operationId":"PublicReportsController.getReportData","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"[^\\/#\\?]+?","type":"string"}},{"in":"query","name":"entityType","required":true,"schema":{"type":"string","enum":["contact","deal","fundraising","investor","company"],"minLength":1,"description":"Entity type the report belongs to. Required — used to route the request to the right storage."}},{"in":"query","name":"limit","required":false,"schema":{"maximum":100,"type":"integer","minimum":1,"default":100,"description":"Maximum number of results to return per request."}},{"in":"query","name":"offset","required":false,"schema":{"maximum":1000000,"type":"integer","minimum":0,"default":0,"description":"Number of results to skip for pagination."}},{"in":"query","name":"search","required":false,"schema":{"type":"string","default":null,"description":"Search query string to filter results."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReportDataResponseDto"}}},"description":"Report rows + total count"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Report Data","tags":["Reports"],"description":"Runs a report by ID and returns the matching rows plus a total `count`. The shape of each row depends on the report's `entityType` (deal, contact, fundraising, investor, or company). Supports `offset`/`limit` pagination and an optional `search` overlay for deal, fundraising, investor, and company reports.","security":[{"ApiKeyAuth":[]}]}},"/v1/objects-count":{"get":{"operationId":"PublicObjectsCountController.getObjectsCount","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectsCountResponseDto"}}},"description":"Per-entity counts across the tenant"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Count Objects Across Tenant","tags":["Objects Count"],"description":"Returns the total number of **contacts, deals, fundraisings, investors, and notes** across the organization. Contacts are deduplicated across lists. Use as an onboarding sanity check to verify how many objects loaded for a tenant.","security":[{"ApiKeyAuth":[]}]}},"/v1/objects-count/contacts":{"get":{"operationId":"PublicObjectsCountController.getContactCount","parameters":[{"in":"query","name":"listId","schema":{"type":"string","description":"Count contacts in this list. Mutually exclusive with reportId."}},{"in":"query","name":"reportId","schema":{"type":"string","description":"Count contacts matching this saved contact report. Mutually exclusive with listId."}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCountResponseDto"}}},"description":"Contact count for the list/report"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Neither or both of listId/reportId supplied"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"List or report not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Count Contacts in a List or Report","tags":["Objects Count"],"description":"Returns the **contact count** for a single list (`listId`) or saved contact report (`reportId`) — exactly one is required. The count matches what the front end shows for that list/report regardless of whether those contacts also belong to other lists (no cross-list de-duplication). Discover ids via `GET /v1/contacts/lists` or the reports endpoints.","security":[{"ApiKeyAuth":[]}]}},"/v1/notifications/settings":{"get":{"operationId":"PublicNotificationSettingsController.getSettings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNotificationSettingsDto"}}},"description":"Current notification settings"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Get Notification Settings","tags":["Notifications"],"description":"Returns the calling user's master email switch and per-type email notification toggles.","security":[{"ApiKeyAuth":[]}]},"patch":{"operationId":"PublicNotificationSettingsController.updateSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateNotificationSettingsDto"}}},"description":"PublicUpdateNotificationSettingsDto","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNotificationSettingsDto"}}},"description":"Updated notification settings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizeErrorResponseDto"}}},"description":"Invalid or missing API key"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}},"description":"Internal server error"}},"summary":"Update Notification Settings","tags":["Notifications"],"description":"Sets the calling user's master email switch and/or individual per-type toggles to explicit on/off values. Per-type changes require the master switch to be on (already on, or set on in the same request), otherwise the request is rejected. Returns the updated settings.","security":[{"ApiKeyAuth":[]}]}}},"servers":[{"url":"https://crm-public-api.app.carta.com","description":"API server"}],"tags":[{"name":"Deals","description":"A **deal** represents the process of acquiring a company. Every deal on the platform belongs to a **pipeline** and is associated with a specific **stage** within that pipeline. The Deal entity supports configurable **custom fields**."},{"name":"Fundraisings","description":"A **fundraising** represents an intent to raise capital from existing or prospective investors. Every fundraising on the platform belongs to specific **stage**. The Fundraising entity supports configurable **custom fields**."},{"name":"Companies","description":"A **company** is a legal entity tracked on the platform. The Company entity supports configurable **custom fields**."},{"name":"Contacts","description":"A **contact** entity stores details used for communication."},{"name":"Investors","description":"A **investor** represents an entity used for tracking relationships, interactions and additional data."},{"name":"Deals-Linking","description":"Endpoints for managing associations between deals and related entities such as notes."},{"name":"Fundraisings-Linking","description":"Endpoints for managing associations between fundraisings and related entities such as notes."},{"name":"Contacts-Linking","description":"Endpoints for managing associations between contacts and related entities such as notes."},{"name":"Investors-Linking","description":"Endpoints for managing associations between investors and related entities such as notes."},{"name":"Deal Attachments","description":"Upload and manage file attachments for deals — both entity-level files and custom fields of type `attachment`."},{"name":"Investor Attachments","description":"Upload and manage file attachments for investors — both entity-level files and custom fields of type `attachment`."},{"name":"Company Attachments","description":"Upload and manage file attachments for companies — both entity-level files and custom fields of type `attachment`."},{"name":"Fundraising Attachments","description":"Upload and manage file attachments for fundraisings — both entity-level files and custom fields of type `attachment`."}]}