Pipedrive

Sales CRM and pipeline management

developers.pipedrive.com/docs/api ↗
Version
1.0.0
OpenAPI
3.0.1
Endpoints
278
Schemas
418
Updated
3 days ago
Crm crm sales pipeline
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.pipedrive.com/v1

Authentication

basic apiKey oauth2

Endpoints

Clear filters

Activities 3 endpoints

GET /activities

Returns all activities assigned to a particular user.

operationId: Activities_listUserActivities

Parameters

Name In Required Type Description
user_id query optional integer The ID of the user whose activities will be fetched. If omitted, the user associated with the API token will be used. If 0, activities for all company users will be fetched based on the permission sets.
filter_id query optional integer The ID of the filter to use (will narrow down results if used together with `user_id` parameter)
type query optional string The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
start query optional integer For pagination, the position that represents the first result for the page
start_date query optional string Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format.
end_date query optional string Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format.
done query optional number Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities.

Responses

200 A list of activities
GET /activities
GET /activities/collection

Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management" target="_blank" rel="noopener noreferrer">here</a>.

operationId: Activities_getAllActivities

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
since query optional string The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
until query optional string The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
user_id query optional integer The ID of the user whose activities will be fetched. If omitted, all activities are returned.
done query optional boolean Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities.
type query optional string The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.

Responses

200 A list of activities
403 Forbidden response
GET /activities/collection
GET /activities/{id}

Returns the details of a specific activity.

operationId: Activities_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the activity

Responses

200 The request was successful
GET /activities/{id}

Activityfields 1 endpoints

GET /activityFields

Returns all activity fields.

operationId: ActivityFields_getAll

Responses

200 Success
GET /activityFields

Activitytypes 1 endpoints

GET /activityTypes

Returns all activity types.

operationId: ActivityTypes_listAllActivityTypes

Responses

200 A list of activity types
GET /activityTypes

Billing 1 endpoints

GET /billing/subscriptions/addons

Returns the add-ons for a single company.

operationId: Billing_getAddonsForSingleCompany

Responses

200 Success
GET /billing/subscriptions/addons

Calllogs 2 endpoints

GET /callLogs

Returns all call logs assigned to a particular user.

operationId: CallLogs_getAllLogs

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer For pagination, the limit of entries to be returned. The upper limit is 50.

Responses

200 A list of call logs.
GET /callLogs
GET /callLogs/{id}

Returns details of a specific call log.

operationId: CallLogs_getDetails

Parameters

Name In Required Type Description
id path required string The ID received when you create the call log

Responses

200 The requested call log object.
404 A resource required to process the request was not found.
GET /callLogs/{id}

Currencies 1 endpoints

GET /currencies

Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.

operationId: Currencies_getAllSupported

Parameters

Name In Required Type Description
term query optional string Optional search term that is searched for from currency's name and/or code

Responses

200 The list of supported currencies
GET /currencies

Dealfields 2 endpoints

GET /dealFields

Returns data about all deal fields.

operationId: DealFields_getAllFields

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /dealFields
GET /dealFields/{id}

Returns data about a specific deal field.

operationId: DealFields_getOneField

Parameters

Name In Required Type Description
id path required integer The ID of the field

Responses

200 Success
GET /dealFields/{id}

Deals 17 endpoints

GET /deals

Returns all deals. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/getting-all-deals" target="_blank" rel="noopener noreferrer">getting all deals</a>.

operationId: Deals_getAllDeals

Parameters

Name In Required Type Description
user_id query optional integer If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
filter_id query optional integer The ID of the filter to use
stage_id query optional integer If supplied, only deals within the given stage will be returned
status query optional string Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
owned_by_you query optional number When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.

Responses

200 Get all deals
GET /deals
GET /deals/collection

Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management" target="_blank" rel="noopener noreferrer">here</a>.

operationId: Deals_getAllDeals

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
since query optional string The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
until query optional string The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
user_id query optional integer If supplied, only deals matching the given user will be returned
stage_id query optional integer If supplied, only deals within the given stage will be returned
status query optional string Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.

Responses

200 Get all deals
403 Forbidden response
GET /deals/collection
GET /deals/search

Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.

operationId: Deals_searchByTitleAndNotes

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
person_id query optional integer Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
organization_id query optional integer Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
status query optional string Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
include_fields query optional string Supports including optional fields in the results which are not provided by default
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /deals/search
GET /deals/summary

Returns a summary of all the deals.

operationId: Deals_getSummary

Parameters

Name In Required Type Description
status query optional string Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
filter_id query optional integer <code>user_id</code> will not be considered. Only deals matching the given filter will be returned.
user_id query optional integer Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
stage_id query optional integer Only deals within the given stage will be returned

Responses

200 Get the summary of the deals
GET /deals/summary
GET /deals/timeline

Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.

operationId: Deals_getTimelineData

Parameters

Name In Required Type Description
start_date query required string The date when the first interval starts. Format: YYYY-MM-DD.
interval query required string The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table>
amount query required integer The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
field_key query required string The date field key which deals will be retrieved from
user_id query optional integer If supplied, only deals matching the given user will be returned
pipeline_id query optional integer If supplied, only deals matching the given pipeline will be returned
filter_id query optional integer If supplied, only deals matching the given filter will be returned
exclude_deals query optional number Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
totals_convert_currency query optional string The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used.

Responses

200 Get open and won deals, grouped by the defined interval of time
GET /deals/timeline
GET /deals/{id}

Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/getting-details-of-a-deal" target="_blank" rel="noopener noreferrer">getting details of a deal</a>.

operationId: Deals_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the deal

Responses

200 Get a deal by its ID
GET /deals/{id}
GET /deals/{id}/activities

Lists activities associated with a deal.

operationId: Deals_listActivities

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page
done query optional number Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
exclude query optional string A comma-separated string of activity IDs to exclude from result

Responses

200 Success
GET /deals/{id}/activities
GET /deals/{id}/changelog

Lists updates about field values of a deal.

operationId: Deals_listChangelog

Parameters

Name In Required Type Description
id path required integer The ID of the deal
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer Items shown per page

Responses

200 Get changelog of a deal
GET /deals/{id}/changelog
GET /deals/{id}/files

Lists files associated with a deal.

operationId: Deals_listDealFiles

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.

Responses

200 Success
GET /deals/{id}/files
GET /deals/{id}/flow

Lists updates about a deal.

operationId: Deals_listDealUpdates

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page
all_changes query optional string Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
items query optional string A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).

Responses

200 Get the deal updates
GET /deals/{id}/flow
GET /deals/{id}/followers

Lists the followers of a deal.

operationId: Deals_listFollowers

Parameters

Name In Required Type Description
id path required integer The ID of the deal

Responses

200 Success
GET /deals/{id}/followers
GET /deals/{id}/mailMessages

Lists mail messages associated with a deal.

operationId: Deals_listMailMessages

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /deals/{id}/mailMessages
GET /deals/{id}/participants

Lists the participants associated with a deal.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.

operationId: Deals_listParticipants

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get all deal participants by the DealID
GET /deals/{id}/participants
GET /deals/{id}/participantsChangelog

List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>.

operationId: Deals_listParticipantsChangelog

Parameters

Name In Required Type Description
id path required integer The ID of the deal
limit query optional integer Items shown per page
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page

Responses

200 Get participant changelogs for a given deal
GET /deals/{id}/participantsChangelog
GET /deals/{id}/permittedUsers

Lists the users permitted to access a deal.

operationId: Deals_listPermittedUsers

Parameters

Name In Required Type Description
id path required integer The ID of the deal

Responses

200 Success
GET /deals/{id}/permittedUsers
GET /deals/{id}/persons

Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.

operationId: Deals_listPersonsAssociated

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /deals/{id}/persons
GET /deals/{id}/products

Lists products attached to a deal.

operationId: Deals_listDealProducts

Parameters

Name In Required Type Description
id path required integer The ID of the deal
start query optional integer Pagination start
limit query optional integer Items shown per page
include_product_data query optional number Whether to fetch product data along with each attached product (1) or not (0, default)

Responses

200 Success
GET /deals/{id}/products

Files 3 endpoints

GET /files

Returns data about all files.

operationId: Files_getAllFiles

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.

Responses

200 Get data about all files uploaded to Pipedrive
GET /files
GET /files/{id}

Returns data about a specific file.

operationId: Files_getOneFile

Parameters

Name In Required Type Description
id path required integer The ID of the file

Responses

200 Get data about one specific file uploaded to Pipedrive
GET /files/{id}
GET /files/{id}/download

Initializes a file download.

operationId: Files_downloadFile

Parameters

Name In Required Type Description
id path required integer The ID of the file

Responses

200 success
GET /files/{id}/download

Filters 3 endpoints

GET /filters

Returns data about all filters.

operationId: Filters_getAll

Parameters

Name In Required Type Description
type query optional string The types of filters to fetch

Responses

200 Success
GET /filters
GET /filters/helpers

Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to <a href="/docs/api/v1/Filters#addFilter">add</a> or <a href="/docs/api/v1/Filters#updateFilter">update</a> filters. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-filter" target="_blank" rel="noopener noreferrer">adding a filter</a>.

operationId: Filters_getHelpers

Responses

200 Success
GET /filters/helpers
GET /filters/{id}

Returns data about a specific filter. Note that this also returns the condition lines of the filter.

operationId: Filters_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the filter

Responses

200 Success
GET /filters/{id}

Goals 2 endpoints

GET /goals/find

Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=<true|false>` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa.

operationId: Goals_getByCriteria

Parameters

Name In Required Type Description
type.name query optional string The type of the goal. If provided, everyone's goals will be returned.
title query optional string The title of the goal
is_active query optional boolean Whether the goal is active or not
assignee.id query optional integer The ID of the user who's goal to fetch. When omitted, only your goals will be returned.
assignee.type query optional string The type of the goal's assignee. If provided, everyone's goals will be returned.
expected_outcome.target query optional number The numeric value of the outcome. If provided, everyone's goals will be returned.
expected_outcome.tracking_metric query optional string The tracking metric of the expected outcome of the goal. If provided, everyone's goals will be returned.
expected_outcome.currency_id query optional integer The numeric ID of the goal's currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone's goals will be returned.
type.params.pipeline_id query optional array An array of pipeline IDs or `null` for all pipelines. If provided, everyone's goals will be returned.
type.params.stage_id query optional integer The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone's goals will be returned.
type.params.activity_type_id query optional array An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone's goals will be returned.
period.start query optional string The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too.
period.end query optional string The end date of the period for which to find goals. Date in format of YYYY-MM-DD.

Responses

200 Successful response containing payload in the `data.goal` object
GET /goals/find
GET /goals/{id}/results

Gets the progress of a goal for the specified period.

operationId: Goals_getResult

Parameters

Name In Required Type Description
id path required string The ID of the goal that the results are looked for
period.start query required string The start date of the period for which to find the goal's progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date.
period.end query required string The end date of the period for which to find the goal's progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date.

Responses

200 Successful response containing payload in the `data.goal` object
GET /goals/{id}/results

Itemsearch 2 endpoints

GET /itemSearch

Performs a search from your choice of item types and fields.

operationId: ItemSearch_searchMultipleItems

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
item_types query optional string A comma-separated string array. The type of items to perform the search from. Defaults to all.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
search_for_related_items query optional boolean When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
include_fields query optional string A comma-separated string array. Supports including optional fields in the results which are not provided by default.
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /itemSearch
GET /itemSearch/field

Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).

operationId: ItemSearch_byFieldValues

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
field_type query required string The type of the field to perform the search from
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. The search <b>is</b> case sensitive.
field_key query required string The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.
return_item_ids query optional boolean Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned.
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /itemSearch/field

Leadlabels 1 endpoints

GET /leadLabels

Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned.

operationId: LeadLabels_getAll

Responses

200 Successful response containing payload in the `data` field
GET /leadLabels

Leadsources 1 endpoints

GET /leadSources

Returns all lead sources. Please note that the list of lead sources is fixed, it cannot be modified. All leads created through the Pipedrive API will have a lead source `API` assigned.

operationId: LeadSources_getAll

Responses

200 The successful response containing payload in the `data` field.
GET /leadSources

Leads 4 endpoints

GET /leads

Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.

operationId: Leads_getAll

Parameters

Name In Required Type Description
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
start query optional integer For pagination, the position that represents the first result for the page
archived_status query optional string Filtering based on the archived status of a lead. If not provided, `All` is used.
owner_id query optional integer If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
person_id query optional integer If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied.
organization_id query optional integer If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied.
filter_id query optional integer The ID of the filter to use
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).

Responses

200 Successful response containing payload in the `data` field
GET /leads
GET /leads/search

Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.

operationId: Leads_searchLeads

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all of them.
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
person_id query optional integer Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
organization_id query optional integer Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
include_fields query optional string Supports including optional fields in the results which are not provided by default
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /leads/search
GET /leads/{id}

Returns details of a specific lead. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.

operationId: Leads_getDetails

Parameters

Name In Required Type Description
id path required string The ID of the lead

Responses

200 Successful response containing payload in the `data` field
404 A resource describing an error
GET /leads/{id}
GET /leads/{id}/permittedUsers

Lists the users permitted to access a lead.

operationId: Leads_listPermittedUsers

Parameters

Name In Required Type Description
id path required string The ID of the lead

Responses

200 Lists users permitted to access a lead
GET /leads/{id}/permittedUsers

Mailbox 4 endpoints

GET /mailbox/mailMessages/{id}

Returns data about a specific mail message.

operationId: Mailbox_getMailMessage

Parameters

Name In Required Type Description
id path required integer The ID of the mail message to fetch
include_body query optional number Whether to include the full message body or not. `0` = Don't include, `1` = Include.

Responses

200 The mail messages that are being synced with Pipedrive
GET /mailbox/mailMessages/{id}
GET /mailbox/mailThreads

Returns mail threads in a specified folder ordered by the most recent message within.

operationId: Mailbox_getMailThreads

Parameters

Name In Required Type Description
folder query required string The type of folder to fetch
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get mail threads
GET /mailbox/mailThreads
GET /mailbox/mailThreads/{id}

Returns a specific mail thread.

operationId: Mailbox_getMailThread

Parameters

Name In Required Type Description
id path required integer The ID of the mail thread

Responses

200 Get mail threads
GET /mailbox/mailThreads/{id}
GET /mailbox/mailThreads/{id}/mailMessages

Returns all the mail messages inside a specified mail thread.

operationId: Mailbox_getAllMailMessages

Parameters

Name In Required Type Description
id path required integer The ID of the mail thread

Responses

200 Get mail messages from thread
GET /mailbox/mailThreads/{id}/mailMessages

Notefields 1 endpoints

GET /noteFields

Returns data about all note fields.

operationId: NoteFields_getAllNoteFields

Responses

200 Success
GET /noteFields

Notes 4 endpoints

GET /notes

Returns all notes.

operationId: Notes_getAll

Parameters

Name In Required Type Description
user_id query optional integer The ID of the user whose notes to fetch. If omitted, notes by all users will be returned.
lead_id query optional string The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned.
deal_id query optional integer The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned.
person_id query optional integer The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned.
org_id query optional integer The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned.
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`.
start_date query optional string The date in format of YYYY-MM-DD from which notes to fetch
end_date query optional string The date in format of YYYY-MM-DD until which notes to fetch to
pinned_to_lead_flag query optional number If set, the results are filtered by note to lead pinning state
pinned_to_deal_flag query optional number If set, the results are filtered by note to deal pinning state
pinned_to_organization_flag query optional number If set, the results are filtered by note to organization pinning state
pinned_to_person_flag query optional number If set, the results are filtered by note to person pinning state

Responses

200 Get all notes
GET /notes
GET /notes/{id}

Returns details about a specific note.

operationId: Notes_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the note

Responses

200 Add, update or get a note
GET /notes/{id}
GET /notes/{id}/comments

Returns all comments associated with a note.

operationId: Notes_getAllComments

Parameters

Name In Required Type Description
id path required integer The ID of the note
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get all comments
GET /notes/{id}/comments
GET /notes/{id}/comments/{commentId}

Returns the details of a comment.

operationId: Notes_getCommentDetails

Parameters

Name In Required Type Description
id path required integer The ID of the note
commentId path required string The ID of the comment

Responses

200 Add, update or get a comment
GET /notes/{id}/comments/{commentId}

Oauth 1 endpoints

GET /oauth/authorize

Authorize a user by redirecting them to the Pipedrive OAuth authorization page and request their permissions to act on their behalf. This step is necessary to implement only when you allow app installation outside of the Marketplace.

operationId: Oauth_requestAuthorization

Parameters

Name In Required Type Description
client_id query required string The client ID provided to you by the Pipedrive Marketplace when you register your app
redirect_uri query required string The callback URL you provided when you registered your app. Authorization code will be sent to that URL (if it matches with the value you entered in the registration form) if a user approves the app install. Or, if a customer declines, the corresponding error will also be sent to this URL.
state query optional string You may pass any random string as the state parameter and the same string will be returned to your app after a user authorizes access. It may be used to store the user's session ID from your app or distinguish different responses. Using state may increase security; see RFC-6749. The state parameter is not automatically available in Marketplace Manager. To enable it for your app, please write to us at marketplace.devs@pipedrive.com.

Responses

200 Authorize user in the app.
GET /oauth/authorize

Organizationfields 2 endpoints

GET /organizationFields

Returns data about all organization fields.

operationId: OrganizationFields_getAllFields

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /organizationFields
GET /organizationFields/{id}

Returns data about a specific organization field.

operationId: OrganizationFields_getSpecificField

Parameters

Name In Required Type Description
id path required integer The ID of the field

Responses

200 Success
GET /organizationFields/{id}

Organizationrelationships 2 endpoints

GET /organizationRelationships

Gets all of the relationships for a supplied organization ID.

operationId: OrganizationRelationships_getAllRelationships

Parameters

Name In Required Type Description
org_id query required integer The ID of the organization to get relationships for

Responses

200 Success
GET /organizationRelationships
GET /organizationRelationships/{id}

Finds and returns an organization relationship from its ID.

operationId: OrganizationRelationships_getById

Parameters

Name In Required Type Description
id path required integer The ID of the organization relationship
org_id query optional integer The ID of the base organization for the returned calculated values

Responses

200 Success
GET /organizationRelationships/{id}

Organizations 13 endpoints

GET /organizations

Returns all organizations.

operationId: Organizations_getAll

Parameters

Name In Required Type Description
user_id query optional integer If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
filter_id query optional integer The ID of the filter to use
first_char query optional string If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).

Responses

200 Success
GET /organizations
GET /organizations/collection

Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management" target="_blank" rel="noopener noreferrer">here</a>.

operationId: Organizations_listAllOrganizations

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
since query optional string The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
until query optional string The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
owner_id query optional integer If supplied, only organizations owned by the given user will be returned
first_char query optional string If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)

Responses

200 Success
403 Forbidden response
GET /organizations/collection
GET /organizations/search

Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope.

operationId: Organizations_searchByCriteria

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /organizations/search
GET /organizations/{id}

Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields.

operationId: Organizations_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the organization

Responses

200 Success
GET /organizations/{id}
GET /organizations/{id}/activities

Lists activities associated with an organization.

operationId: Organizations_listActivities

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page
done query optional number Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities.
exclude query optional string A comma-separated string of activity IDs to exclude from result

Responses

200 Success
GET /organizations/{id}/activities
GET /organizations/{id}/changelog

Lists updates about field values of an organization.

operationId: Organizations_listFieldUpdates

Parameters

Name In Required Type Description
id path required integer The ID of the organization
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer Items shown per page

Responses

200 Get changelog of an organization
GET /organizations/{id}/changelog
GET /organizations/{id}/deals

Lists deals associated with an organization.

operationId: Organizations_listDeals

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page
status query optional string Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
only_primary_association query optional number If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization.

Responses

200 Success
GET /organizations/{id}/deals
GET /organizations/{id}/files

Lists files associated with an organization.

operationId: Organizations_listAttachedFiles

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.

Responses

200 Success
GET /organizations/{id}/files
GET /organizations/{id}/flow

Lists updates about an organization.

operationId: Organizations_listUpdatesAbout

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page
all_changes query optional string Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates.
items query optional string A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document).

Responses

200 Get the organization updates
GET /organizations/{id}/flow
GET /organizations/{id}/followers

Lists the followers of an organization.

operationId: Organizations_listFollowers

Parameters

Name In Required Type Description
id path required integer The ID of the organization

Responses

200 Success
GET /organizations/{id}/followers
GET /organizations/{id}/mailMessages

Lists mail messages associated with an organization.

operationId: Organizations_listMailMessages

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /organizations/{id}/mailMessages
GET /organizations/{id}/permittedUsers

List users permitted to access an organization.

operationId: Organizations_listPermittedUsers

Parameters

Name In Required Type Description
id path required integer The ID of the organization

Responses

200 Success
GET /organizations/{id}/permittedUsers
GET /organizations/{id}/persons

Lists persons associated with an organization.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.

operationId: Organizations_listPersons

Parameters

Name In Required Type Description
id path required integer The ID of the organization
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /organizations/{id}/persons

Permissionsets 3 endpoints

GET /permissionSets

Returns data about all permission sets.

operationId: PermissionSets_getAll

Parameters

Name In Required Type Description
app query optional string The app to filter the permission sets by

Responses

200 Get all permissions
GET /permissionSets
GET /permissionSets/{id}

Returns data about a specific permission set.

operationId: PermissionSets_getOne

Parameters

Name In Required Type Description
id path required string The ID of the permission set

Responses

200 The permission set of a specific user ID
404 If the user ID has no assignments, then it will return NotFound
GET /permissionSets/{id}
GET /permissionSets/{id}/assignments

Returns the list of assignments for a permission set.

operationId: PermissionSets_listAssignments

Parameters

Name In Required Type Description
id path required string The ID of the permission set
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 The assignments of a specific user ID
404 If the user ID has no assignments, then it will return NotFound
GET /permissionSets/{id}/assignments

Personfields 2 endpoints

GET /personFields

Returns data about all person fields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.

operationId: PersonFields_getAllFields

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /personFields
GET /personFields/{id}

Returns data about a specific person field.

operationId: PersonFields_getSpecificField

Parameters

Name In Required Type Description
id path required integer The ID of the field

Responses

200 Success
GET /personFields/{id}

Persons 13 endpoints

GET /persons

Returns all persons.

operationId: Persons_listAllPersons

Parameters

Name In Required Type Description
user_id query optional integer If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
filter_id query optional integer The ID of the filter to use
first_char query optional string If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).

Responses

200 Success
GET /persons
GET /persons/collection

Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management" target="_blank" rel="noopener noreferrer">here</a>.

operationId: Persons_getAll

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
since query optional string The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
until query optional string The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
owner_id query optional integer If supplied, only persons owned by the given user will be returned
first_char query optional string If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)

Responses

200 Success
403 Forbidden response
GET /persons/collection
GET /persons/search

Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.

operationId: Persons_searchByCriteria

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
organization_id query optional integer Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
include_fields query optional string Supports including optional fields in the results which are not provided by default
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /persons/search
GET /persons/{id}

Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.

operationId: Persons_getPersonDetails

Parameters

Name In Required Type Description
id path required integer The ID of the person

Responses

200 Success
GET /persons/{id}
GET /persons/{id}/activities

Lists activities associated with a person.

operationId: Persons_listActivities

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page
done query optional number Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
exclude query optional string A comma-separated string of activity IDs to exclude from result

Responses

200 Success
GET /persons/{id}/activities
GET /persons/{id}/changelog

Lists updates about field values of a person.

operationId: Persons_listChangelog

Parameters

Name In Required Type Description
id path required integer The ID of the person
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer Items shown per page

Responses

200 Get changelog of a person
GET /persons/{id}/changelog
GET /persons/{id}/deals

Lists deals associated with a person.

operationId: Persons_listDeals

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page
status query optional string Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).

Responses

200 Success
GET /persons/{id}/deals
GET /persons/{id}/files

Lists files associated with a person.

operationId: Persons_listPersonFiles

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.

Responses

200 Success
GET /persons/{id}/files
GET /persons/{id}/flow

Lists updates about a person.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint's response will also include updates for the `marketing_status` field.

operationId: Persons_listUpdatesAbout

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page
all_changes query optional string Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
items query optional string A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).

Responses

200 Get the person updates
GET /persons/{id}/flow
GET /persons/{id}/followers

Lists the followers of a person.

operationId: Persons_listFollowers

Parameters

Name In Required Type Description
id path required integer The ID of the person

Responses

200 Success
GET /persons/{id}/followers
GET /persons/{id}/mailMessages

Lists mail messages associated with a person.

operationId: Persons_listMailMessages

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /persons/{id}/mailMessages
GET /persons/{id}/permittedUsers

List users permitted to access a person.

operationId: Persons_listPermittedUsers

Parameters

Name In Required Type Description
id path required integer The ID of the person

Responses

200 Success
GET /persons/{id}/permittedUsers
GET /persons/{id}/products

Lists products associated with a person.

operationId: Persons_listProducts

Parameters

Name In Required Type Description
id path required integer The ID of the person
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Success
GET /persons/{id}/products

Pipelines 5 endpoints

GET /pipelines

Returns data about all pipelines.

operationId: Pipelines_getAll

Responses

200 Get all pipelines
GET /pipelines
GET /pipelines/{id}

Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages.

operationId: Pipelines_getOnePipelineSummary

Parameters

Name In Required Type Description
id path required integer The ID of the pipeline
totals_convert_currency query optional string The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used.

Responses

200 Get pipeline
GET /pipelines/{id}
GET /pipelines/{id}/conversion_statistics

Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period.

operationId: Pipelines_getConversionStatistics

Parameters

Name In Required Type Description
id path required integer The ID of the pipeline
start_date query required string The start of the period. Date in format of YYYY-MM-DD.
end_date query required string The end of the period. Date in format of YYYY-MM-DD.
user_id query optional integer The ID of the user who's pipeline metrics statistics to fetch. If omitted, the authorized user will be used.

Responses

200 Get pipeline deals conversion rates
GET /pipelines/{id}/conversion_statistics
GET /pipelines/{id}/deals

Lists deals in a specific pipeline across all its stages.

operationId: Pipelines_listDeals

Parameters

Name In Required Type Description
id path required integer The ID of the pipeline
filter_id query optional integer If supplied, only deals matching the given filter will be returned
user_id query optional integer If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned.
everyone query optional number If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned
stage_id query optional integer If supplied, only deals within the given stage will be returned
start query optional integer Pagination start
limit query optional integer Items shown per page
get_summary query optional number Whether to include a summary of the pipeline in the `additional_data` or not
totals_convert_currency query optional string The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled.

Responses

200 Get deals in a stage
GET /pipelines/{id}/deals
GET /pipelines/{id}/movement_statistics

Returns statistics for deals movements for the given time period.

operationId: Pipelines_getMovementStatistics

Parameters

Name In Required Type Description
id path required integer The ID of the pipeline
start_date query required string The start of the period. Date in format of YYYY-MM-DD.
end_date query required string The end of the period. Date in format of YYYY-MM-DD.
user_id query optional integer The ID of the user who's pipeline statistics to fetch. If omitted, the authorized user will be used.

Responses

200 Get pipeline deals conversion rates
GET /pipelines/{id}/movement_statistics

Productfields 2 endpoints

GET /productFields

Returns data about all product fields.

operationId: ProductFields_getAllFields

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get data about all product fields
GET /productFields
GET /productFields/{id}

Returns data about a specific product field.

operationId: ProductFields_getOneField

Parameters

Name In Required Type Description
id path required integer The ID of the product field

Responses

200 Get the data for a single product field
410 The product field with the specified ID does not exist or is inaccessible
GET /productFields/{id}

Products 7 endpoints

GET /products

Returns data about all products.

operationId: Products_getAllProducts

Parameters

Name In Required Type Description
user_id query optional integer If supplied, only products owned by the given user will be returned
filter_id query optional integer The ID of the filter to use
ids query optional array An array of integers with the IDs of the products that should be returned in the response
first_char query optional string If supplied, only products whose name starts with the specified letter will be returned (case-insensitive)
get_summary query optional boolean If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 List of products
GET /products
GET /products/search

Searches all products by name, code and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope.

operationId: Products_searchByFields

Parameters

Name In Required Type Description
term query required string The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
fields query optional string A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields" target="_blank" rel="noopener noreferrer">here</a>.
exact_match query optional boolean When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
include_fields query optional string Supports including optional fields in the results which are not provided by default
start query optional integer Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
limit query optional integer Items shown per page

Responses

200 Success
GET /products/search
GET /products/{id}

Returns data about a specific product.

operationId: Products_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the product

Responses

200 Get product information by id
GET /products/{id}
GET /products/{id}/deals

Returns data about deals that have a product attached to it.

operationId: Products_getDeals

Parameters

Name In Required Type Description
id path required integer The ID of the product
start query optional integer Pagination start
limit query optional integer Items shown per page
status query optional string Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.

Responses

200 The data of deals that have a product attached
GET /products/{id}/deals
GET /products/{id}/files

Lists files associated with a product.

operationId: Products_listProductFiles

Parameters

Name In Required Type Description
id path required integer The ID of the product
start query optional integer Pagination start
limit query optional integer Items shown per page
sort query optional string The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`.

Responses

200 Success
GET /products/{id}/files
GET /products/{id}/followers

Lists the followers of a product.

operationId: Products_listProductFollowers

Parameters

Name In Required Type Description
id path required integer The ID of the product
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Lists the followers of a product
GET /products/{id}/followers
GET /products/{id}/permittedUsers

Lists users permitted to access a product.

operationId: Products_listPermittedUsers

Parameters

Name In Required Type Description
id path required integer The ID of the product

Responses

200 Lists users permitted to access a product
GET /products/{id}/permittedUsers

Projecttemplates 4 endpoints

GET /projectTemplates

Returns all not deleted project templates. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>.

operationId: ProjectTemplates_getAllTemplates

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned.

Responses

200 A list of project template.
GET /projectTemplates
GET /projectTemplates/{id}

Returns the details of a specific project template.

operationId: ProjectTemplates_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the project template

Responses

200 Get a project template.
GET /projectTemplates/{id}
GET /projects/boards/{id}

Returns the details of a specific project board.

operationId: ProjectTemplates_getBoardDetails

Parameters

Name In Required Type Description
id path required integer The ID of the project board

Responses

200 Get a project board.
GET /projects/boards/{id}
GET /projects/phases/{id}

Returns the details of a specific project phase.

operationId: ProjectTemplates_getPhaseDetails

Parameters

Name In Required Type Description
id path required integer The ID of the project phase

Responses

200 Get a project phase.
GET /projects/phases/{id}

Projects 8 endpoints

GET /projects

Returns all projects. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>.

operationId: Projects_getAllProjects

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
filter_id query optional integer The ID of the filter to use
status query optional string If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned.
phase_id query optional integer If supplied, only projects in specified phase are returned
include_archived query optional boolean If supplied with `true` then archived projects are also included in the response. By default only not archived projects are returned.

Responses

200 A list of projects.
GET /projects
GET /projects/boards

Returns all projects boards that are not deleted.

operationId: Projects_getAllBoards

Responses

200 A list of project board.
GET /projects/boards
GET /projects/phases

Returns all active project phases under a specific board.

operationId: Projects_getPhases

Parameters

Name In Required Type Description
board_id query required integer ID of the board for which phases are requested

Responses

200 A list of project phases.
GET /projects/phases
GET /projects/{id}

Returns the details of a specific project. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of project fields.

operationId: Projects_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the project

Responses

200 Get a project.
GET /projects/{id}
GET /projects/{id}/activities

Returns activities linked to a specific project.

operationId: Projects_getProjectActivities

Parameters

Name In Required Type Description
id path required integer The ID of the project

Responses

200 A list of activities
GET /projects/{id}/activities
GET /projects/{id}/groups

Returns all active groups under a specific project.

operationId: Projects_getGroups

Parameters

Name In Required Type Description
id path required integer The ID of the project

Responses

200 Get a project groups.
GET /projects/{id}/groups
GET /projects/{id}/plan

Returns information about items in a project plan. Items consists of tasks and activities and are linked to specific project phase and group.

operationId: Projects_getProjectPlan

Parameters

Name In Required Type Description
id path required integer The ID of the project

Responses

200 Get a project plan.
GET /projects/{id}/plan
GET /projects/{id}/tasks

Returns tasks linked to a specific project.

operationId: Projects_getProjectTasks

Parameters

Name In Required Type Description
id path required integer The ID of the project

Responses

200 A list of tasks.
GET /projects/{id}/tasks

Recents 1 endpoints

GET /recents

Returns data about all recent changes occurred after the given timestamp.

operationId: Recents_getChangesAfter

Parameters

Name In Required Type Description
since_timestamp query required string The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS.
items query optional string Multiple selection of item types to include in the query (optional)
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 List of items changed since "since_timestamp"
GET /recents

Roles 5 endpoints

GET /roles

Returns all the roles within the company.

operationId: Roles_getAllRoles

Parameters

Name In Required Type Description
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get all roles
GET /roles
GET /roles/{id}

Returns the details of a specific role.

operationId: Roles_getOneRole

Parameters

Name In Required Type Description
id path required integer The ID of the role

Responses

200 Get one role
GET /roles/{id}
GET /roles/{id}/assignments

Returns all users assigned to a role.

operationId: Roles_listRoleAssignments

Parameters

Name In Required Type Description
id path required integer The ID of the role
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 List assignments for a role
GET /roles/{id}/assignments
GET /roles/{id}/pipelines

Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the <a href="https://support.pipedrive.com/en/article/visibility-groups" target="_blank" rel="noopener noreferrer">Visibility groups article</a>.

operationId: Roles_listPipelineVisibility

Parameters

Name In Required Type Description
id path required integer The ID of the role
visible query optional boolean Whether to return the visible or hidden pipelines for the role

Responses

200 Get either visible or hidden pipeline ids for a role
GET /roles/{id}/pipelines
GET /roles/{id}/settings

Returns the visibility settings of a specific role.

operationId: Roles_getRoleSettings

Parameters

Name In Required Type Description
id path required integer The ID of the role

Responses

200 List role settings
GET /roles/{id}/settings

Stages 3 endpoints

GET /stages

Returns data about all stages.

operationId: Stages_getAll

Parameters

Name In Required Type Description
pipeline_id query optional integer The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched.
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get all stages
GET /stages
GET /stages/{id}

Returns data about a specific stage.

operationId: Stages_getOneStage

Parameters

Name In Required Type Description
id path required integer The ID of the stage
everyone query optional number If `everyone=1` is provided, deals summary will return deals owned by every user

Responses

200 Get stage
GET /stages/{id}
GET /stages/{id}/deals

Lists deals in a specific stage.

operationId: Stages_getStageDeals

Parameters

Name In Required Type Description
id path required integer The ID of the stage
filter_id query optional integer If supplied, only deals matching the given filter will be returned
user_id query optional integer If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned.
everyone query optional number If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 Get deals in a stage
GET /stages/{id}/deals

Subscriptions 3 endpoints

GET /subscriptions/find/{dealId}

Returns details of an installment or a recurring subscription by the deal ID.

operationId: Subscriptions_findByDealId

Parameters

Name In Required Type Description
dealId path required integer The ID of the deal

Responses

200 Success
GET /subscriptions/find/{dealId}
GET /subscriptions/{id}

Returns details of an installment or a recurring subscription.

operationId: Subscriptions_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the subscription

Responses

200 Success
GET /subscriptions/{id}
GET /subscriptions/{id}/payments

Returns all payments of an installment or recurring subscription.

operationId: Subscriptions_getPayments

Parameters

Name In Required Type Description
id path required integer The ID of the subscription

Responses

200 Success
GET /subscriptions/{id}/payments

Tasks 2 endpoints

GET /tasks

Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination" target="_blank" rel="noopener noreferrer">pagination</a>.

operationId: Tasks_listAllTasks

Parameters

Name In Required Type Description
cursor query optional string For pagination, the marker (an opaque string value) representing the first item on the next page
limit query optional integer For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned.
assignee_id query optional integer If supplied, only tasks that are assigned to this user are returned
project_id query optional integer If supplied, only tasks that are assigned to this project are returned
parent_task_id query optional integer If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned.
done query optional number Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks.

Responses

200 A list of tasks.
GET /tasks
GET /tasks/{id}

Returns the details of a specific task.

operationId: Tasks_getDetails

Parameters

Name In Required Type Description
id path required integer The ID of the task

Responses

200 Get a task.
GET /tasks/{id}

Userconnections 1 endpoints

GET /userConnections

Returns data about all connections for the authorized user.

operationId: UserConnections_getAllConnections

Responses

200 The data of user connections
401 Unauthorized response
GET /userConnections

Usersettings 1 endpoints

GET /userSettings

Lists the settings of an authorized user. Example response contains a shortened list of settings.

operationId: UserSettings_listAuthorizedSettings

Responses

200 The list of user settings
401 Unauthorized response
GET /userSettings

Users 8 endpoints

GET /users

Returns data about all users within the company.

operationId: Users_getAll

Responses

200 The list of user objects
GET /users
GET /users/find

Finds users by their name.

operationId: Users_findByName

Parameters

Name In Required Type Description
term query required string The search term to look for
search_by_email query optional number When enabled, the term will only be matched against email addresses of users. Default: `false`.

Responses

200 The list of user objects
GET /users/find
GET /users/me

Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the `locale` property means 'Date/number format' in the Pipedrive account settings, not the chosen language.

operationId: Users_getCurrentUserData

Responses

200 The data of the logged in user
401 Unauthorized response
GET /users/me
GET /users/{id}

Returns data about a specific user within the company.

operationId: Users_getUser

Parameters

Name In Required Type Description
id path required integer The ID of the user

Responses

200 The data of the user
404 User with specified ID does not exist or is inaccessible
GET /users/{id}
GET /users/{id}/followers

Lists the followers of a specific user.

operationId: Users_listFollowers

Parameters

Name In Required Type Description
id path required integer The ID of the user

Responses

200 The list of user IDs
403 Forbidden response
GET /users/{id}/followers
GET /users/{id}/permissions

Lists aggregated permissions over all assigned permission sets for a user.

operationId: Users_listPermissions

Parameters

Name In Required Type Description
id path required integer The ID of the user

Responses

200 The list of user permissions
GET /users/{id}/permissions
GET /users/{id}/roleAssignments

Lists role assignments for a user.

operationId: Users_listRoleAssignments

Parameters

Name In Required Type Description
id path required integer The ID of the user
start query optional integer Pagination start
limit query optional integer Items shown per page

Responses

200 List assignments for a role
GET /users/{id}/roleAssignments
GET /users/{id}/roleSettings

Lists the settings of user's assigned role.

operationId: Users_listRoleSettings

Parameters

Name In Required Type Description
id path required integer The ID of the user

Responses

200 List role settings
GET /users/{id}/roleSettings

Webhooks 1 endpoints

GET /webhooks

Returns data about all the Webhooks of a company.

operationId: Webhooks_getAll

Responses

200 The list of webhooks objects from the logged in company and user
401 Unauthorized response
GET /webhooks

Schemas

object ActivitiesAddNewActivityRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization this activity is associated with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal this activity is associated with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "nullable": true,
          "description": "The ID of the lead in the UUID format this activity is associated with"
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The due date of the activity. Format: YYYY-MM-DD"
        },
        "due_time": {
          "type": "string",
          "description": "The due time of the activity in UTC. Format: HH:MM"
        },
        "duration": {
          "type": "string",
          "description": "The duration of the activity. Format: HH:MM"
        },
        "location": {
          "type": "string",
          "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person this activity is associated with"
        },
        "project_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the project this activity is associated with"
        },
        "public_description": {
          "type": "string",
          "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "done": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Whether the activity is done or not. 0 = Not done, 1 = Done"
        },
        "note": {
          "type": "string",
          "description": "The note of the activity (HTML format)"
        },
        "type": {
          "type": "string",
          "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. When value for type is not set, it will be given a default value `Call`."
        },
        "subject": {
          "type": "string",
          "description": "The subject of the activity. When value for subject is not set, it will be given a default value `Call`."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user whom the activity is assigned to. If omitted, the activity is assigned to the authorized user."
        },
        "attendees": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. It requires a structure as follows: `[{\"email_address\":\"mail@example.org\"}]` or `[{\"person_id\":1, \"email_address\":\"mail@example.org\"}]`"
        },
        "busy_flag": {
          "type": "boolean",
          "description": "Set the activity as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with `null`. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
        },
        "participants": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "List of multiple persons (participants) this activity is associated with. If omitted, single participant from `person_id` field is used. It requires a structure as follows: `[{\"person_id\":1,\"primary_flag\":true}]`"
        }
      }
    }
  ],
  "title": "addActivityRequest"
}
object ActivitiesAddNewActivityResponse
{
  "type": "object",
  "title": "addActivityResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization this activity is associated with"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this activity is associated with"
            },
            "lead_id": {
              "type": "string",
              "format": "uuid",
              "nullable": true,
              "description": "The ID of the lead in the UUID format this activity is associated with"
            },
            "due_date": {
              "type": "string",
              "format": "date",
              "description": "The due date of the activity. Format: YYYY-MM-DD"
            },
            "due_time": {
              "type": "string",
              "description": "The due time of the activity in UTC. Format: HH:MM"
            },
            "duration": {
              "type": "string",
              "description": "The duration of the activity. Format: HH:MM"
            },
            "location": {
              "type": "string",
              "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person this activity is associated with"
            },
            "project_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the project this activity is associated with"
            },
            "public_description": {
              "type": "string",
              "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity, generated when the activity was created"
            },
            "done": {
              "type": "boolean",
              "description": "Whether the activity is done or not"
            },
            "file": {
              "type": "object",
              "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
            },
            "note": {
              "type": "string",
              "description": "The note of the activity (HTML format)"
            },
            "type": {
              "type": "string",
              "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
            },
            "series": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
            },
            "subject": {
              "type": "string",
              "description": "The subject of the activity"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user whom the activity is assigned to"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization this activity is associated with"
            },
            "rec_rule": {
              "type": "string",
              "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
            },
            "attendees": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
            },
            "busy_flag": {
              "type": "boolean",
              "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
            },
            "company_id": {
              "type": "integer",
              "description": "The user's company ID"
            },
            "deal_title": {
              "type": "string",
              "description": "The name of the deal this activity is associated with"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the user this activity is owned by"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Whether the activity is active or not"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person this activity is associated with"
            },
            "update_time": {
              "type": "string",
              "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
            },
            "participants": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "List of multiple persons (participants) this activity is associated with"
            },
            "reference_id": {
              "type": "integer",
              "description": "Together with the `reference_type`, gives the ID of the other object"
            },
            "gcal_event_id": {
              "type": "string",
              "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_route": {
              "type": "string",
              "description": "A subfield of the location field. Indicates street name."
            },
            "reference_type": {
              "type": "string",
              "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
            },
            "update_user_id": {
              "type": "integer",
              "description": "The ID of the user who was the last to update this activity"
            },
            "source_timezone": {
              "type": "string",
              "description": "The timezone the activity was created in an external calendar"
            },
            "deal_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the deal"
            },
            "location_country": {
              "type": "string",
              "description": "A subfield of the location field. Indicates country."
            },
            "location_locality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates city/town/village/locality."
            },
            "created_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created the activity"
            },
            "google_calendar_id": {
              "type": "string",
              "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "person_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the person"
            },
            "rec_rule_extension": {
              "type": "string",
              "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
            },
            "assigned_to_user_id": {
              "type": "integer",
              "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
            },
            "location_subpremise": {
              "type": "string",
              "description": "A subfield of the location field. Indicates apartment/suite number."
            },
            "marked_as_done_time": {
              "type": "string",
              "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
            },
            "google_calendar_etag": {
              "type": "string",
              "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_postal_code": {
              "type": "string",
              "description": "A subfield of the location field. Indicates ZIP/postal code."
            },
            "location_sublocality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates district/sublocality."
            },
            "conference_meeting_id": {
              "type": "string",
              "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
            },
            "conference_meeting_url": {
              "type": "string",
              "description": "The link to join the meeting which is associated with this activity"
            },
            "last_notification_time": {
              "type": "string",
              "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
            },
            "location_street_number": {
              "type": "string",
              "description": "A subfield of the location field. Indicates house number."
            },
            "rec_master_activity_id": {
              "type": "integer",
              "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
            },
            "notification_language_id": {
              "type": "integer",
              "description": "The ID of the language the notifications are sent in"
            },
            "conference_meeting_client": {
              "type": "string",
              "description": "The ID of the Marketplace app, which is connected to this activity"
            },
            "last_notification_user_id": {
              "type": "integer",
              "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
            },
            "location_formatted_address": {
              "type": "string",
              "description": "A subfield of the location field. Indicates full/combined address."
            },
            "location_admin_area_level_1": {
              "type": "string",
              "description": "A subfield of the location field. Indicates state/county."
            },
            "location_admin_area_level_2": {
              "type": "string",
              "description": "A subfield of the location field. Indicates region."
            },
            "calendar_sync_include_context": {
              "type": "string",
              "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
            }
          }
        }
      ],
      "title": "activityResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "updates_story_id": {
          "type": "integer",
          "description": "This field will be deprecated"
        }
      }
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ActivitiesDeleteBulkResponse
{
  "type": "object",
  "title": "deleteActivitiesResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of the IDs of activities that were deleted"
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object ActivitiesGetAllActivities403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ActivitiesGetAllActivitiesResponse
{
  "type": "object",
  "title": "getActivitiesCollectionResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization this activity is associated with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal this activity is associated with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "The ID of the lead in the UUID format this activity is associated with"
              },
              "due_date": {
                "type": "string",
                "format": "date",
                "description": "The due date of the activity. Format: YYYY-MM-DD"
              },
              "due_time": {
                "type": "string",
                "description": "The due time of the activity in UTC. Format: HH:MM"
              },
              "duration": {
                "type": "string",
                "description": "The duration of the activity. Format: HH:MM"
              },
              "location": {
                "type": "string",
                "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person this activity is associated with"
              },
              "project_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the project this activity is associated with"
              },
              "public_description": {
                "type": "string",
                "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the activity, generated when the activity was created"
              },
              "done": {
                "type": "boolean",
                "description": "Whether the activity is done or not"
              },
              "type": {
                "type": "string",
                "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
              },
              "subject": {
                "type": "string",
                "description": "The subject of the activity"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user whom the activity is assigned to"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "busy_flag": {
                "type": "boolean",
                "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
              },
              "company_id": {
                "type": "integer",
                "description": "The user's company ID"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the activity is active or not"
              },
              "update_time": {
                "type": "string",
                "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
              },
              "location_route": {
                "type": "string",
                "description": "A subfield of the location field. Indicates street name."
              },
              "update_user_id": {
                "type": "integer",
                "description": "The ID of the user who was the last to update this activity"
              },
              "source_timezone": {
                "type": "string",
                "description": "The timezone the activity was created in an external calendar"
              },
              "location_country": {
                "type": "string",
                "description": "A subfield of the location field. Indicates country."
              },
              "location_locality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates city/town/village/locality."
              },
              "location_subpremise": {
                "type": "string",
                "description": "A subfield of the location field. Indicates apartment/suite number."
              },
              "marked_as_done_time": {
                "type": "string",
                "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
              },
              "location_postal_code": {
                "type": "string",
                "description": "A subfield of the location field. Indicates ZIP/postal code."
              },
              "location_sublocality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates district/sublocality."
              },
              "conference_meeting_id": {
                "type": "string",
                "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
              },
              "conference_meeting_url": {
                "type": "string",
                "description": "The link to join the meeting which is associated with this activity"
              },
              "location_street_number": {
                "type": "string",
                "description": "A subfield of the location field. Indicates house number."
              },
              "conference_meeting_client": {
                "type": "string",
                "description": "The ID of the Marketplace app, which is connected to this activity"
              },
              "location_formatted_address": {
                "type": "string",
                "description": "A subfield of the location field. Indicates full/combined address."
              },
              "location_admin_area_level_1": {
                "type": "string",
                "description": "A subfield of the location field. Indicates state/county."
              },
              "location_admin_area_level_2": {
                "type": "string",
                "description": "A subfield of the location field. Indicates region."
              }
            }
          }
        ],
        "title": "activityCollectionResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object ActivitiesGetDetailsResponse
{
  "type": "object",
  "title": "getActivityResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization this activity is associated with"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this activity is associated with"
            },
            "lead_id": {
              "type": "string",
              "format": "uuid",
              "nullable": true,
              "description": "The ID of the lead in the UUID format this activity is associated with"
            },
            "due_date": {
              "type": "string",
              "format": "date",
              "description": "The due date of the activity. Format: YYYY-MM-DD"
            },
            "due_time": {
              "type": "string",
              "description": "The due time of the activity in UTC. Format: HH:MM"
            },
            "duration": {
              "type": "string",
              "description": "The duration of the activity. Format: HH:MM"
            },
            "location": {
              "type": "string",
              "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person this activity is associated with"
            },
            "project_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the project this activity is associated with"
            },
            "public_description": {
              "type": "string",
              "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity, generated when the activity was created"
            },
            "done": {
              "type": "boolean",
              "description": "Whether the activity is done or not"
            },
            "file": {
              "type": "object",
              "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
            },
            "note": {
              "type": "string",
              "description": "The note of the activity (HTML format)"
            },
            "type": {
              "type": "string",
              "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
            },
            "series": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
            },
            "subject": {
              "type": "string",
              "description": "The subject of the activity"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user whom the activity is assigned to"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization this activity is associated with"
            },
            "rec_rule": {
              "type": "string",
              "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
            },
            "attendees": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
            },
            "busy_flag": {
              "type": "boolean",
              "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
            },
            "company_id": {
              "type": "integer",
              "description": "The user's company ID"
            },
            "deal_title": {
              "type": "string",
              "description": "The name of the deal this activity is associated with"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the user this activity is owned by"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Whether the activity is active or not"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person this activity is associated with"
            },
            "update_time": {
              "type": "string",
              "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
            },
            "participants": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "List of multiple persons (participants) this activity is associated with"
            },
            "reference_id": {
              "type": "integer",
              "description": "Together with the `reference_type`, gives the ID of the other object"
            },
            "gcal_event_id": {
              "type": "string",
              "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_route": {
              "type": "string",
              "description": "A subfield of the location field. Indicates street name."
            },
            "reference_type": {
              "type": "string",
              "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
            },
            "update_user_id": {
              "type": "integer",
              "description": "The ID of the user who was the last to update this activity"
            },
            "source_timezone": {
              "type": "string",
              "description": "The timezone the activity was created in an external calendar"
            },
            "deal_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the deal"
            },
            "location_country": {
              "type": "string",
              "description": "A subfield of the location field. Indicates country."
            },
            "location_locality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates city/town/village/locality."
            },
            "created_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created the activity"
            },
            "google_calendar_id": {
              "type": "string",
              "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "person_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the person"
            },
            "rec_rule_extension": {
              "type": "string",
              "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
            },
            "assigned_to_user_id": {
              "type": "integer",
              "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
            },
            "location_subpremise": {
              "type": "string",
              "description": "A subfield of the location field. Indicates apartment/suite number."
            },
            "marked_as_done_time": {
              "type": "string",
              "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
            },
            "google_calendar_etag": {
              "type": "string",
              "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_postal_code": {
              "type": "string",
              "description": "A subfield of the location field. Indicates ZIP/postal code."
            },
            "location_sublocality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates district/sublocality."
            },
            "conference_meeting_id": {
              "type": "string",
              "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
            },
            "conference_meeting_url": {
              "type": "string",
              "description": "The link to join the meeting which is associated with this activity"
            },
            "last_notification_time": {
              "type": "string",
              "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
            },
            "location_street_number": {
              "type": "string",
              "description": "A subfield of the location field. Indicates house number."
            },
            "rec_master_activity_id": {
              "type": "integer",
              "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
            },
            "notification_language_id": {
              "type": "integer",
              "description": "The ID of the language the notifications are sent in"
            },
            "conference_meeting_client": {
              "type": "string",
              "description": "The ID of the Marketplace app, which is connected to this activity"
            },
            "last_notification_user_id": {
              "type": "integer",
              "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
            },
            "location_formatted_address": {
              "type": "string",
              "description": "A subfield of the location field. Indicates full/combined address."
            },
            "location_admin_area_level_1": {
              "type": "string",
              "description": "A subfield of the location field. Indicates state/county."
            },
            "location_admin_area_level_2": {
              "type": "string",
              "description": "A subfield of the location field. Indicates region."
            },
            "calendar_sync_include_context": {
              "type": "string",
              "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
            }
          }
        }
      ],
      "title": "activityResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ActivitiesListUserActivitiesResponse
{
  "type": "object",
  "title": "getActivitiesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization this activity is associated with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal this activity is associated with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "The ID of the lead in the UUID format this activity is associated with"
              },
              "due_date": {
                "type": "string",
                "format": "date",
                "description": "The due date of the activity. Format: YYYY-MM-DD"
              },
              "due_time": {
                "type": "string",
                "description": "The due time of the activity in UTC. Format: HH:MM"
              },
              "duration": {
                "type": "string",
                "description": "The duration of the activity. Format: HH:MM"
              },
              "location": {
                "type": "string",
                "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person this activity is associated with"
              },
              "project_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the project this activity is associated with"
              },
              "public_description": {
                "type": "string",
                "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the activity, generated when the activity was created"
              },
              "done": {
                "type": "boolean",
                "description": "Whether the activity is done or not"
              },
              "file": {
                "type": "object",
                "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
              },
              "note": {
                "type": "string",
                "description": "The note of the activity (HTML format)"
              },
              "type": {
                "type": "string",
                "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
              },
              "subject": {
                "type": "string",
                "description": "The subject of the activity"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user whom the activity is assigned to"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization this activity is associated with"
              },
              "rec_rule": {
                "type": "string",
                "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
              },
              "attendees": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
              },
              "busy_flag": {
                "type": "boolean",
                "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
              },
              "company_id": {
                "type": "integer",
                "description": "The user's company ID"
              },
              "deal_title": {
                "type": "string",
                "description": "The name of the deal this activity is associated with"
              },
              "owner_name": {
                "type": "string",
                "description": "The name of the user this activity is owned by"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the activity is active or not"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person this activity is associated with"
              },
              "update_time": {
                "type": "string",
                "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "List of multiple persons (participants) this activity is associated with"
              },
              "reference_id": {
                "type": "integer",
                "description": "Together with the `reference_type`, gives the ID of the other object"
              },
              "gcal_event_id": {
                "type": "string",
                "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
              },
              "location_route": {
                "type": "string",
                "description": "A subfield of the location field. Indicates street name."
              },
              "reference_type": {
                "type": "string",
                "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
              },
              "update_user_id": {
                "type": "integer",
                "description": "The ID of the user who was the last to update this activity"
              },
              "source_timezone": {
                "type": "string",
                "description": "The timezone the activity was created in an external calendar"
              },
              "deal_dropbox_bcc": {
                "type": "string",
                "description": "The BCC email address of the deal"
              },
              "location_country": {
                "type": "string",
                "description": "A subfield of the location field. Indicates country."
              },
              "location_locality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates city/town/village/locality."
              },
              "created_by_user_id": {
                "type": "integer",
                "description": "The ID of the user who created the activity"
              },
              "google_calendar_id": {
                "type": "string",
                "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
              },
              "person_dropbox_bcc": {
                "type": "string",
                "description": "The BCC email address of the person"
              },
              "rec_rule_extension": {
                "type": "string",
                "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
              },
              "assigned_to_user_id": {
                "type": "integer",
                "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
              },
              "location_subpremise": {
                "type": "string",
                "description": "A subfield of the location field. Indicates apartment/suite number."
              },
              "marked_as_done_time": {
                "type": "string",
                "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
              },
              "google_calendar_etag": {
                "type": "string",
                "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
              },
              "location_postal_code": {
                "type": "string",
                "description": "A subfield of the location field. Indicates ZIP/postal code."
              },
              "location_sublocality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates district/sublocality."
              },
              "conference_meeting_id": {
                "type": "string",
                "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
              },
              "conference_meeting_url": {
                "type": "string",
                "description": "The link to join the meeting which is associated with this activity"
              },
              "last_notification_time": {
                "type": "string",
                "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
              },
              "location_street_number": {
                "type": "string",
                "description": "A subfield of the location field. Indicates house number."
              },
              "rec_master_activity_id": {
                "type": "integer",
                "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
              },
              "notification_language_id": {
                "type": "integer",
                "description": "The ID of the language the notifications are sent in"
              },
              "conference_meeting_client": {
                "type": "string",
                "description": "The ID of the Marketplace app, which is connected to this activity"
              },
              "last_notification_user_id": {
                "type": "integer",
                "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
              },
              "location_formatted_address": {
                "type": "string",
                "description": "A subfield of the location field. Indicates full/combined address."
              },
              "location_admin_area_level_1": {
                "type": "string",
                "description": "A subfield of the location field. Indicates state/county."
              },
              "location_admin_area_level_2": {
                "type": "string",
                "description": "A subfield of the location field. Indicates region."
              },
              "calendar_sync_include_context": {
                "type": "string",
                "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
              }
            }
          }
        ],
        "title": "activityResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "next_start": {
              "type": "integer",
              "description": "Next pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "Whether there are more list items in the collection than displayed"
            }
          },
          "description": "Pagination details of the list"
        }
      }
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ActivitiesMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteActivityResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the activity that was deleted"
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object ActivitiesUpdateActivityDetailsRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization this activity is associated with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal this activity is associated with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "nullable": true,
          "description": "The ID of the lead in the UUID format this activity is associated with"
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The due date of the activity. Format: YYYY-MM-DD"
        },
        "due_time": {
          "type": "string",
          "description": "The due time of the activity in UTC. Format: HH:MM"
        },
        "duration": {
          "type": "string",
          "description": "The duration of the activity. Format: HH:MM"
        },
        "location": {
          "type": "string",
          "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person this activity is associated with"
        },
        "project_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the project this activity is associated with"
        },
        "public_description": {
          "type": "string",
          "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "done": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Whether the activity is done or not. 0 = Not done, 1 = Done"
        },
        "note": {
          "type": "string",
          "description": "The note of the activity (HTML format)"
        },
        "type": {
          "type": "string",
          "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
        },
        "subject": {
          "type": "string",
          "description": "The subject of the activity"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user whom the activity is assigned to"
        },
        "attendees": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. It requires a structure as follows: `[{\"email_address\":\"mail@example.org\"}]` or `[{\"person_id\":1, \"email_address\":\"mail@example.org\"}]`"
        },
        "busy_flag": {
          "type": "boolean",
          "description": "Set the activity as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with `null`. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
        },
        "participants": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "List of multiple persons (participants) this activity is associated with. It requires a structure as follows: `[{\"person_id\":1,\"primary_flag\":true}]`"
        }
      }
    }
  ],
  "title": "updateActivityRequest"
}
object ActivitiesUpdateActivityDetailsResponse
{
  "type": "object",
  "title": "updateActivityResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization this activity is associated with"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this activity is associated with"
            },
            "lead_id": {
              "type": "string",
              "format": "uuid",
              "nullable": true,
              "description": "The ID of the lead in the UUID format this activity is associated with"
            },
            "due_date": {
              "type": "string",
              "format": "date",
              "description": "The due date of the activity. Format: YYYY-MM-DD"
            },
            "due_time": {
              "type": "string",
              "description": "The due time of the activity in UTC. Format: HH:MM"
            },
            "duration": {
              "type": "string",
              "description": "The duration of the activity. Format: HH:MM"
            },
            "location": {
              "type": "string",
              "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person this activity is associated with"
            },
            "project_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the project this activity is associated with"
            },
            "public_description": {
              "type": "string",
              "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity, generated when the activity was created"
            },
            "done": {
              "type": "boolean",
              "description": "Whether the activity is done or not"
            },
            "file": {
              "type": "object",
              "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
            },
            "note": {
              "type": "string",
              "description": "The note of the activity (HTML format)"
            },
            "type": {
              "type": "string",
              "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
            },
            "series": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
            },
            "subject": {
              "type": "string",
              "description": "The subject of the activity"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user whom the activity is assigned to"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization this activity is associated with"
            },
            "rec_rule": {
              "type": "string",
              "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
            },
            "attendees": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
            },
            "busy_flag": {
              "type": "boolean",
              "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
            },
            "company_id": {
              "type": "integer",
              "description": "The user's company ID"
            },
            "deal_title": {
              "type": "string",
              "description": "The name of the deal this activity is associated with"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the user this activity is owned by"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Whether the activity is active or not"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person this activity is associated with"
            },
            "update_time": {
              "type": "string",
              "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
            },
            "participants": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "List of multiple persons (participants) this activity is associated with"
            },
            "reference_id": {
              "type": "integer",
              "description": "Together with the `reference_type`, gives the ID of the other object"
            },
            "gcal_event_id": {
              "type": "string",
              "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_route": {
              "type": "string",
              "description": "A subfield of the location field. Indicates street name."
            },
            "reference_type": {
              "type": "string",
              "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
            },
            "update_user_id": {
              "type": "integer",
              "description": "The ID of the user who was the last to update this activity"
            },
            "source_timezone": {
              "type": "string",
              "description": "The timezone the activity was created in an external calendar"
            },
            "deal_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the deal"
            },
            "location_country": {
              "type": "string",
              "description": "A subfield of the location field. Indicates country."
            },
            "location_locality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates city/town/village/locality."
            },
            "created_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created the activity"
            },
            "google_calendar_id": {
              "type": "string",
              "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "person_dropbox_bcc": {
              "type": "string",
              "description": "The BCC email address of the person"
            },
            "rec_rule_extension": {
              "type": "string",
              "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
            },
            "assigned_to_user_id": {
              "type": "integer",
              "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
            },
            "location_subpremise": {
              "type": "string",
              "description": "A subfield of the location field. Indicates apartment/suite number."
            },
            "marked_as_done_time": {
              "type": "string",
              "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
            },
            "google_calendar_etag": {
              "type": "string",
              "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
            },
            "location_postal_code": {
              "type": "string",
              "description": "A subfield of the location field. Indicates ZIP/postal code."
            },
            "location_sublocality": {
              "type": "string",
              "description": "A subfield of the location field. Indicates district/sublocality."
            },
            "conference_meeting_id": {
              "type": "string",
              "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
            },
            "conference_meeting_url": {
              "type": "string",
              "description": "The link to join the meeting which is associated with this activity"
            },
            "last_notification_time": {
              "type": "string",
              "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
            },
            "location_street_number": {
              "type": "string",
              "description": "A subfield of the location field. Indicates house number."
            },
            "rec_master_activity_id": {
              "type": "integer",
              "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
            },
            "notification_language_id": {
              "type": "integer",
              "description": "The ID of the language the notifications are sent in"
            },
            "conference_meeting_client": {
              "type": "string",
              "description": "The ID of the Marketplace app, which is connected to this activity"
            },
            "last_notification_user_id": {
              "type": "integer",
              "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
            },
            "location_formatted_address": {
              "type": "string",
              "description": "A subfield of the location field. Indicates full/combined address."
            },
            "location_admin_area_level_1": {
              "type": "string",
              "description": "A subfield of the location field. Indicates state/county."
            },
            "location_admin_area_level_2": {
              "type": "string",
              "description": "A subfield of the location field. Indicates region."
            },
            "calendar_sync_include_context": {
              "type": "string",
              "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
            }
          }
        }
      ],
      "title": "activityResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ActivityFieldsGetAllResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the field. Value is `null` in case of subfields."
              },
              "key": {
                "type": "string",
                "description": "The key of the field. For custom fields this is generated upon creation."
              },
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "The options of the field. When there are no options, `null` is returned."
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the field"
              },
              "order_nr": {
                "type": "integer",
                "description": "The order number of the field"
              },
              "edit_flag": {
                "type": "boolean",
                "description": "The edit flag of the field"
              },
              "subfields": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The subfields of the field. Only present when the field has subfields."
              },
              "field_type": {
                "allOf": [
                  {
                    "enum": [
                      "address",
                      "date",
                      "daterange",
                      "double",
                      "enum",
                      "monetary",
                      "org",
                      "people",
                      "phone",
                      "set",
                      "text",
                      "time",
                      "timerange",
                      "user",
                      "varchar",
                      "varchar_auto",
                      "visible_to"
                    ],
                    "type": "string",
                    "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                  }
                ]
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the field"
              },
              "is_subfield": {
                "type": "boolean",
                "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the field"
              },
              "sortable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be sorted by this field"
              },
              "important_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the field is mandatory"
              },
              "options_deleted": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
              },
              "searchable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be searched by this field"
              },
              "add_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Whether or not the field of an item can be edited in bulk"
              },
              "filtering_allowed": {
                "type": "boolean",
                "description": "Whether or not items can be filtered by this field"
              },
              "index_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "details_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "last_updated_by_user_id": {
                "type": "integer",
                "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "fieldsResponse200"
}
object ActivityTypesAddNewTypeRequest
{
  "type": "object",
  "title": "addActivityTypeRequest",
  "required": [
    "name",
    "icon_key"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "call",
      "description": "The name of the activity type"
    },
    "color": {
      "type": "string",
      "example": "FFFFFF",
      "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
    },
    "icon_key": {
      "enum": [
        "task",
        "email",
        "meeting",
        "deadline",
        "call",
        "lunch",
        "calendar",
        "downarrow",
        "document",
        "smartphone",
        "camera",
        "scissors",
        "cogs",
        "bubble",
        "uparrow",
        "checkbox",
        "signpost",
        "shuffle",
        "addressbook",
        "linegraph",
        "picture",
        "car",
        "world",
        "search",
        "clip",
        "sound",
        "brush",
        "key",
        "padlock",
        "pricetag",
        "suitcase",
        "finish",
        "plane",
        "loop",
        "wifi",
        "truck",
        "cart",
        "bulb",
        "bell",
        "presentation"
      ],
      "type": "string",
      "description": "Icon graphic to use for representing this activity type"
    }
  }
}
object ActivityTypesAddNewTypeResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity type"
            },
            "name": {
              "type": "string",
              "description": "The name of the activity type"
            },
            "color": {
              "type": "string",
              "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the activity type"
            },
            "icon_key": {
              "enum": [
                "task",
                "email",
                "meeting",
                "deadline",
                "call",
                "lunch",
                "calendar",
                "downarrow",
                "document",
                "smartphone",
                "camera",
                "scissors",
                "cogs",
                "bubble",
                "uparrow",
                "checkbox",
                "signpost",
                "shuffle",
                "addressbook",
                "linegraph",
                "picture",
                "car",
                "world",
                "search",
                "clip",
                "sound",
                "brush",
                "key",
                "padlock",
                "pricetag",
                "suitcase",
                "finish",
                "plane",
                "loop",
                "wifi",
                "truck",
                "cart",
                "bulb",
                "bell",
                "presentation"
              ],
              "type": "string",
              "description": "Icon graphic to use for representing this activity type"
            },
            "order_nr": {
              "type": "integer",
              "description": "An order number for the activity type. Order numbers should be used to order the types in the activity type selections."
            },
            "key_string": {
              "type": "string",
              "description": "A string that is generated by the API based on the given name of the activity type upon creation"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the activity type"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the activity type"
            },
            "is_custom_flag": {
              "type": "boolean",
              "description": "Whether the activity type is a custom one or not"
            }
          }
        }
      }
    }
  ],
  "title": "createUpdateDeleteActivityTypeResponse200"
}
object ActivityTypesListAllActivityTypesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the activity type"
              },
              "name": {
                "type": "string",
                "description": "The name of the activity type"
              },
              "color": {
                "type": "string",
                "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the activity type"
              },
              "icon_key": {
                "enum": [
                  "task",
                  "email",
                  "meeting",
                  "deadline",
                  "call",
                  "lunch",
                  "calendar",
                  "downarrow",
                  "document",
                  "smartphone",
                  "camera",
                  "scissors",
                  "cogs",
                  "bubble",
                  "uparrow",
                  "checkbox",
                  "signpost",
                  "shuffle",
                  "addressbook",
                  "linegraph",
                  "picture",
                  "car",
                  "world",
                  "search",
                  "clip",
                  "sound",
                  "brush",
                  "key",
                  "padlock",
                  "pricetag",
                  "suitcase",
                  "finish",
                  "plane",
                  "loop",
                  "wifi",
                  "truck",
                  "cart",
                  "bulb",
                  "bell",
                  "presentation"
                ],
                "type": "string",
                "description": "Icon graphic to use for representing this activity type"
              },
              "order_nr": {
                "type": "integer",
                "description": "An order number for the activity type. Order numbers should be used to order the types in the activity type selections."
              },
              "key_string": {
                "type": "string",
                "description": "A string that is generated by the API based on the given name of the activity type upon creation"
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the activity type"
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the activity type"
              },
              "is_custom_flag": {
                "type": "boolean",
                "description": "Whether the activity type is a custom one or not"
              }
            }
          },
          "description": "The array of activity types"
        }
      }
    }
  ],
  "title": "getActivityTypesResponse200"
}
object ActivityTypesMarkAsDeletedBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The IDs of the deleted activity types"
            }
          }
        }
      }
    }
  ],
  "title": "deleteActivityTypesResponse200"
}
object ActivityTypesMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity type"
            },
            "name": {
              "type": "string",
              "description": "The name of the activity type"
            },
            "color": {
              "type": "string",
              "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the activity type"
            },
            "icon_key": {
              "enum": [
                "task",
                "email",
                "meeting",
                "deadline",
                "call",
                "lunch",
                "calendar",
                "downarrow",
                "document",
                "smartphone",
                "camera",
                "scissors",
                "cogs",
                "bubble",
                "uparrow",
                "checkbox",
                "signpost",
                "shuffle",
                "addressbook",
                "linegraph",
                "picture",
                "car",
                "world",
                "search",
                "clip",
                "sound",
                "brush",
                "key",
                "padlock",
                "pricetag",
                "suitcase",
                "finish",
                "plane",
                "loop",
                "wifi",
                "truck",
                "cart",
                "bulb",
                "bell",
                "presentation"
              ],
              "type": "string",
              "description": "Icon graphic to use for representing this activity type"
            },
            "order_nr": {
              "type": "integer",
              "description": "An order number for the activity type. Order numbers should be used to order the types in the activity type selections."
            },
            "key_string": {
              "type": "string",
              "description": "A string that is generated by the API based on the given name of the activity type upon creation"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the activity type"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the activity type"
            },
            "is_custom_flag": {
              "type": "boolean",
              "description": "Whether the activity type is a custom one or not"
            }
          }
        }
      }
    }
  ],
  "title": "createUpdateDeleteActivityTypeResponse200"
}
object ActivityTypesUpdateTypeRequest
{
  "type": "object",
  "title": "updateActivityTypeRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the activity type"
    },
    "color": {
      "type": "string",
      "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
    },
    "icon_key": {
      "enum": [
        "task",
        "email",
        "meeting",
        "deadline",
        "call",
        "lunch",
        "calendar",
        "downarrow",
        "document",
        "smartphone",
        "camera",
        "scissors",
        "cogs",
        "bubble",
        "uparrow",
        "checkbox",
        "signpost",
        "shuffle",
        "addressbook",
        "linegraph",
        "picture",
        "car",
        "world",
        "search",
        "clip",
        "sound",
        "brush",
        "key",
        "padlock",
        "pricetag",
        "suitcase",
        "finish",
        "plane",
        "loop",
        "wifi",
        "truck",
        "cart",
        "bulb",
        "bell",
        "presentation"
      ],
      "type": "string",
      "description": "Icon graphic to use for representing this activity type"
    },
    "order_nr": {
      "type": "integer",
      "description": "An order number for this activity type. Order numbers should be used to order the types in the activity type selections."
    }
  }
}
object ActivityTypesUpdateTypeResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the activity type"
            },
            "name": {
              "type": "string",
              "description": "The name of the activity type"
            },
            "color": {
              "type": "string",
              "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the activity type"
            },
            "icon_key": {
              "enum": [
                "task",
                "email",
                "meeting",
                "deadline",
                "call",
                "lunch",
                "calendar",
                "downarrow",
                "document",
                "smartphone",
                "camera",
                "scissors",
                "cogs",
                "bubble",
                "uparrow",
                "checkbox",
                "signpost",
                "shuffle",
                "addressbook",
                "linegraph",
                "picture",
                "car",
                "world",
                "search",
                "clip",
                "sound",
                "brush",
                "key",
                "padlock",
                "pricetag",
                "suitcase",
                "finish",
                "plane",
                "loop",
                "wifi",
                "truck",
                "cart",
                "bulb",
                "bell",
                "presentation"
              ],
              "type": "string",
              "description": "Icon graphic to use for representing this activity type"
            },
            "order_nr": {
              "type": "integer",
              "description": "An order number for the activity type. Order numbers should be used to order the types in the activity type selections."
            },
            "key_string": {
              "type": "string",
              "description": "A string that is generated by the API based on the given name of the activity type upon creation"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the activity type"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the activity type"
            },
            "is_custom_flag": {
              "type": "boolean",
              "description": "Whether the activity type is a custom one or not"
            }
          }
        }
      }
    }
  ],
  "title": "createUpdateDeleteActivityTypeResponse200"
}
object BillingGetAddonsForSingleCompanyResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "An array of add-ons that the company has."
        }
      }
    }
  ],
  "title": "subscriptionAddonsResponse200"
}
object CallLogsAddNewLog400Response
{
  "type": "object",
  "title": "callLogResponse400",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "\"outcome\" is required.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAddNewLog403Response
{
  "type": "object",
  "title": "callLogResponse403",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "You don't have permission to change this resource.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAddNewLog404Response
{
  "type": "object",
  "title": "callLogResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "A resource required for this operation was not found.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAddNewLog500Response
{
  "type": "object",
  "title": "callLogResponse500",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "An internal server error occurred",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAddNewLogRequest
{
  "type": "object",
  "title": "addCallLogRequest",
  "required": [
    "to_phone_number",
    "outcome",
    "start_time",
    "end_time"
  ],
  "properties": {
    "note": {
      "type": "string",
      "description": "The note for the call log in HTML format"
    },
    "org_id": {
      "type": "integer",
      "description": "The ID of the organization this call is associated with"
    },
    "deal_id": {
      "type": "integer",
      "description": "The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
    },
    "lead_id": {
      "type": "string",
      "format": "uuid",
      "description": "The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
    },
    "outcome": {
      "enum": [
        "connected",
        "no_answer",
        "left_message",
        "left_voicemail",
        "wrong_number",
        "busy"
      ],
      "type": "string",
      "description": "Describes the outcome of the call"
    },
    "subject": {
      "type": "string",
      "description": "The name of the activity this call is attached to"
    },
    "user_id": {
      "type": "integer",
      "description": "The ID of the owner of the call log. Please note that a user without account settings access cannot create call logs for other users."
    },
    "duration": {
      "type": "string",
      "description": "The duration of the call in seconds"
    },
    "end_time": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
    },
    "person_id": {
      "type": "integer",
      "description": "The ID of the person this call is associated with"
    },
    "start_time": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
    },
    "activity_id": {
      "type": "integer",
      "description": "If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don't need to specify `deal_id`, `person_id` or `org_id`, as they will be ignored in favor of the values already available in the activity. The `activity_id` must refer to a `call` type activity."
    },
    "to_phone_number": {
      "type": "string",
      "description": "The number called"
    },
    "from_phone_number": {
      "type": "string",
      "description": "The number that made the call"
    }
  }
}
object CallLogsAddNewLogResponse
{
  "type": "object",
  "title": "callLogResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "title": "addCallLogRequest",
          "required": [
            "to_phone_number",
            "outcome",
            "start_time",
            "end_time"
          ],
          "properties": {
            "note": {
              "type": "string",
              "description": "The note for the call log in HTML format"
            },
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization this call is associated with"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
            },
            "lead_id": {
              "type": "string",
              "format": "uuid",
              "description": "The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
            },
            "outcome": {
              "enum": [
                "connected",
                "no_answer",
                "left_message",
                "left_voicemail",
                "wrong_number",
                "busy"
              ],
              "type": "string",
              "description": "Describes the outcome of the call"
            },
            "subject": {
              "type": "string",
              "description": "The name of the activity this call is attached to"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the owner of the call log. Please note that a user without account settings access cannot create call logs for other users."
            },
            "duration": {
              "type": "string",
              "description": "The duration of the call in seconds"
            },
            "end_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person this call is associated with"
            },
            "start_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "activity_id": {
              "type": "integer",
              "description": "If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don't need to specify `deal_id`, `person_id` or `org_id`, as they will be ignored in favor of the values already available in the activity. The `activity_id` must refer to a `call` type activity."
            },
            "to_phone_number": {
              "type": "string",
              "description": "The number called"
            },
            "from_phone_number": {
              "type": "string",
              "description": "The number that made the call"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The call log ID, generated when the call log was created"
            },
            "company_id": {
              "type": "integer",
              "description": "The company ID of the owner of the call log"
            },
            "has_recording": {
              "type": "boolean",
              "description": "If the call log has an audio recording attached, the value should be true"
            }
          }
        }
      ],
      "title": "responseCallLogObject"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object CallLogsAttachRecording404Response
{
  "type": "object",
  "title": "callLogResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "A resource required for this operation was not found.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAttachRecording409Response
{
  "type": "object",
  "title": "callLogResponse409",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "A recording for this call already exists",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAttachRecording500Response
{
  "type": "object",
  "title": "callLogResponse500",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "An internal server error occurred",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsAttachRecordingRequest
{
  "type": "object",
  "title": "addCallLogAudioFileRequest",
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "Audio file supported by the HTML5 specification"
    }
  }
}
object CallLogsAttachRecordingResponse
{
  "type": "object",
  "title": "baseResponse",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object CallLogsDeleteLog403Response
{
  "type": "object",
  "title": "callLogResponse403",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "You don't have permission to change this resource.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsDeleteLog404Response
{
  "type": "object",
  "title": "callLogResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "A resource required for this operation was not found.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsDeleteLog410Response
{
  "type": "object",
  "title": "callLogResponse410",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "The callLog you are trying to access is no longer available",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsDeleteLog500Response
{
  "type": "object",
  "title": "callLogResponse500",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "An internal server error occurred",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsDeleteLogResponse
{
  "type": "object",
  "title": "baseResponse",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object CallLogsGetAllLogsResponse
{
  "type": "object",
  "title": "callLogsResponse",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "title": "addCallLogRequest",
            "required": [
              "to_phone_number",
              "outcome",
              "start_time",
              "end_time"
            ],
            "properties": {
              "note": {
                "type": "string",
                "description": "The note for the call log in HTML format"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization this call is associated with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
              },
              "outcome": {
                "enum": [
                  "connected",
                  "no_answer",
                  "left_message",
                  "left_voicemail",
                  "wrong_number",
                  "busy"
                ],
                "type": "string",
                "description": "Describes the outcome of the call"
              },
              "subject": {
                "type": "string",
                "description": "The name of the activity this call is attached to"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the owner of the call log. Please note that a user without account settings access cannot create call logs for other users."
              },
              "duration": {
                "type": "string",
                "description": "The duration of the call in seconds"
              },
              "end_time": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person this call is associated with"
              },
              "start_time": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "activity_id": {
                "type": "integer",
                "description": "If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don't need to specify `deal_id`, `person_id` or `org_id`, as they will be ignored in favor of the values already available in the activity. The `activity_id` must refer to a `call` type activity."
              },
              "to_phone_number": {
                "type": "string",
                "description": "The number called"
              },
              "from_phone_number": {
                "type": "string",
                "description": "The number that made the call"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The call log ID, generated when the call log was created"
              },
              "company_id": {
                "type": "integer",
                "description": "The company ID of the owner of the call log"
              },
              "has_recording": {
                "type": "boolean",
                "description": "If the call log has an audio recording attached, the value should be true"
              }
            }
          }
        ],
        "title": "responseCallLogObject"
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  }
}
object CallLogsGetDetails404Response
{
  "type": "object",
  "title": "callLogResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "example": "A resource required for this operation was not found.",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check developers.pipedrive.com for more information about Pipedrive API.",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object CallLogsGetDetailsResponse
{
  "type": "object",
  "title": "callLogResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "title": "addCallLogRequest",
          "required": [
            "to_phone_number",
            "outcome",
            "start_time",
            "end_time"
          ],
          "properties": {
            "note": {
              "type": "string",
              "description": "The note for the call log in HTML format"
            },
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization this call is associated with"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
            },
            "lead_id": {
              "type": "string",
              "format": "uuid",
              "description": "The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once."
            },
            "outcome": {
              "enum": [
                "connected",
                "no_answer",
                "left_message",
                "left_voicemail",
                "wrong_number",
                "busy"
              ],
              "type": "string",
              "description": "Describes the outcome of the call"
            },
            "subject": {
              "type": "string",
              "description": "The name of the activity this call is attached to"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the owner of the call log. Please note that a user without account settings access cannot create call logs for other users."
            },
            "duration": {
              "type": "string",
              "description": "The duration of the call in seconds"
            },
            "end_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person this call is associated with"
            },
            "start_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "activity_id": {
              "type": "integer",
              "description": "If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don't need to specify `deal_id`, `person_id` or `org_id`, as they will be ignored in favor of the values already available in the activity. The `activity_id` must refer to a `call` type activity."
            },
            "to_phone_number": {
              "type": "string",
              "description": "The number called"
            },
            "from_phone_number": {
              "type": "string",
              "description": "The number that made the call"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The call log ID, generated when the call log was created"
            },
            "company_id": {
              "type": "integer",
              "description": "The company ID of the owner of the call log"
            },
            "has_recording": {
              "type": "boolean",
              "description": "If the call log has an audio recording attached, the value should be true"
            }
          }
        }
      ],
      "title": "responseCallLogObject"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ChannelsCreateNewChannel400Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Expected { name: string; avatar_url?: string; provider_channel_id: string; }, but was incompatible",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "INVALID_BODY",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsCreateNewChannel403Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Only admins can register channels",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "ADMIN_ONLY",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsCreateNewChannelRequest
{
  "type": "object",
  "required": [
    "name",
    "provider_channel_id"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "My Channel",
      "description": "The name of the channel"
    },
    "avatar_url": {
      "type": "string",
      "format": "url",
      "description": "The URL for an icon that represents your channel"
    },
    "provider_type": {
      "enum": [
        "facebook",
        "whatsapp",
        "other"
      ],
      "type": "string",
      "default": "other",
      "description": "It controls the icons (like the icon next to the conversation)"
    },
    "template_support": {
      "type": "boolean",
      "default": false,
      "description": "If true, enables templates logic on UI. Requires getTemplates endpoint implemented. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension)."
    },
    "provider_channel_id": {
      "type": "string",
      "description": "The channel ID"
    }
  }
}
object ChannelsCreateNewChannelResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique channel ID used internally in omnichannel-api and the frontend of the extension"
        },
        "name": {
          "type": "string",
          "example": "My Channel",
          "description": "The name of the channel"
        },
        "avatar_url": {
          "type": "string",
          "example": "http://some-domain.com/test.jpg",
          "description": "The URL for an icon that represents your channel"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when your channel was created in the API"
        },
        "pd_user_id": {
          "type": "integer",
          "example": 1,
          "description": "The ID of the user in Pipedrive"
        },
        "pd_company_id": {
          "type": "integer",
          "example": 1,
          "description": "The ID of the user's company in Pipedrive"
        },
        "provider_type": {
          "enum": [
            "facebook",
            "whatsapp",
            "other"
          ],
          "type": "string",
          "description": "Value of the provider_type sent to this endpoint"
        },
        "template_support": {
          "type": "boolean",
          "description": "Value of the template_support sent to this endpoint"
        },
        "provider_channel_id": {
          "type": "string",
          "format": "string",
          "description": "The channel ID you specified while creating the channel"
        },
        "marketplace_client_id": {
          "type": "string",
          "description": "The client_id of your app in Pipedrive marketplace"
        }
      }
    },
    "success": {
      "type": "boolean",
      "example": true
    }
  }
}
object ChannelsDeleteChannelById400Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Expected { name: string; avatar_url?: string; provider_channel_id: string; }, but was incompatible",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "INVALID_BODY",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsDeleteChannelByIdResponse
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "example": true
    }
  }
}
object ChannelsDeleteConversation403Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Only the app owner can delete conversations",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "FORBIDDEN_USER_REQUEST",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsDeleteConversation404Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Channel not found.",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "NOT_FOUND",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsDeleteConversationResponse
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "example": true
    }
  }
}
object ChannelsReceiveMessage400Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Expected { id: string; sender_id: string; conversation_id: string; conversation_link?: string; channel_id: string; created_at: string; message: string; status: unknown; attachments: { id: string; type: string; name: string | null; size: number | null; url: string; preview_url: string | null; }[]; reply_by?: string | null; }, but was incompatible",
      "description": "The error description"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "example": "Please check the reference docs in https://developers.pipedrive.com/docs/api/v1"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "INVALID_RECEIVE_MESSAGE_PAYLOAD",
          "description": "An error code sent by the API"
        }
      }
    }
  }
}
object ChannelsReceiveMessageRequest
{
  "type": "object",
  "required": [
    "id",
    "channel_id",
    "sender_id",
    "conversation_id",
    "message",
    "status",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the message"
    },
    "status": {
      "enum": [
        "sent",
        "delivered",
        "read",
        "failed"
      ],
      "type": "string",
      "description": "The status of the message"
    },
    "message": {
      "type": "string",
      "description": "The body of the message"
    },
    "reply_by": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the message can no longer receive a reply, in UTC. Format: YYYY-MM-DD HH:MM"
    },
    "sender_id": {
      "type": "string",
      "description": "The ID of the provider's user that sent the message"
    },
    "channel_id": {
      "type": "string",
      "description": "The channel ID as in the provider"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the message was created in the provider, in UTC. Format: YYYY-MM-DD HH:MM"
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "type",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the attachment"
          },
          "url": {
            "type": "string",
            "description": "A URL to the file"
          },
          "name": {
            "type": "string",
            "description": "The name of the attachment"
          },
          "size": {
            "type": "number",
            "description": "The size of the attachment"
          },
          "type": {
            "type": "string",
            "description": "The mime-type of the attachment"
          },
          "preview_url": {
            "type": "string",
            "description": "A URL to a preview picture of the file"
          },
          "link_expires": {
            "type": "boolean",
            "default": false,
            "description": "If true, it will use the getMessageById endpoint for fetching updated attachment's urls. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension)"
          }
        }
      },
      "description": "The list of attachments available in the message"
    },
    "conversation_id": {
      "type": "string",
      "description": "The ID of the conversation"
    },
    "conversation_link": {
      "type": "string",
      "format": "url",
      "description": "A URL that can open the conversation in the provider's side"
    }
  }
}
object ChannelsReceiveMessageResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "id",
        "channel_id",
        "sender_id",
        "conversation_id",
        "message",
        "status",
        "created_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the message"
        },
        "status": {
          "enum": [
            "sent",
            "delivered",
            "read",
            "failed"
          ],
          "type": "string",
          "description": "The status of the message"
        },
        "message": {
          "type": "string",
          "description": "The body of the message"
        },
        "reply_by": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the message can no longer receive a reply, in UTC. Format: YYYY-MM-DD HH:MM"
        },
        "sender_id": {
          "type": "string",
          "description": "The ID of the provider's user that sent the message"
        },
        "channel_id": {
          "type": "string",
          "description": "The channel ID as in the provider"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the message was created in the provider, in UTC. Format: YYYY-MM-DD HH:MM"
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "type",
              "url"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the attachment"
              },
              "url": {
                "type": "string",
                "description": "A URL to the file"
              },
              "name": {
                "type": "string",
                "description": "The name of the attachment"
              },
              "size": {
                "type": "number",
                "description": "The size of the attachment"
              },
              "type": {
                "type": "string",
                "description": "The mime-type of the attachment"
              },
              "preview_url": {
                "type": "string",
                "description": "A URL to a preview picture of the file"
              },
              "link_expires": {
                "type": "boolean",
                "default": false,
                "description": "If true, it will use the getMessageById endpoint for fetching updated attachment's urls. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension)"
              }
            }
          },
          "description": "The list of attachments available in the message"
        },
        "conversation_id": {
          "type": "string",
          "description": "The ID of the conversation"
        },
        "conversation_link": {
          "type": "string",
          "format": "url",
          "description": "A URL that can open the conversation in the provider's side"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object CurrenciesGetAllSupportedResponse
{
  "type": "object",
  "title": "getCurrenciesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the currency"
          },
          "code": {
            "type": "string",
            "description": "The code of the currency"
          },
          "name": {
            "type": "string",
            "description": "The name of the currency"
          },
          "symbol": {
            "type": "string",
            "description": "The symbol of the currency"
          },
          "active_flag": {
            "type": "boolean",
            "description": "Whether the currency is active or not"
          },
          "decimal_points": {
            "type": "integer",
            "description": "The amount of decimal points of the currency"
          },
          "is_custom_flag": {
            "type": "boolean",
            "description": "Whether the currency is a custom one or not"
          }
        }
      },
      "description": "The array of currencies"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealFieldsAddNewFieldRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. Example: `[{\"label\":\"New Item\"}]`"
        },
        "add_visible_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether the field is available in the 'add new' modal or not (both in the web and mobile app)"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "field_type"
      ],
      "properties": {
        "field_type": {
          "enum": [
            "address",
            "date",
            "daterange",
            "double",
            "enum",
            "monetary",
            "org",
            "people",
            "phone",
            "set",
            "text",
            "time",
            "timerange",
            "user",
            "varchar",
            "varchar_auto",
            "visible_to"
          ],
          "type": "string",
          "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
        }
      }
    }
  ],
  "title": "createFieldRequest"
}
object DealFieldsAddNewFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object DealFieldsDeleteMultipleBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The list of deleted field IDs"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldsResponse200"
}
object DealFieldsGetAllFieldsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the field. Value is `null` in case of subfields."
              },
              "key": {
                "type": "string",
                "description": "The key of the field. For custom fields this is generated upon creation."
              },
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "The options of the field. When there are no options, `null` is returned."
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the field"
              },
              "order_nr": {
                "type": "integer",
                "description": "The order number of the field"
              },
              "edit_flag": {
                "type": "boolean",
                "description": "The edit flag of the field"
              },
              "subfields": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The subfields of the field. Only present when the field has subfields."
              },
              "field_type": {
                "allOf": [
                  {
                    "enum": [
                      "address",
                      "date",
                      "daterange",
                      "double",
                      "enum",
                      "monetary",
                      "org",
                      "people",
                      "phone",
                      "set",
                      "text",
                      "time",
                      "timerange",
                      "user",
                      "varchar",
                      "varchar_auto",
                      "visible_to"
                    ],
                    "type": "string",
                    "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                  }
                ]
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the field"
              },
              "is_subfield": {
                "type": "boolean",
                "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the field"
              },
              "sortable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be sorted by this field"
              },
              "important_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the field is mandatory"
              },
              "options_deleted": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
              },
              "searchable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be searched by this field"
              },
              "add_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Whether or not the field of an item can be edited in bulk"
              },
              "filtering_allowed": {
                "type": "boolean",
                "description": "Whether or not items can be filtered by this field"
              },
              "index_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "details_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "last_updated_by_user_id": {
                "type": "integer",
                "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "fieldsResponse200"
}
object DealFieldsGetOneFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object DealFieldsMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field that was deleted"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldResponse200"
}
object DealFieldsUpdateFieldRequest
{
  "type": "object",
  "title": "updateFieldRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the field"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: `[{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}]`"
    },
    "add_visible_flag": {
      "type": "boolean",
      "default": true,
      "description": "Whether the field is available in 'add new' modal or not (both in web and mobile app)"
    }
  }
}
object DealFieldsUpdateFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object DealsAddFollowerRequest
{
  "type": "object",
  "title": "addDealFollowerRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object DealsAddFollowerResponse
{
  "type": "object",
  "title": "addDealFollowerResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The follower ID"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal which the follower was added to"
        },
        "user_id": {
          "type": "integer",
          "description": "The user ID who added the follower"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the deal follower was added"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsAddParticipantRequest
{
  "type": "object",
  "title": "addDealParticipantRequest",
  "required": [
    "person_id"
  ],
  "properties": {
    "person_id": {
      "type": "integer",
      "description": "The ID of the person"
    }
  }
}
object DealsAddParticipantResponse
{
  "type": "object",
  "title": "addDealParticipantResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the person"
                },
                "email": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "Email"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if email is primary for the person or not"
                      }
                    }
                  },
                  "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the person"
                },
                "phone": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "The phone number"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if phone number is primary for the person or not"
                      }
                    }
                  },
                  "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the person"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the person"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the person"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first letter of the name of the person"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the owner associated with the person"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the person"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the person is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The name of the organization associated with the item"
                                    },
                                    "address": {
                                      "type": "string",
                                      "description": "The address of the organization"
                                    },
                                    "cc_email": {
                                      "type": "string",
                                      "description": "The BCC email of the organization associated with the item"
                                    },
                                    "owner_id": {
                                      "type": "integer",
                                      "description": "The ID of the owner of the organization that is associated with the item"
                                    },
                                    "people_count": {
                                      "type": "integer",
                                      "description": "The number of people connected with the organization that is associated with the item"
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "description": "The ID of the organization"
                                    }
                                  }
                                }
                              ],
                              "title": "relationshipOrganizationInfoItem"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the associated organization is active or not"
                                }
                              }
                            }
                          ],
                          "title": "relationshipOrganizationInfoItemWithActiveFlag"
                        },
                        "owner_id": {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "The ID of the user"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the user"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The email of the user"
                                },
                                "has_pic": {
                                  "type": "integer",
                                  "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                },
                                "pic_hash": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The user picture hash"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the user is active or not"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the owner"
                                }
                              }
                            }
                          ],
                          "title": "owner"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the person"
                        },
                        "last_name": {
                          "type": "string",
                          "description": "The last name of the person"
                        },
                        "first_name": {
                          "type": "string",
                          "description": "The first name of the person"
                        }
                      }
                    }
                  ],
                  "title": "personNameInfoWithOrgAndOwnerId"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "files_count": {
                              "type": "integer",
                              "description": "The count of files related to the person"
                            },
                            "notes_count": {
                              "type": "integer",
                              "description": "The count of notes related to the person"
                            },
                            "followers_count": {
                              "type": "integer",
                              "description": "The count of followers related to the person"
                            },
                            "activities_count": {
                              "type": "integer",
                              "description": "The count of activities related to the person"
                            },
                            "email_messages_count": {
                              "type": "integer",
                              "description": "The count of email messages related to the person"
                            },
                            "done_activities_count": {
                              "type": "integer",
                              "description": "The count of done activities related to the person"
                            },
                            "undone_activities_count": {
                              "type": "integer",
                              "description": "The count of undone activities related to the person"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_incoming_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last incoming email associated with the person"
                            },
                            "last_outgoing_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last outgoing email associated with the person"
                            }
                          }
                        }
                      ],
                      "title": "personCountAndEmailInfo"
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealCountAndActivityInfo"
                    }
                  ],
                  "title": "personCountEmailDealAndActivityInfo"
                }
              ],
              "title": "additionalPersonInfo"
            }
          ],
          "title": "personItem"
        }
      ],
      "description": "The object of participant"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        }
      }
    }
  }
}
object DealsAddProductToDealRequest
{
  "allOf": [
    {
      "type": "object",
      "title": "basicDealProductRequest",
      "required": [
        "product_id",
        "item_price",
        "quantity"
      ],
      "properties": {
        "tax": {
          "type": "number",
          "default": 0,
          "description": "The tax percentage"
        },
        "comments": {
          "type": "string",
          "description": "A textual comment associated with this product-deal attachment"
        },
        "discount": {
          "type": "number",
          "default": 0,
          "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage."
        },
        "duration": {
          "type": "number",
          "default": 1,
          "description": "The duration of the product. If omitted, will be set to 1."
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity – e.g. how many items of this product will be added to the deal"
        },
        "item_price": {
          "type": "number",
          "description": "The price at which this product will be added to the deal"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to use"
        },
        "tax_method": {
          "enum": [
            "exclusive",
            "inclusive",
            "none"
          ],
          "type": "string",
          "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal."
        },
        "enabled_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default."
        },
        "discount_type": {
          "enum": [
            "percentage",
            "amount"
          ],
          "type": "string",
          "default": "percentage",
          "description": "The type of the discount's value."
        },
        "duration_unit": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "hourly",
                "daily",
                "weekly",
                "monthly",
                "yearly"
              ],
              "type": "string",
              "title": "dealProductUnitDuration"
            }
          ],
          "description": "The unit duration of the product"
        },
        "product_variation_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the product variation to use. When omitted, no variation will be used."
        }
      }
    }
  ],
  "title": "addDealProductRequest"
}
object DealsAddProductToDealResponse
{
  "type": "object",
  "title": "getAddProductAttachementResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "type": "object",
                  "title": "basicDealProductRequest",
                  "required": [
                    "product_id",
                    "item_price",
                    "quantity"
                  ],
                  "properties": {
                    "tax": {
                      "type": "number",
                      "default": 0,
                      "description": "The tax percentage"
                    },
                    "comments": {
                      "type": "string",
                      "description": "A textual comment associated with this product-deal attachment"
                    },
                    "discount": {
                      "type": "number",
                      "default": 0,
                      "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage."
                    },
                    "duration": {
                      "type": "number",
                      "default": 1,
                      "description": "The duration of the product. If omitted, will be set to 1."
                    },
                    "quantity": {
                      "type": "integer",
                      "description": "Quantity – e.g. how many items of this product will be added to the deal"
                    },
                    "item_price": {
                      "type": "number",
                      "description": "The price at which this product will be added to the deal"
                    },
                    "product_id": {
                      "type": "integer",
                      "description": "The ID of the product to use"
                    },
                    "tax_method": {
                      "enum": [
                        "exclusive",
                        "inclusive",
                        "none"
                      ],
                      "type": "string",
                      "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal."
                    },
                    "enabled_flag": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default."
                    },
                    "discount_type": {
                      "enum": [
                        "percentage",
                        "amount"
                      ],
                      "type": "string",
                      "default": "percentage",
                      "description": "The type of the discount's value."
                    },
                    "duration_unit": {
                      "type": "string",
                      "allOf": [
                        {
                          "enum": [
                            "hourly",
                            "daily",
                            "weekly",
                            "monthly",
                            "yearly"
                          ],
                          "type": "string",
                          "title": "dealProductUnitDuration"
                        }
                      ],
                      "description": "The unit duration of the product"
                    },
                    "product_variation_id": {
                      "type": "integer",
                      "nullable": true,
                      "description": "The ID of the product variation to use. When omitted, no variation will be used."
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the deal-product (the ID of the product attached to the deal)"
                    },
                    "sum": {
                      "type": "number",
                      "description": "The sum of all the products attached to the deal"
                    },
                    "tax": {
                      "type": "number",
                      "description": "The product tax"
                    },
                    "name": {
                      "type": "string",
                      "description": "The product name"
                    },
                    "deal_id": {
                      "type": "integer",
                      "description": "The ID of the deal"
                    },
                    "add_time": {
                      "type": "string",
                      "description": "The date and time when the product was added to the deal"
                    },
                    "currency": {
                      "type": "string",
                      "description": "The currency associated with the deal product"
                    },
                    "last_edit": {
                      "type": "string",
                      "description": "The date and time when the deal product was last edited"
                    },
                    "company_id": {
                      "type": "integer",
                      "description": "The ID of the company"
                    },
                    "product_id": {
                      "type": "integer",
                      "description": "The ID of the product"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the product is active or not"
                    },
                    "duration_unit": {
                      "type": "string",
                      "description": "The type of the duration. (For example hourly, daily, etc.)"
                    }
                  }
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "product_attachment_id": {
                  "type": "integer",
                  "description": "The ID of the deal-product (the ID of the product attached to the deal)"
                }
              }
            }
          ]
        }
      ],
      "description": "The added product object attached to the deal"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsCreateDealRequest
{
  "allOf": [
    {
      "type": "object",
      "title": "requredTitleParameter",
      "required": [
        "title"
      ],
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the deal"
        }
      }
    },
    {
      "type": "object",
      "title": "newDealParameters",
      "properties": {
        "label": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The array of the labels IDs."
        },
        "value": {
          "type": "string",
          "description": "The value of the deal. If omitted, value will be set to 0."
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified."
        },
        "status": {
          "enum": [
            "open",
            "won",
            "lost",
            "deleted"
          ],
          "type": "string",
          "description": "open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user which will be the owner of the created deal. If not provided, the user making the request will be used."
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        },
        "currency": {
          "type": "string",
          "description": "The currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user."
        },
        "stage_id": {
          "type": "integer",
          "description": "The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline."
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first. This property is required unless `org_id` is specified."
        },
        "pipeline_id": {
          "type": "integer",
          "description": "The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored."
        }
      }
    },
    {
      "type": "object",
      "title": "basicDeal",
      "properties": {
        "won_time": {
          "type": "string",
          "description": "The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`."
        },
        "lost_time": {
          "type": "string",
          "description": "The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`."
        },
        "close_time": {
          "type": "string",
          "nullable": true,
          "description": "The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the deal. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "lost_reason": {
          "type": "string",
          "description": "The optional message about why the deal was lost (to be used when status = lost)"
        },
        "probability": {
          "type": "number",
          "description": "The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled."
        },
        "expected_close_date": {
          "type": "string",
          "format": "date",
          "description": "The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD."
        }
      }
    }
  ],
  "title": "addDealRequest"
}
object DealsCreateDealResponse
{
  "type": "object",
  "title": "dealResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deal"
            },
            "org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the deal"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization that is associated with the deal"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the deal"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the deal"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the deal"
                    }
                  },
                  "description": "The organization which is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the deal"
                    }
                  }
                }
              ],
              "title": "dealOrganizationDataWithId"
            },
            "user_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "boolean",
                      "description": "If the user has a picture or not"
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  },
                  "description": "The user who is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the user"
                    }
                  }
                }
              ],
              "title": "dealUserDataWithId"
            },
            "person_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the deal"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "If this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the deal"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the deal"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "If this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the deal"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the deal"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  },
                  "description": "The person who is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the person associated with the deal"
                    }
                  }
                }
              ],
              "title": "dealPersonDataWithId"
            },
            "creator_user_id": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal creator"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the deal creator"
                },
                "email": {
                  "type": "string",
                  "description": "The email of the deal creator"
                },
                "value": {
                  "type": "integer",
                  "description": "The ID of the deal creator"
                },
                "has_pic": {
                  "type": "boolean",
                  "description": "If the creator has a picture or not"
                },
                "pic_hash": {
                  "type": "string",
                  "nullable": true,
                  "description": "The creator picture hash"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the creator is active or not"
                }
              },
              "description": "The creator of the deal"
            }
          }
        },
        {
          "type": "object",
          "title": "baseDeal",
          "properties": {
            "label": {
              "type": "string",
              "description": "The label or multiple labels assigned to the deal"
            },
            "title": {
              "type": "string",
              "description": "The title of the deal"
            },
            "value": {
              "type": "number",
              "description": "The value of the deal"
            },
            "active": {
              "type": "boolean",
              "description": "Whether the deal is active or not"
            },
            "status": {
              "type": "string",
              "description": "The status of the deal"
            },
            "deleted": {
              "type": "boolean",
              "description": "Whether the deal is deleted or not"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the deal"
            },
            "cc_email": {
              "type": "string",
              "description": "The BCC email of the deal"
            },
            "currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization associated with the deal"
            },
            "stage_id": {
              "type": "integer",
              "description": "The ID of the deal stage"
            },
            "won_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as won"
            },
            "lost_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as lost"
            },
            "close_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of closing the deal"
            },
            "org_hidden": {
              "type": "boolean",
              "description": "If the organization that is associated with the deal is hidden or not"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the deal owner"
            },
            "visible_to": {
              "type": "string",
              "description": "The visibility of the deal"
            },
            "files_count": {
              "type": "integer",
              "description": "The number of files associated with the deal"
            },
            "lost_reason": {
              "type": "string",
              "nullable": true,
              "description": "The reason for losing the deal"
            },
            "notes_count": {
              "type": "integer",
              "description": "The number of notes associated with the deal"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person associated with the deal"
            },
            "pipeline_id": {
              "type": "integer",
              "description": "The ID of the pipeline associated with the deal"
            },
            "probability": {
              "type": "number",
              "nullable": true,
              "description": "The success probability percentage of the deal"
            },
            "rotten_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of changing the deal status as rotten"
            },
            "update_time": {
              "type": "string",
              "description": "The last updated date and time of the deal"
            },
            "person_hidden": {
              "type": "boolean",
              "description": "If the person that is associated with the deal is hidden or not"
            },
            "first_won_time": {
              "type": "string",
              "description": "The date and time of the first time changing the deal status as won"
            },
            "products_count": {
              "type": "integer",
              "description": "The number of products associated with the deal"
            },
            "stage_order_nr": {
              "type": "integer",
              "description": "The order number of the deal stage associated with the deal"
            },
            "weighted_value": {
              "type": "number",
              "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
            },
            "followers_count": {
              "type": "integer",
              "description": "The number of followers associated with the deal"
            },
            "formatted_value": {
              "type": "string",
              "description": "The deal value formatted with selected currency. E.g. US$500"
            },
            "activities_count": {
              "type": "integer",
              "description": "The number of activities associated with the deal"
            },
            "last_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the last activity associated with the deal"
            },
            "next_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the next activity associated with the deal"
            },
            "stage_change_time": {
              "type": "string",
              "description": "The last updated date and time of the deal stage"
            },
            "last_activity_date": {
              "type": "string",
              "nullable": true,
              "description": "The date of the last activity associated with the deal"
            },
            "next_activity_date": {
              "type": "string",
              "description": "The date of the next activity associated with the deal"
            },
            "next_activity_note": {
              "type": "string",
              "description": "The note of the next activity associated with the deal"
            },
            "next_activity_time": {
              "type": "string",
              "description": "The time of the next activity associated with the deal"
            },
            "next_activity_type": {
              "type": "string",
              "description": "The type of the next activity associated with the deal"
            },
            "participants_count": {
              "type": "integer",
              "description": "The number of participants associated with the deal"
            },
            "expected_close_date": {
              "type": "string",
              "format": "date",
              "description": "The expected close date of the deal"
            },
            "email_messages_count": {
              "type": "integer",
              "description": "The number of emails associated with the deal"
            },
            "done_activities_count": {
              "type": "integer",
              "description": "The number of completed activities associated with the deal"
            },
            "next_activity_subject": {
              "type": "string",
              "description": "The subject of the next activity associated with the deal"
            },
            "next_activity_duration": {
              "type": "string",
              "description": "The duration of the next activity associated with the deal"
            },
            "last_incoming_mail_time": {
              "type": "string",
              "description": "The date and time of the last incoming email associated with the deal"
            },
            "last_outgoing_mail_time": {
              "type": "string",
              "description": "The date and time of the last outgoing email associated with the deal"
            },
            "undone_activities_count": {
              "type": "integer",
              "description": "The number of incomplete activities associated with the deal"
            },
            "weighted_value_currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "formatted_weighted_value": {
              "type": "string",
              "description": "The weighted_value formatted with selected currency. E.g. US$500"
            }
          }
        }
      ],
      "title": "dealNonStrict"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object DealsDeleteAttachedProductResponse
{
  "type": "object",
  "title": "deleteDealProductResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of an attached product that was deleted from the deal"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object DealsDeleteBulkResponse
{
  "type": "object",
  "title": "deleteDealsResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of deleted deals IDs"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsDeleteParticipantResponse
{
  "type": "object",
  "title": "deleteDealParticipantResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the deal participant that was deleted"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object DealsDuplicateDealResponse
{
  "type": "object",
  "title": "duplicateDealResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deal"
            },
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization associated with the deal"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user"
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person associated with the deal"
            },
            "creator_user_id": {
              "type": "integer",
              "description": "The ID of the deal creator"
            }
          }
        },
        {
          "type": "object",
          "title": "baseDeal",
          "properties": {
            "label": {
              "type": "string",
              "description": "The label or multiple labels assigned to the deal"
            },
            "title": {
              "type": "string",
              "description": "The title of the deal"
            },
            "value": {
              "type": "number",
              "description": "The value of the deal"
            },
            "active": {
              "type": "boolean",
              "description": "Whether the deal is active or not"
            },
            "status": {
              "type": "string",
              "description": "The status of the deal"
            },
            "deleted": {
              "type": "boolean",
              "description": "Whether the deal is deleted or not"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the deal"
            },
            "cc_email": {
              "type": "string",
              "description": "The BCC email of the deal"
            },
            "currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization associated with the deal"
            },
            "stage_id": {
              "type": "integer",
              "description": "The ID of the deal stage"
            },
            "won_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as won"
            },
            "lost_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as lost"
            },
            "close_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of closing the deal"
            },
            "org_hidden": {
              "type": "boolean",
              "description": "If the organization that is associated with the deal is hidden or not"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the deal owner"
            },
            "visible_to": {
              "type": "string",
              "description": "The visibility of the deal"
            },
            "files_count": {
              "type": "integer",
              "description": "The number of files associated with the deal"
            },
            "lost_reason": {
              "type": "string",
              "nullable": true,
              "description": "The reason for losing the deal"
            },
            "notes_count": {
              "type": "integer",
              "description": "The number of notes associated with the deal"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person associated with the deal"
            },
            "pipeline_id": {
              "type": "integer",
              "description": "The ID of the pipeline associated with the deal"
            },
            "probability": {
              "type": "number",
              "nullable": true,
              "description": "The success probability percentage of the deal"
            },
            "rotten_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of changing the deal status as rotten"
            },
            "update_time": {
              "type": "string",
              "description": "The last updated date and time of the deal"
            },
            "person_hidden": {
              "type": "boolean",
              "description": "If the person that is associated with the deal is hidden or not"
            },
            "first_won_time": {
              "type": "string",
              "description": "The date and time of the first time changing the deal status as won"
            },
            "products_count": {
              "type": "integer",
              "description": "The number of products associated with the deal"
            },
            "stage_order_nr": {
              "type": "integer",
              "description": "The order number of the deal stage associated with the deal"
            },
            "weighted_value": {
              "type": "number",
              "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
            },
            "followers_count": {
              "type": "integer",
              "description": "The number of followers associated with the deal"
            },
            "formatted_value": {
              "type": "string",
              "description": "The deal value formatted with selected currency. E.g. US$500"
            },
            "activities_count": {
              "type": "integer",
              "description": "The number of activities associated with the deal"
            },
            "last_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the last activity associated with the deal"
            },
            "next_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the next activity associated with the deal"
            },
            "stage_change_time": {
              "type": "string",
              "description": "The last updated date and time of the deal stage"
            },
            "last_activity_date": {
              "type": "string",
              "nullable": true,
              "description": "The date of the last activity associated with the deal"
            },
            "next_activity_date": {
              "type": "string",
              "description": "The date of the next activity associated with the deal"
            },
            "next_activity_note": {
              "type": "string",
              "description": "The note of the next activity associated with the deal"
            },
            "next_activity_time": {
              "type": "string",
              "description": "The time of the next activity associated with the deal"
            },
            "next_activity_type": {
              "type": "string",
              "description": "The type of the next activity associated with the deal"
            },
            "participants_count": {
              "type": "integer",
              "description": "The number of participants associated with the deal"
            },
            "expected_close_date": {
              "type": "string",
              "format": "date",
              "description": "The expected close date of the deal"
            },
            "email_messages_count": {
              "type": "integer",
              "description": "The number of emails associated with the deal"
            },
            "done_activities_count": {
              "type": "integer",
              "description": "The number of completed activities associated with the deal"
            },
            "next_activity_subject": {
              "type": "string",
              "description": "The subject of the next activity associated with the deal"
            },
            "next_activity_duration": {
              "type": "string",
              "description": "The duration of the next activity associated with the deal"
            },
            "last_incoming_mail_time": {
              "type": "string",
              "description": "The date and time of the last incoming email associated with the deal"
            },
            "last_outgoing_mail_time": {
              "type": "string",
              "description": "The date and time of the last outgoing email associated with the deal"
            },
            "undone_activities_count": {
              "type": "integer",
              "description": "The number of incomplete activities associated with the deal"
            },
            "weighted_value_currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "formatted_weighted_value": {
              "type": "string",
              "description": "The weighted_value formatted with selected currency. E.g. US$500"
            }
          }
        }
      ],
      "title": "dealStrict"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsGetAllDeals200Response
{
  "type": "object",
  "title": "getDealsCollectionResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "dealCollectionResponseObject",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the deal"
          },
          "label": {
            "type": "string",
            "description": "The label or multiple labels assigned to the deal"
          },
          "title": {
            "type": "string",
            "description": "The title of the deal"
          },
          "value": {
            "type": "number",
            "description": "The value of the deal"
          },
          "org_id": {
            "type": "integer",
            "description": "The ID of the organization associated with the deal"
          },
          "status": {
            "type": "string",
            "description": "The status of the deal"
          },
          "user_id": {
            "type": "integer",
            "description": "The ID of the user"
          },
          "add_time": {
            "type": "string",
            "description": "The creation date and time of the deal in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "currency": {
            "type": "string",
            "description": "The currency associated with the deal"
          },
          "stage_id": {
            "type": "integer",
            "description": "The ID of the deal stage"
          },
          "won_time": {
            "type": "string",
            "description": "The date and time of changing the deal status to won in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "lost_time": {
            "type": "string",
            "description": "The date and time of changing the deal status to lost in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "person_id": {
            "type": "integer",
            "description": "The ID of the person associated with the deal"
          },
          "close_time": {
            "type": "string",
            "nullable": true,
            "description": "The date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "visible_to": {
            "type": "string",
            "description": "The visibility of the deal"
          },
          "lost_reason": {
            "type": "string",
            "nullable": true,
            "description": "The reason for losing the deal"
          },
          "pipeline_id": {
            "type": "integer",
            "description": "The ID of the pipeline associated with the deal"
          },
          "probability": {
            "type": "number",
            "nullable": true,
            "description": "The success probability percentage of the deal"
          },
          "update_time": {
            "type": "string",
            "description": "The last update date and time of the deal in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "creator_user_id": {
            "type": "integer",
            "description": "The ID of the deal creator"
          },
          "expected_close_date": {
            "type": "string",
            "format": "date",
            "description": "The expected close date of the deal"
          }
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object DealsGetAllDeals403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsGetAllDealsResponse
{
  "type": "object",
  "title": "getDealsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "org_id": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the organization associated with the deal"
                      },
                      "address": {
                        "type": "string",
                        "description": "The address of the organization that is associated with the deal"
                      },
                      "cc_email": {
                        "type": "string",
                        "description": "The BCC email of the organization associated with the deal"
                      },
                      "owner_id": {
                        "type": "integer",
                        "description": "The ID of the owner of the organization that is associated with the deal"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the associated organization is active or not"
                      },
                      "people_count": {
                        "type": "integer",
                        "description": "The number of people connected with the organization that is associated with the deal"
                      }
                    },
                    "description": "The organization which is associated with the deal"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "description": "The ID of the organization associated with the deal"
                      }
                    }
                  }
                ],
                "title": "dealOrganizationDataWithId"
              },
              "user_id": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the user"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the user"
                      },
                      "email": {
                        "type": "string",
                        "description": "The email of the user"
                      },
                      "has_pic": {
                        "type": "boolean",
                        "description": "If the user has a picture or not"
                      },
                      "pic_hash": {
                        "type": "string",
                        "nullable": true,
                        "description": "The user picture hash"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the user is active or not"
                      }
                    },
                    "description": "The user who is associated with the deal"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "description": "The ID of the user"
                      }
                    }
                  }
                ],
                "title": "dealUserDataWithId"
              },
              "person_id": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the person associated with the deal"
                      },
                      "email": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "The type of the email"
                            },
                            "value": {
                              "type": "string",
                              "description": "The email of the associated person"
                            },
                            "primary": {
                              "type": "boolean",
                              "description": "If this is the primary email or not"
                            }
                          }
                        },
                        "description": "The emails of the person associated with the deal"
                      },
                      "phone": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "The type of the phone number"
                            },
                            "value": {
                              "type": "string",
                              "description": "The phone number of the person associated with the deal"
                            },
                            "primary": {
                              "type": "boolean",
                              "description": "If this is the primary phone number or not"
                            }
                          }
                        },
                        "description": "The phone numbers of the person associated with the deal"
                      },
                      "owner_id": {
                        "type": "integer",
                        "description": "The ID of the owner of the person that is associated with the deal"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the associated person is active or not"
                      }
                    },
                    "description": "The person who is associated with the deal"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "description": "The ID of the person associated with the deal"
                      }
                    }
                  }
                ],
                "title": "dealPersonDataWithId"
              },
              "creator_user_id": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the deal creator"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the deal creator"
                  },
                  "email": {
                    "type": "string",
                    "description": "The email of the deal creator"
                  },
                  "value": {
                    "type": "integer",
                    "description": "The ID of the deal creator"
                  },
                  "has_pic": {
                    "type": "boolean",
                    "description": "If the creator has a picture or not"
                  },
                  "pic_hash": {
                    "type": "string",
                    "nullable": true,
                    "description": "The creator picture hash"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the creator is active or not"
                  }
                },
                "description": "The creator of the deal"
              }
            }
          },
          {
            "type": "object",
            "title": "baseDeal",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label or multiple labels assigned to the deal"
              },
              "title": {
                "type": "string",
                "description": "The title of the deal"
              },
              "value": {
                "type": "number",
                "description": "The value of the deal"
              },
              "active": {
                "type": "boolean",
                "description": "Whether the deal is active or not"
              },
              "status": {
                "type": "string",
                "description": "The status of the deal"
              },
              "deleted": {
                "type": "boolean",
                "description": "Whether the deal is deleted or not"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the deal"
              },
              "cc_email": {
                "type": "string",
                "description": "The BCC email of the deal"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the deal"
              },
              "stage_id": {
                "type": "integer",
                "description": "The ID of the deal stage"
              },
              "won_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as won"
              },
              "lost_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as lost"
              },
              "close_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of closing the deal"
              },
              "org_hidden": {
                "type": "boolean",
                "description": "If the organization that is associated with the deal is hidden or not"
              },
              "owner_name": {
                "type": "string",
                "description": "The name of the deal owner"
              },
              "visible_to": {
                "type": "string",
                "description": "The visibility of the deal"
              },
              "files_count": {
                "type": "integer",
                "description": "The number of files associated with the deal"
              },
              "lost_reason": {
                "type": "string",
                "nullable": true,
                "description": "The reason for losing the deal"
              },
              "notes_count": {
                "type": "integer",
                "description": "The number of notes associated with the deal"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the deal"
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline associated with the deal"
              },
              "probability": {
                "type": "number",
                "nullable": true,
                "description": "The success probability percentage of the deal"
              },
              "rotten_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of changing the deal status as rotten"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the deal"
              },
              "person_hidden": {
                "type": "boolean",
                "description": "If the person that is associated with the deal is hidden or not"
              },
              "first_won_time": {
                "type": "string",
                "description": "The date and time of the first time changing the deal status as won"
              },
              "products_count": {
                "type": "integer",
                "description": "The number of products associated with the deal"
              },
              "stage_order_nr": {
                "type": "integer",
                "description": "The order number of the deal stage associated with the deal"
              },
              "weighted_value": {
                "type": "number",
                "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
              },
              "followers_count": {
                "type": "integer",
                "description": "The number of followers associated with the deal"
              },
              "formatted_value": {
                "type": "string",
                "description": "The deal value formatted with selected currency. E.g. US$500"
              },
              "activities_count": {
                "type": "integer",
                "description": "The number of activities associated with the deal"
              },
              "last_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the last activity associated with the deal"
              },
              "next_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the next activity associated with the deal"
              },
              "stage_change_time": {
                "type": "string",
                "description": "The last updated date and time of the deal stage"
              },
              "last_activity_date": {
                "type": "string",
                "nullable": true,
                "description": "The date of the last activity associated with the deal"
              },
              "next_activity_date": {
                "type": "string",
                "description": "The date of the next activity associated with the deal"
              },
              "next_activity_note": {
                "type": "string",
                "description": "The note of the next activity associated with the deal"
              },
              "next_activity_time": {
                "type": "string",
                "description": "The time of the next activity associated with the deal"
              },
              "next_activity_type": {
                "type": "string",
                "description": "The type of the next activity associated with the deal"
              },
              "participants_count": {
                "type": "integer",
                "description": "The number of participants associated with the deal"
              },
              "expected_close_date": {
                "type": "string",
                "format": "date",
                "description": "The expected close date of the deal"
              },
              "email_messages_count": {
                "type": "integer",
                "description": "The number of emails associated with the deal"
              },
              "done_activities_count": {
                "type": "integer",
                "description": "The number of completed activities associated with the deal"
              },
              "next_activity_subject": {
                "type": "string",
                "description": "The subject of the next activity associated with the deal"
              },
              "next_activity_duration": {
                "type": "string",
                "description": "The duration of the next activity associated with the deal"
              },
              "last_incoming_mail_time": {
                "type": "string",
                "description": "The date and time of the last incoming email associated with the deal"
              },
              "last_outgoing_mail_time": {
                "type": "string",
                "description": "The date and time of the last outgoing email associated with the deal"
              },
              "undone_activities_count": {
                "type": "integer",
                "description": "The number of incomplete activities associated with the deal"
              },
              "weighted_value_currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "formatted_weighted_value": {
                "type": "string",
                "description": "The weighted_value formatted with selected currency. E.g. US$500"
              }
            }
          }
        ],
        "title": "dealNonStrict"
      },
      "description": "The array of deals"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object DealsGetDetailsResponse
{
  "type": "object",
  "title": "getDealResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal"
                },
                "org_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the deal"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization that is associated with the deal"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the deal"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the deal"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the deal"
                        }
                      },
                      "description": "The organization which is associated with the deal"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the deal"
                        }
                      }
                    }
                  ],
                  "title": "dealOrganizationDataWithId"
                },
                "user_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "boolean",
                          "description": "If the user has a picture or not"
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      },
                      "description": "The user who is associated with the deal"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the user"
                        }
                      }
                    }
                  ],
                  "title": "dealUserDataWithId"
                },
                "person_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the deal"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "If this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the deal"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the deal"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "If this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the deal"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the deal"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      },
                      "description": "The person who is associated with the deal"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the person associated with the deal"
                        }
                      }
                    }
                  ],
                  "title": "dealPersonDataWithId"
                },
                "creator_user_id": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the deal creator"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the deal creator"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the deal creator"
                    },
                    "value": {
                      "type": "integer",
                      "description": "The ID of the deal creator"
                    },
                    "has_pic": {
                      "type": "boolean",
                      "description": "If the creator has a picture or not"
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The creator picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the creator is active or not"
                    }
                  },
                  "description": "The creator of the deal"
                }
              }
            },
            {
              "type": "object",
              "title": "baseDeal",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "The label or multiple labels assigned to the deal"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether the deal is active or not"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal"
                },
                "deleted": {
                  "type": "boolean",
                  "description": "Whether the deal is deleted or not"
                },
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the deal"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email of the deal"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency associated with the deal"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the deal"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the deal stage"
                },
                "won_time": {
                  "type": "string",
                  "description": "The date and time of changing the deal status as won"
                },
                "lost_time": {
                  "type": "string",
                  "description": "The date and time of changing the deal status as lost"
                },
                "close_time": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date and time of closing the deal"
                },
                "org_hidden": {
                  "type": "boolean",
                  "description": "If the organization that is associated with the deal is hidden or not"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the deal owner"
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility of the deal"
                },
                "files_count": {
                  "type": "integer",
                  "description": "The number of files associated with the deal"
                },
                "lost_reason": {
                  "type": "string",
                  "nullable": true,
                  "description": "The reason for losing the deal"
                },
                "notes_count": {
                  "type": "integer",
                  "description": "The number of notes associated with the deal"
                },
                "person_name": {
                  "type": "string",
                  "description": "The name of the person associated with the deal"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline associated with the deal"
                },
                "probability": {
                  "type": "number",
                  "nullable": true,
                  "description": "The success probability percentage of the deal"
                },
                "rotten_time": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date and time of changing the deal status as rotten"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the deal"
                },
                "person_hidden": {
                  "type": "boolean",
                  "description": "If the person that is associated with the deal is hidden or not"
                },
                "first_won_time": {
                  "type": "string",
                  "description": "The date and time of the first time changing the deal status as won"
                },
                "products_count": {
                  "type": "integer",
                  "description": "The number of products associated with the deal"
                },
                "stage_order_nr": {
                  "type": "integer",
                  "description": "The order number of the deal stage associated with the deal"
                },
                "weighted_value": {
                  "type": "number",
                  "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                },
                "followers_count": {
                  "type": "integer",
                  "description": "The number of followers associated with the deal"
                },
                "formatted_value": {
                  "type": "string",
                  "description": "The deal value formatted with selected currency. E.g. US$500"
                },
                "activities_count": {
                  "type": "integer",
                  "description": "The number of activities associated with the deal"
                },
                "last_activity_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the last activity associated with the deal"
                },
                "next_activity_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the next activity associated with the deal"
                },
                "stage_change_time": {
                  "type": "string",
                  "description": "The last updated date and time of the deal stage"
                },
                "last_activity_date": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date of the last activity associated with the deal"
                },
                "next_activity_date": {
                  "type": "string",
                  "description": "The date of the next activity associated with the deal"
                },
                "next_activity_note": {
                  "type": "string",
                  "description": "The note of the next activity associated with the deal"
                },
                "next_activity_time": {
                  "type": "string",
                  "description": "The time of the next activity associated with the deal"
                },
                "next_activity_type": {
                  "type": "string",
                  "description": "The type of the next activity associated with the deal"
                },
                "participants_count": {
                  "type": "integer",
                  "description": "The number of participants associated with the deal"
                },
                "expected_close_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The expected close date of the deal"
                },
                "email_messages_count": {
                  "type": "integer",
                  "description": "The number of emails associated with the deal"
                },
                "done_activities_count": {
                  "type": "integer",
                  "description": "The number of completed activities associated with the deal"
                },
                "next_activity_subject": {
                  "type": "string",
                  "description": "The subject of the next activity associated with the deal"
                },
                "next_activity_duration": {
                  "type": "string",
                  "description": "The duration of the next activity associated with the deal"
                },
                "last_incoming_mail_time": {
                  "type": "string",
                  "description": "The date and time of the last incoming email associated with the deal"
                },
                "last_outgoing_mail_time": {
                  "type": "string",
                  "description": "The date and time of the last outgoing email associated with the deal"
                },
                "undone_activities_count": {
                  "type": "integer",
                  "description": "The number of incomplete activities associated with the deal"
                },
                "weighted_value_currency": {
                  "type": "string",
                  "description": "The currency associated with the deal"
                },
                "formatted_weighted_value": {
                  "type": "string",
                  "description": "The weighted_value formatted with selected currency. E.g. US$500"
                }
              }
            }
          ],
          "title": "dealNonStrict"
        },
        {
          "type": "object",
          "properties": {
            "age": {
              "type": "object",
              "properties": {
                "d": {
                  "type": "integer",
                  "description": "Days"
                },
                "h": {
                  "type": "integer",
                  "description": "Hours"
                },
                "i": {
                  "type": "integer",
                  "description": "Minutes"
                },
                "m": {
                  "type": "integer",
                  "description": "Months"
                },
                "s": {
                  "type": "integer",
                  "description": "Seconds"
                },
                "y": {
                  "type": "integer",
                  "description": "Years"
                },
                "total_seconds": {
                  "type": "integer",
                  "description": "The total time in seconds"
                }
              },
              "description": "The lifetime of the deal"
            },
            "last_activity": {
              "type": "object",
              "nullable": true,
              "description": "The details of the last activity associated with the deal"
            },
            "next_activity": {
              "type": "object",
              "nullable": true,
              "description": "The details of the next activity associated with the deal"
            },
            "average_time_to_won": {
              "type": "object",
              "properties": {
                "d": {
                  "type": "integer",
                  "description": "Days"
                },
                "h": {
                  "type": "integer",
                  "description": "Hours"
                },
                "i": {
                  "type": "integer",
                  "description": "Minutes"
                },
                "m": {
                  "type": "integer",
                  "description": "Months"
                },
                "s": {
                  "type": "integer",
                  "description": "Seconds"
                },
                "y": {
                  "type": "integer",
                  "description": "Years"
                },
                "total_seconds": {
                  "type": "integer",
                  "description": "The total time in seconds"
                }
              },
              "description": "The average time to win the deal"
            },
            "average_stage_progress": {
              "type": "number",
              "description": "The average of the deal stage progression"
            },
            "stay_in_pipeline_stages": {
              "type": "object",
              "properties": {
                "order_of_stages": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "The order of the deal progression through the pipeline stages"
                },
                "times_in_stages": {
                  "type": "object",
                  "description": "The number of seconds a deal has been in each stage of the pipeline"
                }
              },
              "description": "The details of the duration of the deal being in each stage of the pipeline"
            }
          }
        }
      ],
      "title": "dealNonStrictWithDetails"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "dropbox_email": {
          "type": "string",
          "description": "The BCC email of the deal"
        }
      }
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object DealsGetSummaryResponse
{
  "type": "object",
  "title": "getDealsSummaryResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "total_count": {
          "type": "integer",
          "description": "The total number of deals"
        },
        "values_total": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer",
              "description": "The number of deals in the deal currency group"
            },
            "value": {
              "type": "number",
              "description": "The total value of deals in the deal currency group"
            },
            "value_converted": {
              "type": "number",
              "description": "The total value of deals converted into the company default currency"
            },
            "value_formatted": {
              "type": "string",
              "description": "The total value of deals formatted with deal currency. E.g. €50"
            },
            "value_converted_formatted": {
              "type": "string",
              "description": "The value_converted formatted with deal currency. E.g. US$50.10"
            }
          },
          "description": "The total values of the deals grouped by deal currency"
        },
        "weighted_values_total": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer",
              "description": "The number of deals in the deal currency group"
            },
            "value": {
              "type": "number",
              "description": "The total weighted value of the deals in the deal currency group"
            },
            "value_formatted": {
              "type": "string",
              "description": "The total weighted value of the deals formatted with deal currency. E.g. €50"
            }
          },
          "description": "The total weighted values of the deals grouped by deal currency. The weighted value is calculated as probability times deal value."
        },
        "total_currency_converted_value": {
          "type": "number",
          "description": "The total value of deals converted into the company default currency"
        },
        "total_weighted_currency_converted_value": {
          "type": "number",
          "description": "The total weighted value of deals converted into the company default currency"
        },
        "total_currency_converted_value_formatted": {
          "type": "string",
          "description": "The total converted value of deals formatted with the company default currency. E.g. US$5,100.96"
        },
        "total_weighted_currency_converted_value_formatted": {
          "type": "string",
          "description": "The total weighted value of deals formatted with the company default currency. E.g. US$5,100.96"
        }
      },
      "description": "The summary of deals"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsGetTimelineDataResponse
{
  "type": "object",
  "title": "getDealsTimelineResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "deals": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the deal"
                  },
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization associated with the deal"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person associated with the deal"
                  },
                  "creator_user_id": {
                    "type": "integer",
                    "description": "The ID of the deal creator"
                  }
                }
              },
              {
                "type": "object",
                "title": "baseDeal",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The label or multiple labels assigned to the deal"
                  },
                  "title": {
                    "type": "string",
                    "description": "The title of the deal"
                  },
                  "value": {
                    "type": "number",
                    "description": "The value of the deal"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the deal is active or not"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status of the deal"
                  },
                  "deleted": {
                    "type": "boolean",
                    "description": "Whether the deal is deleted or not"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the deal"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email of the deal"
                  },
                  "currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the deal"
                  },
                  "stage_id": {
                    "type": "integer",
                    "description": "The ID of the deal stage"
                  },
                  "won_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as won"
                  },
                  "lost_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as lost"
                  },
                  "close_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of closing the deal"
                  },
                  "org_hidden": {
                    "type": "boolean",
                    "description": "If the organization that is associated with the deal is hidden or not"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the deal owner"
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility of the deal"
                  },
                  "files_count": {
                    "type": "integer",
                    "description": "The number of files associated with the deal"
                  },
                  "lost_reason": {
                    "type": "string",
                    "nullable": true,
                    "description": "The reason for losing the deal"
                  },
                  "notes_count": {
                    "type": "integer",
                    "description": "The number of notes associated with the deal"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person associated with the deal"
                  },
                  "pipeline_id": {
                    "type": "integer",
                    "description": "The ID of the pipeline associated with the deal"
                  },
                  "probability": {
                    "type": "number",
                    "nullable": true,
                    "description": "The success probability percentage of the deal"
                  },
                  "rotten_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of changing the deal status as rotten"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal"
                  },
                  "person_hidden": {
                    "type": "boolean",
                    "description": "If the person that is associated with the deal is hidden or not"
                  },
                  "first_won_time": {
                    "type": "string",
                    "description": "The date and time of the first time changing the deal status as won"
                  },
                  "products_count": {
                    "type": "integer",
                    "description": "The number of products associated with the deal"
                  },
                  "stage_order_nr": {
                    "type": "integer",
                    "description": "The order number of the deal stage associated with the deal"
                  },
                  "weighted_value": {
                    "type": "number",
                    "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                  },
                  "followers_count": {
                    "type": "integer",
                    "description": "The number of followers associated with the deal"
                  },
                  "formatted_value": {
                    "type": "string",
                    "description": "The deal value formatted with selected currency. E.g. US$500"
                  },
                  "activities_count": {
                    "type": "integer",
                    "description": "The number of activities associated with the deal"
                  },
                  "last_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the last activity associated with the deal"
                  },
                  "next_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the next activity associated with the deal"
                  },
                  "stage_change_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal stage"
                  },
                  "last_activity_date": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date of the last activity associated with the deal"
                  },
                  "next_activity_date": {
                    "type": "string",
                    "description": "The date of the next activity associated with the deal"
                  },
                  "next_activity_note": {
                    "type": "string",
                    "description": "The note of the next activity associated with the deal"
                  },
                  "next_activity_time": {
                    "type": "string",
                    "description": "The time of the next activity associated with the deal"
                  },
                  "next_activity_type": {
                    "type": "string",
                    "description": "The type of the next activity associated with the deal"
                  },
                  "participants_count": {
                    "type": "integer",
                    "description": "The number of participants associated with the deal"
                  },
                  "expected_close_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The expected close date of the deal"
                  },
                  "email_messages_count": {
                    "type": "integer",
                    "description": "The number of emails associated with the deal"
                  },
                  "done_activities_count": {
                    "type": "integer",
                    "description": "The number of completed activities associated with the deal"
                  },
                  "next_activity_subject": {
                    "type": "string",
                    "description": "The subject of the next activity associated with the deal"
                  },
                  "next_activity_duration": {
                    "type": "string",
                    "description": "The duration of the next activity associated with the deal"
                  },
                  "last_incoming_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last incoming email associated with the deal"
                  },
                  "last_outgoing_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last outgoing email associated with the deal"
                  },
                  "undone_activities_count": {
                    "type": "integer",
                    "description": "The number of incomplete activities associated with the deal"
                  },
                  "weighted_value_currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "formatted_weighted_value": {
                    "type": "string",
                    "description": "The weighted_value formatted with selected currency. E.g. US$500"
                  }
                }
              }
            ],
            "title": "dealStrict"
          }
        },
        "totals": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer",
              "description": "The number of deals for the given period"
            },
            "values": {
              "type": "object",
              "description": "The total values of deals grouped by deal currency"
            },
            "won_count": {
              "type": "integer",
              "description": "The number of won deals for the given period"
            },
            "open_count": {
              "type": "integer",
              "description": "The number of open deals for the given period"
            },
            "won_values": {
              "type": "object",
              "description": "The total values of won deals for the given period grouped by deal currency"
            },
            "open_values": {
              "type": "object",
              "description": "The total values of open deals for the given period grouped by deal currency"
            },
            "weighted_values": {
              "type": "object",
              "description": "The total weighted values of deals for the given period grouped by deal currency. The weighted value of a deal is calculated as probability times deal value."
            },
            "weighted_open_values": {
              "type": "object",
              "description": "The total weighted values of open deals for the given period grouped by deal currency. The weighted value of a deal is calculated as probability times deal value."
            }
          },
          "description": "The total values of deals for the given period"
        },
        "period_end": {
          "type": "string",
          "description": "The end date and time of the period"
        },
        "period_start": {
          "type": "string",
          "description": "The start date and time of the period"
        }
      },
      "description": "Open and won deals grouped into periods by defined interval, amount and date-type dealField (`field_key`)"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsListActivitiesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization this activity is associated with"
                  },
                  "deal_id": {
                    "type": "integer",
                    "description": "The ID of the deal this activity is associated with"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "The ID of the lead in the UUID format this activity is associated with"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The due date of the activity. Format: YYYY-MM-DD"
                  },
                  "due_time": {
                    "type": "string",
                    "description": "The due time of the activity in UTC. Format: HH:MM"
                  },
                  "duration": {
                    "type": "string",
                    "description": "The duration of the activity. Format: HH:MM"
                  },
                  "location": {
                    "type": "string",
                    "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person this activity is associated with"
                  },
                  "project_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the project this activity is associated with"
                  },
                  "public_description": {
                    "type": "string",
                    "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the activity, generated when the activity was created"
                  },
                  "done": {
                    "type": "boolean",
                    "description": "Whether the activity is done or not"
                  },
                  "file": {
                    "type": "object",
                    "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
                  },
                  "note": {
                    "type": "string",
                    "description": "The note of the activity (HTML format)"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
                  },
                  "series": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject of the activity"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user whom the activity is assigned to"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization this activity is associated with"
                  },
                  "rec_rule": {
                    "type": "string",
                    "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
                  },
                  "busy_flag": {
                    "type": "boolean",
                    "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The user's company ID"
                  },
                  "deal_title": {
                    "type": "string",
                    "description": "The name of the deal this activity is associated with"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the user this activity is owned by"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the activity is active or not"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person this activity is associated with"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "participants": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "List of multiple persons (participants) this activity is associated with"
                  },
                  "reference_id": {
                    "type": "integer",
                    "description": "Together with the `reference_type`, gives the ID of the other object"
                  },
                  "gcal_event_id": {
                    "type": "string",
                    "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_route": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates street name."
                  },
                  "reference_type": {
                    "type": "string",
                    "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
                  },
                  "update_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who was the last to update this activity"
                  },
                  "source_timezone": {
                    "type": "string",
                    "description": "The timezone the activity was created in an external calendar"
                  },
                  "deal_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the deal"
                  },
                  "location_country": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates country."
                  },
                  "location_locality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates city/town/village/locality."
                  },
                  "created_by_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who created the activity"
                  },
                  "google_calendar_id": {
                    "type": "string",
                    "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "person_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the person"
                  },
                  "rec_rule_extension": {
                    "type": "string",
                    "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
                  },
                  "assigned_to_user_id": {
                    "type": "integer",
                    "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
                  },
                  "location_subpremise": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates apartment/suite number."
                  },
                  "marked_as_done_time": {
                    "type": "string",
                    "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "google_calendar_etag": {
                    "type": "string",
                    "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_postal_code": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates ZIP/postal code."
                  },
                  "location_sublocality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates district/sublocality."
                  },
                  "conference_meeting_id": {
                    "type": "string",
                    "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
                  },
                  "conference_meeting_url": {
                    "type": "string",
                    "description": "The link to join the meeting which is associated with this activity"
                  },
                  "last_notification_time": {
                    "type": "string",
                    "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
                  },
                  "location_street_number": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates house number."
                  },
                  "rec_master_activity_id": {
                    "type": "integer",
                    "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
                  },
                  "notification_language_id": {
                    "type": "integer",
                    "description": "The ID of the language the notifications are sent in"
                  },
                  "conference_meeting_client": {
                    "type": "string",
                    "description": "The ID of the Marketplace app, which is connected to this activity"
                  },
                  "last_notification_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
                  },
                  "location_formatted_address": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates full/combined address."
                  },
                  "location_admin_area_level_1": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates state/county."
                  },
                  "location_admin_area_level_2": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates region."
                  },
                  "calendar_sync_include_context": {
                    "type": "string",
                    "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
                  }
                }
              }
            ],
            "title": "activityResponseObject"
          },
          "description": "The array of activities"
        },
        "additional_data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "activity_distribution": {
                  "type": "object",
                  "properties": {
                    "ASSIGNED_TO_USER_ID": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "share": {
                          "type": "integer",
                          "description": "The percentage of activities belongs to the user"
                        },
                        "activities": {
                          "type": "object",
                          "properties": {
                            "ACTIVITY_TYPE_NAME": {
                              "type": "integer",
                              "description": "The count of activities related to a specific type"
                            }
                          },
                          "description": "The count of activities related to the user grouped by activity type"
                        },
                        "activity_count": {
                          "type": "integer",
                          "description": "The overall count of activities for the user"
                        }
                      },
                      "description": "The ID of the user"
                    }
                  },
                  "description": "The distribution of activities related to the organization grouped by the user ID"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            }
          ],
          "title": "activityDistributionDataWithAdditionalData"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "deal": {
              "type": "object",
              "properties": {
                "DEAL_ID": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the deal associated with the item"
                    },
                    "title": {
                      "type": "string",
                      "description": "The title of the deal associated with the item"
                    },
                    "value": {
                      "type": "number",
                      "description": "The value of the deal that is associated with the item"
                    },
                    "status": {
                      "type": "string",
                      "description": "The status of the deal associated with the item"
                    },
                    "currency": {
                      "type": "string",
                      "description": "The currency of the deal value"
                    },
                    "stage_id": {
                      "type": "integer",
                      "description": "The ID of the stage the deal is currently at"
                    },
                    "pipeline_id": {
                      "type": "integer",
                      "description": "The ID of the pipeline the deal is in"
                    }
                  },
                  "description": "The ID of the deal which is associated with the item"
                }
              }
            },
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getDealActivitiesResponse200"
}
object DealsListChangelogResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "description": "The date and time of the change"
              },
              "field_key": {
                "type": "string",
                "description": "The key of the field that was changed"
              },
              "new_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field after the change"
              },
              "old_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field before the change"
              },
              "actor_user_id": {
                "type": "integer",
                "description": "The ID of the user who made the change"
              },
              "change_source": {
                "type": "string",
                "nullable": true,
                "description": "The source of change, for example 'app', 'mobile', 'api', etc."
              },
              "is_bulk_update_flag": {
                "type": "boolean",
                "description": "Whether the change was made as part of a bulk update"
              },
              "change_source_user_agent": {
                "type": "string",
                "nullable": true,
                "description": "The user agent from which the change was made"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "next_cursor": {
              "type": "string",
              "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getChangelogResponse200"
}
object DealsListDealFilesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the file"
              },
              "cid": {
                "type": "string",
                "description": "The ID of the inline attachment"
              },
              "url": {
                "type": "string",
                "description": "The URL of the download file"
              },
              "name": {
                "type": "string",
                "description": "The visible name of the file"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization to associate the file with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal to associate the file with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the lead to associate the file with"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user to associate the file with"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the file"
              },
              "deal_name": {
                "type": "string",
                "description": "The name of the deal associated with the dile"
              },
              "file_name": {
                "type": "string",
                "description": "The original name of the file"
              },
              "file_size": {
                "type": "integer",
                "description": "The size of the file"
              },
              "lead_name": {
                "type": "string",
                "description": "The name of the lead associated with the file"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person to associate the file with"
              },
              "remote_id": {
                "type": "string",
                "description": "The ID of the remote item"
              },
              "s3_bucket": {
                "type": "string",
                "description": "The location of the cloud storage"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product to associate the file with"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the user is active or not. false = Not activated, true = Activated"
              },
              "activity_id": {
                "type": "integer",
                "description": "The ID of the activity to associate the file with"
              },
              "description": {
                "type": "string",
                "description": "The description of the file"
              },
              "inline_flag": {
                "type": "boolean",
                "description": "Whether the file was uploaded as inline or not"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the file"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
              },
              "product_name": {
                "type": "string",
                "description": "The name of the product associated with the file"
              },
              "mail_message_id": {
                "type": "string",
                "description": "The ID of the mail message to associate the file with"
              },
              "remote_location": {
                "type": "string",
                "description": "The location type to send the file to. Only googledrive is supported at the moment."
              },
              "mail_template_id": {
                "type": "string",
                "description": "The ID of the mail template to associate the file with"
              }
            },
            "description": "The file data"
          },
          "description": "The array of files"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFilesResponse200"
}
object DealsListDealProductsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the deal-product (the ID of the product attached to the deal)"
              },
              "sum": {
                "type": "number",
                "description": "The sum of all the products attached to the deal"
              },
              "tax": {
                "type": "number",
                "description": "The product tax"
              },
              "name": {
                "type": "string",
                "description": "The product name"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "product": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "The ID of the product"
                      },
                      "tax": {
                        "type": "number",
                        "default": 0,
                        "description": "The ax percentage"
                      },
                      "code": {
                        "type": "string",
                        "description": "The product code"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the product"
                      },
                      "unit": {
                        "type": "string",
                        "description": "The unit in which this product is sold"
                      },
                      "owner_id": {
                        "type": "object",
                        "description": "Information about the Pipedrive user who owns the product"
                      },
                      "selectable": {
                        "type": "boolean",
                        "default": true,
                        "description": "Whether this product is selected in deals or not"
                      },
                      "visible_to": {
                        "allOf": [
                          {
                            "enum": [
                              "1",
                              "3",
                              "5",
                              "7"
                            ],
                            "type": "string"
                          }
                        ],
                        "description": "Visibility of the product"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "default": true,
                        "description": "Whether this product is active or not"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "prices": {
                        "type": "object",
                        "description": "Object of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)"
                      }
                    }
                  }
                ]
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the product was added to the deal"
              },
              "comments": {
                "type": "string",
                "description": "The comments of the product"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal product"
              },
              "discount": {
                "type": "number",
                "default": 0,
                "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage."
              },
              "duration": {
                "type": "integer",
                "description": "The duration of the product"
              },
              "order_nr": {
                "type": "integer",
                "description": "The order number of the product"
              },
              "quantity": {
                "type": "integer",
                "description": "The quantity of the product"
              },
              "last_edit": {
                "type": "string",
                "description": "The date and time when the deal product was last edited"
              },
              "item_price": {
                "type": "integer",
                "description": "The price value of the product"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product"
              },
              "tax_method": {
                "enum": [
                  "exclusive",
                  "inclusive",
                  "none"
                ],
                "type": "string",
                "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal."
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the product is active or not"
              },
              "enabled_flag": {
                "type": "boolean",
                "description": "Whether the product is enabled or not"
              },
              "discount_type": {
                "enum": [
                  "percentage",
                  "amount"
                ],
                "type": "string",
                "default": "percentage",
                "description": "The type of the discount's value."
              },
              "duration_unit": {
                "type": "string",
                "description": "The type of the duration. (For example hourly, daily, etc.)"
              },
              "sum_formatted": {
                "type": "string",
                "description": "The formatted sum of the product"
              },
              "quantity_formatted": {
                "type": "string",
                "description": "The formatted quantity of the product"
              },
              "product_variation_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the product variation"
              }
            }
          },
          "description": "The array of products"
        },
        "additional_data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "products_sum_total": {
                  "type": "integer",
                  "description": "The total sum of the products"
                },
                "products_quantity_total": {
                  "type": "integer",
                  "description": "The total quantity of the products"
                },
                "products_sum_total_formatted": {
                  "type": "string",
                  "description": "The total formatted sum of the products"
                },
                "products_quantity_total_formatted": {
                  "type": "string",
                  "description": "The total formatted quantity of the products"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "pagination": {
                  "type": "object",
                  "properties": {
                    "limit": {
                      "type": "integer",
                      "description": "Items shown per page"
                    },
                    "start": {
                      "type": "integer",
                      "description": "Pagination start"
                    },
                    "next_start": {
                      "type": "integer",
                      "description": "Next pagination start"
                    },
                    "more_items_in_collection": {
                      "type": "boolean",
                      "description": "Whether there are more list items in the collection than displayed"
                    }
                  },
                  "description": "Pagination details of the list"
                }
              }
            }
          ]
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "listProductsResponse200"
}
object DealsListDealUpdatesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "description": "The data related to the update"
              },
              "object": {
                "type": "string",
                "description": "The type of the deal update. (Possible object types - dealChange, note, activity, mailMessage, invoice, document, file)"
              },
              "timestamp": {
                "type": "string",
                "description": "The creation date and time of the update"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "deal": {
              "type": "object",
              "properties": {
                "DEAL_ID": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the deal associated with the item"
                    },
                    "title": {
                      "type": "string",
                      "description": "The title of the deal associated with the item"
                    },
                    "value": {
                      "type": "number",
                      "description": "The value of the deal that is associated with the item"
                    },
                    "status": {
                      "type": "string",
                      "description": "The status of the deal associated with the item"
                    },
                    "currency": {
                      "type": "string",
                      "description": "The currency of the deal value"
                    },
                    "stage_id": {
                      "type": "integer",
                      "description": "The ID of the stage the deal is currently at"
                    },
                    "pipeline_id": {
                      "type": "integer",
                      "description": "The ID of the pipeline the deal is in"
                    }
                  },
                  "description": "The ID of the deal which is associated with the item"
                }
              }
            },
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getDealUpdatesResponse200"
}
object DealsListFollowersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the user follower"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal which the follower was added to"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the follower was added to the person"
              }
            }
          },
          "description": "The list of followers"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFollowersResponse200"
}
object DealsListMailMessagesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message copies (object)"
                      },
                      "id": {
                        "type": "integer",
                        "description": "ID of the mail message."
                      },
                      "to": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message receiver (object)"
                      },
                      "bcc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message blind copies (object)"
                      },
                      "from": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message sender (object)"
                      },
                      "draft": {
                        "type": "string",
                        "description": "If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`."
                      },
                      "snippet": {
                        "type": "string",
                        "description": "The snippet of mail message. Snippet length is up to 225 characters."
                      },
                      "subject": {
                        "type": "string",
                        "description": "The subject of mail message"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "ID of the user whom mail message will be assigned to"
                      },
                      "add_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The insertion into the database time of the mail message"
                      },
                      "body_url": {
                        "type": "string",
                        "description": "The mail message body URL"
                      },
                      "read_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is read or not by the user"
                      },
                      "sent_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent or not"
                      },
                      "account_id": {
                        "type": "string",
                        "description": "The connection account ID"
                      },
                      "draft_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is a draft or not"
                      },
                      "synced_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is synced with the provider or not"
                      },
                      "update_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The updating time in the database of the mail message"
                      },
                      "deleted_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is deleted or not"
                      },
                      "message_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Creation or receival time of the mail message"
                      },
                      "has_body_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has a body or not"
                      },
                      "mail_thread_id": {
                        "type": "integer",
                        "description": "ID of the mail message thread"
                      },
                      "smart_bcc_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been created by Smart Email BCC feature or not"
                      },
                      "has_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment or not"
                      },
                      "mail_tracking_status": {
                        "enum": [
                          "opened",
                          "not opened"
                        ],
                        "type": "string",
                        "nullable": true,
                        "description": "The status of tracking mail message. Value is `null` if tracking is not enabled."
                      },
                      "sent_from_pipedrive_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent from Pipedrive app or not"
                      },
                      "has_real_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment (which is not inline) or not"
                      },
                      "has_inline_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an inline attachment or not"
                      },
                      "mail_link_tracking_enabled_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the link tracking in mail message body is enabled."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "nylas_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the sync provider"
                      },
                      "item_type": {
                        "type": "string",
                        "description": "The type of the data item"
                      },
                      "s3_bucket": {
                        "type": "string",
                        "description": "The name of the S3 bucket"
                      },
                      "timestamp": {
                        "type": "string",
                        "description": "The add date and time of the Mail Message"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company"
                      },
                      "template_id": {
                        "type": "integer",
                        "description": "The ID of the mail template"
                      },
                      "mua_message_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the mail user agent"
                      },
                      "s3_bucket_path": {
                        "type": "string",
                        "description": "The path of the S3 bucket"
                      },
                      "external_deleted_flag": {
                        "type": "boolean",
                        "description": "If the Mail Message has been deleted on the provider side or not"
                      }
                    }
                  }
                ],
                "title": "mailMessageItemForList"
              },
              "object": {
                "type": "string",
                "description": "The type of the data item"
              },
              "timestamp": {
                "type": "string",
                "description": "The date and time when the item was created"
              }
            }
          },
          "description": "The array of mail messages"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedMailMessagesResponse200"
}
object DealsListParticipantsChangelogResponse
{
  "type": "object",
  "title": "getParticipantsChangelog200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "description": "The deal participant action log time"
              },
              "action": {
                "type": "string",
                "description": "Deal participant action type"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person"
              },
              "actor_user_id": {
                "type": "integer",
                "description": "The ID of the user"
              }
            }
          }
        ],
        "title": "participantChangelogItem"
      },
      "description": "The array of participant changelog"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object DealsListParticipantsResponse
{
  "type": "object",
  "title": "getDealParticipantsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the person"
              },
              "email": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                    },
                    "value": {
                      "type": "string",
                      "description": "Email"
                    },
                    "primary": {
                      "type": "boolean",
                      "description": "Boolean that indicates if email is primary for the person or not"
                    }
                  }
                },
                "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
              },
              "label": {
                "type": "integer",
                "description": "The label assigned to the person"
              },
              "phone": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                    },
                    "value": {
                      "type": "string",
                      "description": "The phone number"
                    },
                    "primary": {
                      "type": "boolean",
                      "description": "Boolean that indicates if phone number is primary for the person or not"
                    }
                  }
                },
                "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
              },
              "cc_email": {
                "type": "string",
                "description": "The BCC email associated with the person"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the person"
              },
              "company_id": {
                "type": "integer",
                "description": "The ID of the company related to the person"
              },
              "first_char": {
                "type": "string",
                "description": "The first letter of the name of the person"
              },
              "owner_name": {
                "type": "string",
                "description": "The name of the owner associated with the person"
              },
              "picture_id": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the picture associated with the item"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "item_id": {
                        "type": "integer",
                        "description": "The ID of related item"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The add time of the picture"
                      },
                      "pictures": {
                        "type": "object",
                        "properties": {
                          "128": {
                            "type": "string",
                            "description": "The URL of the 128*128 picture"
                          },
                          "512": {
                            "type": "string",
                            "description": "The URL of the 512*512 picture"
                          }
                        }
                      },
                      "item_type": {
                        "type": "string",
                        "description": "The type of item the picture is related to"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the associated picture is active or not"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The update time of the picture"
                      },
                      "added_by_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who added the picture"
                      }
                    }
                  }
                ]
              },
              "visible_to": {
                "type": "string",
                "description": "The visibility group ID of who can see the person"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the person is active or not"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
              }
            }
          },
          {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "org_id": {
                        "allOf": [
                          {
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the organization associated with the item"
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "The address of the organization"
                                  },
                                  "cc_email": {
                                    "type": "string",
                                    "description": "The BCC email of the organization associated with the item"
                                  },
                                  "owner_id": {
                                    "type": "integer",
                                    "description": "The ID of the owner of the organization that is associated with the item"
                                  },
                                  "people_count": {
                                    "type": "integer",
                                    "description": "The number of people connected with the organization that is associated with the item"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "integer",
                                    "description": "The ID of the organization"
                                  }
                                }
                              }
                            ],
                            "title": "relationshipOrganizationInfoItem"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "active_flag": {
                                "type": "boolean",
                                "description": "Whether the associated organization is active or not"
                              }
                            }
                          }
                        ],
                        "title": "relationshipOrganizationInfoItemWithActiveFlag"
                      },
                      "owner_id": {
                        "allOf": [
                          {
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "The ID of the user"
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the user"
                              },
                              "email": {
                                "type": "string",
                                "description": "The email of the user"
                              },
                              "has_pic": {
                                "type": "integer",
                                "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                              },
                              "pic_hash": {
                                "type": "string",
                                "nullable": true,
                                "description": "The user picture hash"
                              },
                              "active_flag": {
                                "type": "boolean",
                                "description": "Whether the user is active or not"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "description": "The ID of the owner"
                              }
                            }
                          }
                        ],
                        "title": "owner"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the person"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "The last name of the person"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "The first name of the person"
                      }
                    }
                  }
                ],
                "title": "personNameInfoWithOrgAndOwnerId"
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "files_count": {
                            "type": "integer",
                            "description": "The count of files related to the person"
                          },
                          "notes_count": {
                            "type": "integer",
                            "description": "The count of notes related to the person"
                          },
                          "followers_count": {
                            "type": "integer",
                            "description": "The count of followers related to the person"
                          },
                          "activities_count": {
                            "type": "integer",
                            "description": "The count of activities related to the person"
                          },
                          "email_messages_count": {
                            "type": "integer",
                            "description": "The count of email messages related to the person"
                          },
                          "done_activities_count": {
                            "type": "integer",
                            "description": "The count of done activities related to the person"
                          },
                          "undone_activities_count": {
                            "type": "integer",
                            "description": "The count of undone activities related to the person"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "last_incoming_mail_time": {
                            "type": "string",
                            "description": "The date and time of the last incoming email associated with the person"
                          },
                          "last_outgoing_mail_time": {
                            "type": "string",
                            "description": "The date and time of the last outgoing email associated with the person"
                          }
                        }
                      }
                    ],
                    "title": "personCountAndEmailInfo"
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "won_deals_count": {
                            "type": "integer",
                            "description": "The count of won deals related with the item"
                          },
                          "lost_deals_count": {
                            "type": "integer",
                            "description": "The count of lost deals related with the item"
                          },
                          "open_deals_count": {
                            "type": "integer",
                            "description": "The count of open deals related with the item"
                          },
                          "closed_deals_count": {
                            "type": "integer",
                            "description": "The count of closed deals related with the item"
                          },
                          "related_won_deals_count": {
                            "type": "integer",
                            "description": "The count of related won deals related with the item"
                          },
                          "related_lost_deals_count": {
                            "type": "integer",
                            "description": "The count of related lost deals related with the item"
                          },
                          "related_open_deals_count": {
                            "type": "integer",
                            "description": "The count of related open deals related with the item"
                          },
                          "related_closed_deals_count": {
                            "type": "integer",
                            "description": "The count of related closed deals related with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "last_activity_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The ID of the last activity associated with the deal"
                          },
                          "next_activity_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The ID of the next activity associated with the deal"
                          },
                          "last_activity_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "The date of the last activity associated with the deal"
                          },
                          "next_activity_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "The date of the next activity associated with the deal"
                          },
                          "next_activity_time": {
                            "type": "string",
                            "nullable": true,
                            "description": "The time of the next activity associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealCountAndActivityInfo"
                  }
                ],
                "title": "personCountEmailDealAndActivityInfo"
              }
            ],
            "title": "additionalPersonInfo"
          }
        ],
        "title": "personItem"
      },
      "description": "The array of participants"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object DealsListPermittedUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    }
  ],
  "title": "listPermittedUsersResponse200"
}
object DealsListPersonsAssociatedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the person"
                  },
                  "email": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "Email"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if email is primary for the person or not"
                        }
                      }
                    },
                    "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                  },
                  "label": {
                    "type": "integer",
                    "description": "The label assigned to the person"
                  },
                  "phone": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "The phone number"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if phone number is primary for the person or not"
                        }
                      }
                    },
                    "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email associated with the person"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the person"
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The ID of the company related to the person"
                  },
                  "first_char": {
                    "type": "string",
                    "description": "The first letter of the name of the person"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the owner associated with the person"
                  },
                  "picture_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the picture associated with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "item_id": {
                            "type": "integer",
                            "description": "The ID of related item"
                          },
                          "add_time": {
                            "type": "string",
                            "description": "The add time of the picture"
                          },
                          "pictures": {
                            "type": "object",
                            "properties": {
                              "128": {
                                "type": "string",
                                "description": "The URL of the 128*128 picture"
                              },
                              "512": {
                                "type": "string",
                                "description": "The URL of the 512*512 picture"
                              }
                            }
                          },
                          "item_type": {
                            "type": "string",
                            "description": "The type of item the picture is related to"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated picture is active or not"
                          },
                          "update_time": {
                            "type": "string",
                            "description": "The update time of the picture"
                          },
                          "added_by_user_id": {
                            "type": "integer",
                            "description": "The ID of the user who added the picture"
                          }
                        }
                      }
                    ]
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility group ID of who can see the person"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the person is active or not"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "org_id": {
                            "allOf": [
                              {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "description": "The name of the organization associated with the item"
                                      },
                                      "address": {
                                        "type": "string",
                                        "description": "The address of the organization"
                                      },
                                      "cc_email": {
                                        "type": "string",
                                        "description": "The BCC email of the organization associated with the item"
                                      },
                                      "owner_id": {
                                        "type": "integer",
                                        "description": "The ID of the owner of the organization that is associated with the item"
                                      },
                                      "people_count": {
                                        "type": "integer",
                                        "description": "The number of people connected with the organization that is associated with the item"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "integer",
                                        "description": "The ID of the organization"
                                      }
                                    }
                                  }
                                ],
                                "title": "relationshipOrganizationInfoItem"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the associated organization is active or not"
                                  }
                                }
                              }
                            ],
                            "title": "relationshipOrganizationInfoItemWithActiveFlag"
                          },
                          "owner_id": {
                            "allOf": [
                              {
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "The ID of the user"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the user"
                                  },
                                  "email": {
                                    "type": "string",
                                    "description": "The email of the user"
                                  },
                                  "has_pic": {
                                    "type": "integer",
                                    "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                  },
                                  "pic_hash": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The user picture hash"
                                  },
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the user is active or not"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "integer",
                                    "description": "The ID of the owner"
                                  }
                                }
                              }
                            ],
                            "title": "owner"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person"
                          },
                          "last_name": {
                            "type": "string",
                            "description": "The last name of the person"
                          },
                          "first_name": {
                            "type": "string",
                            "description": "The first name of the person"
                          }
                        }
                      }
                    ],
                    "title": "personNameInfoWithOrgAndOwnerId"
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "files_count": {
                                "type": "integer",
                                "description": "The count of files related to the person"
                              },
                              "notes_count": {
                                "type": "integer",
                                "description": "The count of notes related to the person"
                              },
                              "followers_count": {
                                "type": "integer",
                                "description": "The count of followers related to the person"
                              },
                              "activities_count": {
                                "type": "integer",
                                "description": "The count of activities related to the person"
                              },
                              "email_messages_count": {
                                "type": "integer",
                                "description": "The count of email messages related to the person"
                              },
                              "done_activities_count": {
                                "type": "integer",
                                "description": "The count of done activities related to the person"
                              },
                              "undone_activities_count": {
                                "type": "integer",
                                "description": "The count of undone activities related to the person"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_incoming_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last incoming email associated with the person"
                              },
                              "last_outgoing_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last outgoing email associated with the person"
                              }
                            }
                          }
                        ],
                        "title": "personCountAndEmailInfo"
                      },
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "won_deals_count": {
                                "type": "integer",
                                "description": "The count of won deals related with the item"
                              },
                              "lost_deals_count": {
                                "type": "integer",
                                "description": "The count of lost deals related with the item"
                              },
                              "open_deals_count": {
                                "type": "integer",
                                "description": "The count of open deals related with the item"
                              },
                              "closed_deals_count": {
                                "type": "integer",
                                "description": "The count of closed deals related with the item"
                              },
                              "related_won_deals_count": {
                                "type": "integer",
                                "description": "The count of related won deals related with the item"
                              },
                              "related_lost_deals_count": {
                                "type": "integer",
                                "description": "The count of related lost deals related with the item"
                              },
                              "related_open_deals_count": {
                                "type": "integer",
                                "description": "The count of related open deals related with the item"
                              },
                              "related_closed_deals_count": {
                                "type": "integer",
                                "description": "The count of related closed deals related with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the last activity associated with the deal"
                              },
                              "next_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the next activity associated with the deal"
                              },
                              "last_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the last activity associated with the deal"
                              },
                              "next_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the next activity associated with the deal"
                              },
                              "next_activity_time": {
                                "type": "string",
                                "nullable": true,
                                "description": "The time of the next activity associated with the deal"
                              }
                            }
                          }
                        ],
                        "title": "dealCountAndActivityInfo"
                      }
                    ],
                    "title": "personCountEmailDealAndActivityInfo"
                  }
                ],
                "title": "additionalPersonInfo"
              }
            ],
            "title": "personItem"
          },
          "description": "The array of persons"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "listPersonsResponse200"
}
object DealsMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteDealResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the deal that was deleted"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object DealsMergeDealsRequest
{
  "type": "object",
  "title": "mergeDealsRequest",
  "required": [
    "merge_with_id"
  ],
  "properties": {
    "merge_with_id": {
      "type": "integer",
      "description": "The ID of the deal that the deal will be merged with"
    }
  }
}
object DealsMergeDealsResponse
{
  "type": "object",
  "title": "mergeDealsResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal"
                },
                "org_id": {
                  "type": "integer",
                  "description": "The ID of the organization associated with the deal"
                },
                "user_id": {
                  "type": "integer",
                  "description": "The ID of the user"
                },
                "person_id": {
                  "type": "integer",
                  "description": "The ID of the person associated with the deal"
                },
                "creator_user_id": {
                  "type": "integer",
                  "description": "The ID of the deal creator"
                }
              }
            },
            {
              "type": "object",
              "title": "baseDeal",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "The label or multiple labels assigned to the deal"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether the deal is active or not"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal"
                },
                "deleted": {
                  "type": "boolean",
                  "description": "Whether the deal is deleted or not"
                },
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the deal"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email of the deal"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency associated with the deal"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the deal"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the deal stage"
                },
                "won_time": {
                  "type": "string",
                  "description": "The date and time of changing the deal status as won"
                },
                "lost_time": {
                  "type": "string",
                  "description": "The date and time of changing the deal status as lost"
                },
                "close_time": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date and time of closing the deal"
                },
                "org_hidden": {
                  "type": "boolean",
                  "description": "If the organization that is associated with the deal is hidden or not"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the deal owner"
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility of the deal"
                },
                "files_count": {
                  "type": "integer",
                  "description": "The number of files associated with the deal"
                },
                "lost_reason": {
                  "type": "string",
                  "nullable": true,
                  "description": "The reason for losing the deal"
                },
                "notes_count": {
                  "type": "integer",
                  "description": "The number of notes associated with the deal"
                },
                "person_name": {
                  "type": "string",
                  "description": "The name of the person associated with the deal"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline associated with the deal"
                },
                "probability": {
                  "type": "number",
                  "nullable": true,
                  "description": "The success probability percentage of the deal"
                },
                "rotten_time": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date and time of changing the deal status as rotten"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the deal"
                },
                "person_hidden": {
                  "type": "boolean",
                  "description": "If the person that is associated with the deal is hidden or not"
                },
                "first_won_time": {
                  "type": "string",
                  "description": "The date and time of the first time changing the deal status as won"
                },
                "products_count": {
                  "type": "integer",
                  "description": "The number of products associated with the deal"
                },
                "stage_order_nr": {
                  "type": "integer",
                  "description": "The order number of the deal stage associated with the deal"
                },
                "weighted_value": {
                  "type": "number",
                  "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                },
                "followers_count": {
                  "type": "integer",
                  "description": "The number of followers associated with the deal"
                },
                "formatted_value": {
                  "type": "string",
                  "description": "The deal value formatted with selected currency. E.g. US$500"
                },
                "activities_count": {
                  "type": "integer",
                  "description": "The number of activities associated with the deal"
                },
                "last_activity_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the last activity associated with the deal"
                },
                "next_activity_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the next activity associated with the deal"
                },
                "stage_change_time": {
                  "type": "string",
                  "description": "The last updated date and time of the deal stage"
                },
                "last_activity_date": {
                  "type": "string",
                  "nullable": true,
                  "description": "The date of the last activity associated with the deal"
                },
                "next_activity_date": {
                  "type": "string",
                  "description": "The date of the next activity associated with the deal"
                },
                "next_activity_note": {
                  "type": "string",
                  "description": "The note of the next activity associated with the deal"
                },
                "next_activity_time": {
                  "type": "string",
                  "description": "The time of the next activity associated with the deal"
                },
                "next_activity_type": {
                  "type": "string",
                  "description": "The type of the next activity associated with the deal"
                },
                "participants_count": {
                  "type": "integer",
                  "description": "The number of participants associated with the deal"
                },
                "expected_close_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The expected close date of the deal"
                },
                "email_messages_count": {
                  "type": "integer",
                  "description": "The number of emails associated with the deal"
                },
                "done_activities_count": {
                  "type": "integer",
                  "description": "The number of completed activities associated with the deal"
                },
                "next_activity_subject": {
                  "type": "string",
                  "description": "The subject of the next activity associated with the deal"
                },
                "next_activity_duration": {
                  "type": "string",
                  "description": "The duration of the next activity associated with the deal"
                },
                "last_incoming_mail_time": {
                  "type": "string",
                  "description": "The date and time of the last incoming email associated with the deal"
                },
                "last_outgoing_mail_time": {
                  "type": "string",
                  "description": "The date and time of the last outgoing email associated with the deal"
                },
                "undone_activities_count": {
                  "type": "integer",
                  "description": "The number of incomplete activities associated with the deal"
                },
                "weighted_value_currency": {
                  "type": "string",
                  "description": "The currency associated with the deal"
                },
                "formatted_weighted_value": {
                  "type": "string",
                  "description": "The weighted_value formatted with selected currency. E.g. US$500"
                }
              }
            }
          ],
          "title": "dealStrict"
        },
        {
          "type": "object",
          "properties": {
            "merge_what_id": {
              "type": "integer",
              "description": "The deal ID of the deal which the original deal was merged with"
            }
          }
        }
      ]
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsRemoveFollowerResponse
{
  "type": "object",
  "title": "deleteDealFollowerResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the deal follower that was deleted"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object DealsSearchByTitleAndNotesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the item"
                      },
                      "notes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of notes"
                      },
                      "owner": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the owner of the deal"
                          }
                        }
                      },
                      "stage": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the stage of the deal"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the stage of the deal"
                          }
                        }
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the deal"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The value of the deal"
                      },
                      "person": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the person the deal is associated with"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the person the deal is associated with"
                          }
                        }
                      },
                      "status": {
                        "type": "string",
                        "description": "The status of the deal"
                      },
                      "currency": {
                        "type": "string",
                        "description": "The currency of the deal"
                      },
                      "visible_to": {
                        "type": "integer",
                        "description": "The visibility of the deal"
                      },
                      "organization": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the organization the deal is associated with"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the organization the deal is associated with"
                          }
                        }
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Custom fields"
                      }
                    }
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of deals"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchDealsResponse200"
}
object DealsUpdateProductAttachmentRequest
{
  "type": "object",
  "title": "UpdateDealProductRequest",
  "properties": {
    "tax": {
      "type": "number",
      "default": 0,
      "description": "The tax percentage"
    },
    "comments": {
      "type": "string",
      "description": "A textual comment associated with this product-deal attachment"
    },
    "discount": {
      "type": "number",
      "default": 0,
      "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage."
    },
    "duration": {
      "type": "number",
      "default": 1,
      "description": "The duration of the product"
    },
    "quantity": {
      "type": "integer",
      "description": "How many items of this product will be added to the deal"
    },
    "item_price": {
      "type": "number",
      "description": "The price at which this product will be added to the deal"
    },
    "product_id": {
      "type": "integer",
      "description": "The ID of the product to use"
    },
    "tax_method": {
      "enum": [
        "exclusive",
        "inclusive",
        "none"
      ],
      "type": "string",
      "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount."
    },
    "enabled_flag": {
      "type": "boolean",
      "default": true,
      "description": "Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default."
    },
    "discount_type": {
      "enum": [
        "percentage",
        "amount"
      ],
      "type": "string",
      "default": "percentage",
      "description": "The type of the discount's value."
    },
    "duration_unit": {
      "type": "string",
      "allOf": [
        {
          "enum": [
            "hourly",
            "daily",
            "weekly",
            "monthly",
            "yearly"
          ],
          "type": "string",
          "title": "dealProductUnitDuration"
        }
      ],
      "description": "The unit duration of the product"
    },
    "product_variation_id": {
      "type": "integer",
      "description": "The ID of the product variation to use. When omitted, no variation will be used."
    }
  }
}
object DealsUpdateProductAttachmentResponse
{
  "type": "object",
  "title": "getProductAttachementResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "title": "basicDealProductRequest",
              "required": [
                "product_id",
                "item_price",
                "quantity"
              ],
              "properties": {
                "tax": {
                  "type": "number",
                  "default": 0,
                  "description": "The tax percentage"
                },
                "comments": {
                  "type": "string",
                  "description": "A textual comment associated with this product-deal attachment"
                },
                "discount": {
                  "type": "number",
                  "default": 0,
                  "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage."
                },
                "duration": {
                  "type": "number",
                  "default": 1,
                  "description": "The duration of the product. If omitted, will be set to 1."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity – e.g. how many items of this product will be added to the deal"
                },
                "item_price": {
                  "type": "number",
                  "description": "The price at which this product will be added to the deal"
                },
                "product_id": {
                  "type": "integer",
                  "description": "The ID of the product to use"
                },
                "tax_method": {
                  "enum": [
                    "exclusive",
                    "inclusive",
                    "none"
                  ],
                  "type": "string",
                  "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal."
                },
                "enabled_flag": {
                  "type": "boolean",
                  "default": true,
                  "description": "Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default."
                },
                "discount_type": {
                  "enum": [
                    "percentage",
                    "amount"
                  ],
                  "type": "string",
                  "default": "percentage",
                  "description": "The type of the discount's value."
                },
                "duration_unit": {
                  "type": "string",
                  "allOf": [
                    {
                      "enum": [
                        "hourly",
                        "daily",
                        "weekly",
                        "monthly",
                        "yearly"
                      ],
                      "type": "string",
                      "title": "dealProductUnitDuration"
                    }
                  ],
                  "description": "The unit duration of the product"
                },
                "product_variation_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the product variation to use. When omitted, no variation will be used."
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal-product (the ID of the product attached to the deal)"
                },
                "sum": {
                  "type": "number",
                  "description": "The sum of all the products attached to the deal"
                },
                "tax": {
                  "type": "number",
                  "description": "The product tax"
                },
                "name": {
                  "type": "string",
                  "description": "The product name"
                },
                "deal_id": {
                  "type": "integer",
                  "description": "The ID of the deal"
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the product was added to the deal"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency associated with the deal product"
                },
                "last_edit": {
                  "type": "string",
                  "description": "The date and time when the deal product was last edited"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company"
                },
                "product_id": {
                  "type": "integer",
                  "description": "The ID of the product"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the product is active or not"
                },
                "duration_unit": {
                  "type": "string",
                  "description": "The type of the duration. (For example hourly, daily, etc.)"
                }
              }
            }
          ]
        }
      ],
      "description": "The updated product object attached to the deal"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object DealsUpdatePropertiesRequest
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "dealTitleParam",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the deal"
        }
      }
    },
    {
      "type": "object",
      "title": "updateDealParameters",
      "properties": {
        "label": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Array of the deal labels IDs."
        },
        "value": {
          "type": "string",
          "description": "The value of the deal."
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first."
        },
        "status": {
          "enum": [
            "open",
            "won",
            "lost",
            "deleted"
          ],
          "type": "string",
          "description": "open = Open, won = Won, lost = Lost, deleted = Deleted."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user which will be the new owner of the deal."
        },
        "currency": {
          "type": "string",
          "description": "The currency of the deal. Accepts a 3-character currency code."
        },
        "stage_id": {
          "type": "integer",
          "description": "The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`."
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first."
        },
        "pipeline_id": {
          "type": "integer",
          "description": "The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored."
        }
      }
    },
    {
      "type": "object",
      "title": "basicDeal",
      "properties": {
        "won_time": {
          "type": "string",
          "description": "The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`."
        },
        "lost_time": {
          "type": "string",
          "description": "The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`."
        },
        "close_time": {
          "type": "string",
          "nullable": true,
          "description": "The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the deal. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "lost_reason": {
          "type": "string",
          "description": "The optional message about why the deal was lost (to be used when status = lost)"
        },
        "probability": {
          "type": "number",
          "description": "The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled."
        },
        "expected_close_date": {
          "type": "string",
          "format": "date",
          "description": "The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD."
        }
      }
    }
  ],
  "title": "updateDealRequest"
}
object DealsUpdatePropertiesResponse
{
  "type": "object",
  "title": "dealResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deal"
            },
            "org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the deal"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization that is associated with the deal"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the deal"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the deal"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the deal"
                    }
                  },
                  "description": "The organization which is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the deal"
                    }
                  }
                }
              ],
              "title": "dealOrganizationDataWithId"
            },
            "user_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "boolean",
                      "description": "If the user has a picture or not"
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  },
                  "description": "The user who is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the user"
                    }
                  }
                }
              ],
              "title": "dealUserDataWithId"
            },
            "person_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the deal"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "If this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the deal"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the deal"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "If this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the deal"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the deal"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  },
                  "description": "The person who is associated with the deal"
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the person associated with the deal"
                    }
                  }
                }
              ],
              "title": "dealPersonDataWithId"
            },
            "creator_user_id": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal creator"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the deal creator"
                },
                "email": {
                  "type": "string",
                  "description": "The email of the deal creator"
                },
                "value": {
                  "type": "integer",
                  "description": "The ID of the deal creator"
                },
                "has_pic": {
                  "type": "boolean",
                  "description": "If the creator has a picture or not"
                },
                "pic_hash": {
                  "type": "string",
                  "nullable": true,
                  "description": "The creator picture hash"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the creator is active or not"
                }
              },
              "description": "The creator of the deal"
            }
          }
        },
        {
          "type": "object",
          "title": "baseDeal",
          "properties": {
            "label": {
              "type": "string",
              "description": "The label or multiple labels assigned to the deal"
            },
            "title": {
              "type": "string",
              "description": "The title of the deal"
            },
            "value": {
              "type": "number",
              "description": "The value of the deal"
            },
            "active": {
              "type": "boolean",
              "description": "Whether the deal is active or not"
            },
            "status": {
              "type": "string",
              "description": "The status of the deal"
            },
            "deleted": {
              "type": "boolean",
              "description": "Whether the deal is deleted or not"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the deal"
            },
            "cc_email": {
              "type": "string",
              "description": "The BCC email of the deal"
            },
            "currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "org_name": {
              "type": "string",
              "description": "The name of the organization associated with the deal"
            },
            "stage_id": {
              "type": "integer",
              "description": "The ID of the deal stage"
            },
            "won_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as won"
            },
            "lost_time": {
              "type": "string",
              "description": "The date and time of changing the deal status as lost"
            },
            "close_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of closing the deal"
            },
            "org_hidden": {
              "type": "boolean",
              "description": "If the organization that is associated with the deal is hidden or not"
            },
            "owner_name": {
              "type": "string",
              "description": "The name of the deal owner"
            },
            "visible_to": {
              "type": "string",
              "description": "The visibility of the deal"
            },
            "files_count": {
              "type": "integer",
              "description": "The number of files associated with the deal"
            },
            "lost_reason": {
              "type": "string",
              "nullable": true,
              "description": "The reason for losing the deal"
            },
            "notes_count": {
              "type": "integer",
              "description": "The number of notes associated with the deal"
            },
            "person_name": {
              "type": "string",
              "description": "The name of the person associated with the deal"
            },
            "pipeline_id": {
              "type": "integer",
              "description": "The ID of the pipeline associated with the deal"
            },
            "probability": {
              "type": "number",
              "nullable": true,
              "description": "The success probability percentage of the deal"
            },
            "rotten_time": {
              "type": "string",
              "nullable": true,
              "description": "The date and time of changing the deal status as rotten"
            },
            "update_time": {
              "type": "string",
              "description": "The last updated date and time of the deal"
            },
            "person_hidden": {
              "type": "boolean",
              "description": "If the person that is associated with the deal is hidden or not"
            },
            "first_won_time": {
              "type": "string",
              "description": "The date and time of the first time changing the deal status as won"
            },
            "products_count": {
              "type": "integer",
              "description": "The number of products associated with the deal"
            },
            "stage_order_nr": {
              "type": "integer",
              "description": "The order number of the deal stage associated with the deal"
            },
            "weighted_value": {
              "type": "number",
              "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
            },
            "followers_count": {
              "type": "integer",
              "description": "The number of followers associated with the deal"
            },
            "formatted_value": {
              "type": "string",
              "description": "The deal value formatted with selected currency. E.g. US$500"
            },
            "activities_count": {
              "type": "integer",
              "description": "The number of activities associated with the deal"
            },
            "last_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the last activity associated with the deal"
            },
            "next_activity_id": {
              "type": "integer",
              "nullable": true,
              "description": "The ID of the next activity associated with the deal"
            },
            "stage_change_time": {
              "type": "string",
              "description": "The last updated date and time of the deal stage"
            },
            "last_activity_date": {
              "type": "string",
              "nullable": true,
              "description": "The date of the last activity associated with the deal"
            },
            "next_activity_date": {
              "type": "string",
              "description": "The date of the next activity associated with the deal"
            },
            "next_activity_note": {
              "type": "string",
              "description": "The note of the next activity associated with the deal"
            },
            "next_activity_time": {
              "type": "string",
              "description": "The time of the next activity associated with the deal"
            },
            "next_activity_type": {
              "type": "string",
              "description": "The type of the next activity associated with the deal"
            },
            "participants_count": {
              "type": "integer",
              "description": "The number of participants associated with the deal"
            },
            "expected_close_date": {
              "type": "string",
              "format": "date",
              "description": "The expected close date of the deal"
            },
            "email_messages_count": {
              "type": "integer",
              "description": "The number of emails associated with the deal"
            },
            "done_activities_count": {
              "type": "integer",
              "description": "The number of completed activities associated with the deal"
            },
            "next_activity_subject": {
              "type": "string",
              "description": "The subject of the next activity associated with the deal"
            },
            "next_activity_duration": {
              "type": "string",
              "description": "The duration of the next activity associated with the deal"
            },
            "last_incoming_mail_time": {
              "type": "string",
              "description": "The date and time of the last incoming email associated with the deal"
            },
            "last_outgoing_mail_time": {
              "type": "string",
              "description": "The date and time of the last outgoing email associated with the deal"
            },
            "undone_activities_count": {
              "type": "integer",
              "description": "The number of incomplete activities associated with the deal"
            },
            "weighted_value_currency": {
              "type": "string",
              "description": "The currency associated with the deal"
            },
            "formatted_weighted_value": {
              "type": "string",
              "description": "The weighted_value formatted with selected currency. E.g. US$500"
            }
          }
        }
      ],
      "title": "dealNonStrict"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated person is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the associated organization is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object FilesCreateRemoteFileAndLinkRequest
{
  "type": "object",
  "title": "addFileAndLinkItRequest",
  "required": [
    "file_type",
    "title",
    "item_type",
    "item_id",
    "remote_location"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "The title of the file"
    },
    "item_id": {
      "type": "integer",
      "description": "The ID of the item to associate the file with"
    },
    "file_type": {
      "enum": [
        "gdoc",
        "gslides",
        "gsheet",
        "gform",
        "gdraw"
      ],
      "type": "string",
      "description": "The file type"
    },
    "item_type": {
      "enum": [
        "deal",
        "organization",
        "person"
      ],
      "type": "string",
      "description": "The item type"
    },
    "remote_location": {
      "enum": [
        "googledrive"
      ],
      "type": "string",
      "description": "The location type to send the file to. Only `googledrive` is supported at the moment."
    }
  }
}
object FilesCreateRemoteFileAndLinkResponse
{
  "type": "object",
  "title": "addFileAndLinkItResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        },
        "cid": {
          "type": "string",
          "description": "The ID of the inline attachment"
        },
        "url": {
          "type": "string",
          "description": "The URL of the download file"
        },
        "name": {
          "type": "string",
          "description": "The visible name of the file"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization to associate the file with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal to associate the file with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead to associate the file with"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user to associate the file with"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
        },
        "org_name": {
          "type": "string",
          "description": "The name of the organization associated with the file"
        },
        "deal_name": {
          "type": "string",
          "description": "The name of the deal associated with the file"
        },
        "file_name": {
          "type": "string",
          "description": "The original name of the file"
        },
        "file_size": {
          "type": "integer",
          "description": "The size of the file"
        },
        "lead_name": {
          "type": "string",
          "description": "The name of the lead associated with the file"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person to associate the file with"
        },
        "remote_id": {
          "type": "string",
          "description": "The ID of the remote item"
        },
        "s3_bucket": {
          "type": "string",
          "description": "The location of the cloud storage"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to associate the file with"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the user is active or not. false = Not activated, true = Activated"
        },
        "activity_id": {
          "type": "integer",
          "description": "The ID of the activity to associate the file with"
        },
        "description": {
          "type": "string",
          "description": "The description of the file"
        },
        "inline_flag": {
          "type": "boolean",
          "description": "Whether the file was uploaded as inline or not"
        },
        "person_name": {
          "type": "string",
          "description": "The name of the person associated with the file"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_name": {
          "type": "string",
          "description": "The name of the product associated with the file"
        },
        "mail_message_id": {
          "type": "string",
          "description": "The ID of the mail message to associate the file with"
        },
        "remote_location": {
          "type": "string",
          "description": "The location type to send the file to. Only googledrive is supported at the moment."
        },
        "mail_template_id": {
          "type": "string",
          "description": "The ID of the mail template to associate the file with"
        }
      },
      "description": "The file data"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
string FilesDownloadFileResponse
{
  "type": "string",
  "title": "downloadFileResponse200",
  "format": "byte"
}
object FilesGetAllFilesResponse
{
  "type": "object",
  "title": "getFilesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the file"
          },
          "cid": {
            "type": "string",
            "description": "The ID of the inline attachment"
          },
          "url": {
            "type": "string",
            "description": "The URL of the download file"
          },
          "name": {
            "type": "string",
            "description": "The visible name of the file"
          },
          "org_id": {
            "type": "integer",
            "description": "The ID of the organization to associate the file with"
          },
          "deal_id": {
            "type": "integer",
            "description": "The ID of the deal to associate the file with"
          },
          "lead_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the lead to associate the file with"
          },
          "user_id": {
            "type": "integer",
            "description": "The ID of the user to associate the file with"
          },
          "add_time": {
            "type": "string",
            "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
          },
          "org_name": {
            "type": "string",
            "description": "The name of the organization associated with the file"
          },
          "deal_name": {
            "type": "string",
            "description": "The name of the deal associated with the file"
          },
          "file_name": {
            "type": "string",
            "description": "The original name of the file"
          },
          "file_size": {
            "type": "integer",
            "description": "The size of the file"
          },
          "lead_name": {
            "type": "string",
            "description": "The name of the lead associated with the file"
          },
          "person_id": {
            "type": "integer",
            "description": "The ID of the person to associate the file with"
          },
          "remote_id": {
            "type": "string",
            "description": "The ID of the remote item"
          },
          "s3_bucket": {
            "type": "string",
            "description": "The location of the cloud storage"
          },
          "product_id": {
            "type": "integer",
            "description": "The ID of the product to associate the file with"
          },
          "active_flag": {
            "type": "boolean",
            "description": "Whether the user is active or not. false = Not activated, true = Activated"
          },
          "activity_id": {
            "type": "integer",
            "description": "The ID of the activity to associate the file with"
          },
          "description": {
            "type": "string",
            "description": "The description of the file"
          },
          "inline_flag": {
            "type": "boolean",
            "description": "Whether the file was uploaded as inline or not"
          },
          "person_name": {
            "type": "string",
            "description": "The name of the person associated with the file"
          },
          "update_time": {
            "type": "string",
            "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
          },
          "product_name": {
            "type": "string",
            "description": "The name of the product associated with the file"
          },
          "mail_message_id": {
            "type": "string",
            "description": "The ID of the mail message to associate the file with"
          },
          "remote_location": {
            "type": "string",
            "description": "The location type to send the file to. Only googledrive is supported at the moment."
          },
          "mail_template_id": {
            "type": "string",
            "description": "The ID of the mail template to associate the file with"
          }
        },
        "description": "The file data"
      },
      "description": "The array of all uploaded files"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            },
            {
              "type": "object",
              "properties": {
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                }
              }
            }
          ],
          "title": "paginationDetails",
          "description": "Pagination details of the list"
        }
      }
    }
  }
}
object FilesGetOneFileResponse
{
  "type": "object",
  "title": "getFileResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        },
        "cid": {
          "type": "string",
          "description": "The ID of the inline attachment"
        },
        "url": {
          "type": "string",
          "description": "The URL of the download file"
        },
        "name": {
          "type": "string",
          "description": "The visible name of the file"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization to associate the file with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal to associate the file with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead to associate the file with"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user to associate the file with"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
        },
        "org_name": {
          "type": "string",
          "description": "The name of the organization associated with the file"
        },
        "deal_name": {
          "type": "string",
          "description": "The name of the deal associated with the file"
        },
        "file_name": {
          "type": "string",
          "description": "The original name of the file"
        },
        "file_size": {
          "type": "integer",
          "description": "The size of the file"
        },
        "lead_name": {
          "type": "string",
          "description": "The name of the lead associated with the file"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person to associate the file with"
        },
        "remote_id": {
          "type": "string",
          "description": "The ID of the remote item"
        },
        "s3_bucket": {
          "type": "string",
          "description": "The location of the cloud storage"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to associate the file with"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the user is active or not. false = Not activated, true = Activated"
        },
        "activity_id": {
          "type": "integer",
          "description": "The ID of the activity to associate the file with"
        },
        "description": {
          "type": "string",
          "description": "The description of the file"
        },
        "inline_flag": {
          "type": "boolean",
          "description": "Whether the file was uploaded as inline or not"
        },
        "person_name": {
          "type": "string",
          "description": "The name of the person associated with the file"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_name": {
          "type": "string",
          "description": "The name of the product associated with the file"
        },
        "mail_message_id": {
          "type": "string",
          "description": "The ID of the mail message to associate the file with"
        },
        "remote_location": {
          "type": "string",
          "description": "The location type to send the file to. Only googledrive is supported at the moment."
        },
        "mail_template_id": {
          "type": "string",
          "description": "The ID of the mail template to associate the file with"
        }
      },
      "description": "The file data"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object FilesLinkRemoteFileRequest
{
  "type": "object",
  "title": "linkFileToItemRequest",
  "required": [
    "item_type",
    "item_id",
    "remote_id",
    "remote_location"
  ],
  "properties": {
    "item_id": {
      "type": "integer",
      "description": "The ID of the item to associate the file with"
    },
    "item_type": {
      "enum": [
        "deal",
        "organization",
        "person"
      ],
      "type": "string",
      "description": "The item type"
    },
    "remote_id": {
      "type": "string",
      "description": "The remote item ID"
    },
    "remote_location": {
      "enum": [
        "googledrive"
      ],
      "type": "string",
      "description": "The location type to send the file to. Only `googledrive` is supported at the moment."
    }
  }
}
object FilesLinkRemoteFileResponse
{
  "type": "object",
  "title": "linkFileToItemResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        },
        "cid": {
          "type": "string",
          "description": "The ID of the inline attachment"
        },
        "url": {
          "type": "string",
          "description": "The URL of the download file"
        },
        "name": {
          "type": "string",
          "description": "The visible name of the file"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization to associate the file with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal to associate the file with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead to associate the file with"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user to associate the file with"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
        },
        "org_name": {
          "type": "string",
          "description": "The name of the organization associated with the file"
        },
        "deal_name": {
          "type": "string",
          "description": "The name of the deal associated with the file"
        },
        "file_name": {
          "type": "string",
          "description": "The original name of the file"
        },
        "file_size": {
          "type": "integer",
          "description": "The size of the file"
        },
        "lead_name": {
          "type": "string",
          "description": "The name of the lead associated with the file"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person to associate the file with"
        },
        "remote_id": {
          "type": "string",
          "description": "The ID of the remote item"
        },
        "s3_bucket": {
          "type": "string",
          "description": "The location of the cloud storage"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to associate the file with"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the user is active or not. false = Not activated, true = Activated"
        },
        "activity_id": {
          "type": "integer",
          "description": "The ID of the activity to associate the file with"
        },
        "description": {
          "type": "string",
          "description": "The description of the file"
        },
        "inline_flag": {
          "type": "boolean",
          "description": "Whether the file was uploaded as inline or not"
        },
        "person_name": {
          "type": "string",
          "description": "The name of the person associated with the file"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_name": {
          "type": "string",
          "description": "The name of the product associated with the file"
        },
        "mail_message_id": {
          "type": "string",
          "description": "The ID of the mail message to associate the file with"
        },
        "remote_location": {
          "type": "string",
          "description": "The location type to send the file to. Only googledrive is supported at the moment."
        },
        "mail_template_id": {
          "type": "string",
          "description": "The ID of the mail template to associate the file with"
        }
      },
      "description": "The file data"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object FilesMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteFileResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object FilesUpdateDetailsRequest
{
  "type": "object",
  "title": "updateFileRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The visible name of the file"
    },
    "description": {
      "type": "string",
      "description": "The description of the file"
    }
  }
}
object FilesUpdateDetailsResponse
{
  "type": "object",
  "title": "updateFileResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        },
        "cid": {
          "type": "string",
          "description": "The ID of the inline attachment"
        },
        "url": {
          "type": "string",
          "description": "The URL of the download file"
        },
        "name": {
          "type": "string",
          "description": "The visible name of the file"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization to associate the file with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal to associate the file with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead to associate the file with"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user to associate the file with"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
        },
        "org_name": {
          "type": "string",
          "description": "The name of the organization associated with the file"
        },
        "deal_name": {
          "type": "string",
          "description": "The name of the deal associated with the file"
        },
        "file_name": {
          "type": "string",
          "description": "The original name of the file"
        },
        "file_size": {
          "type": "integer",
          "description": "The size of the file"
        },
        "lead_name": {
          "type": "string",
          "description": "The name of the lead associated with the file"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person to associate the file with"
        },
        "remote_id": {
          "type": "string",
          "description": "The ID of the remote item"
        },
        "s3_bucket": {
          "type": "string",
          "description": "The location of the cloud storage"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to associate the file with"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the user is active or not. false = Not activated, true = Activated"
        },
        "activity_id": {
          "type": "integer",
          "description": "The ID of the activity to associate the file with"
        },
        "description": {
          "type": "string",
          "description": "The description of the file"
        },
        "inline_flag": {
          "type": "boolean",
          "description": "Whether the file was uploaded as inline or not"
        },
        "person_name": {
          "type": "string",
          "description": "The name of the person associated with the file"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_name": {
          "type": "string",
          "description": "The name of the product associated with the file"
        },
        "mail_message_id": {
          "type": "string",
          "description": "The ID of the mail message to associate the file with"
        },
        "remote_location": {
          "type": "string",
          "description": "The location type to send the file to. Only googledrive is supported at the moment."
        },
        "mail_template_id": {
          "type": "string",
          "description": "The ID of the mail template to associate the file with"
        }
      },
      "description": "The file data"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object FilesUploadAndAssociateRequest
{
  "type": "object",
  "title": "addFileRequest",
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "A single file, supplied in the multipart/form-data encoding and contained within the given boundaries"
    },
    "org_id": {
      "type": "integer",
      "description": "The ID of the organization to associate file(s) with"
    },
    "deal_id": {
      "type": "integer",
      "description": "The ID of the deal to associate file(s) with"
    },
    "lead_id": {
      "type": "string",
      "format": "uuid",
      "description": "The ID of the lead to associate file(s) with"
    },
    "person_id": {
      "type": "integer",
      "description": "The ID of the person to associate file(s) with"
    },
    "product_id": {
      "type": "integer",
      "description": "The ID of the product to associate file(s) with"
    },
    "activity_id": {
      "type": "integer",
      "description": "The ID of the activity to associate file(s) with"
    }
  }
}
object FilesUploadAndAssociateResponse
{
  "type": "object",
  "title": "addFileResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the file"
        },
        "cid": {
          "type": "string",
          "description": "The ID of the inline attachment"
        },
        "url": {
          "type": "string",
          "description": "The URL of the download file"
        },
        "name": {
          "type": "string",
          "description": "The visible name of the file"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization to associate the file with"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal to associate the file with"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead to associate the file with"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user to associate the file with"
        },
        "add_time": {
          "type": "string",
          "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
        },
        "org_name": {
          "type": "string",
          "description": "The name of the organization associated with the file"
        },
        "deal_name": {
          "type": "string",
          "description": "The name of the deal associated with the file"
        },
        "file_name": {
          "type": "string",
          "description": "The original name of the file"
        },
        "file_size": {
          "type": "integer",
          "description": "The size of the file"
        },
        "lead_name": {
          "type": "string",
          "description": "The name of the lead associated with the file"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person to associate the file with"
        },
        "remote_id": {
          "type": "string",
          "description": "The ID of the remote item"
        },
        "s3_bucket": {
          "type": "string",
          "description": "The location of the cloud storage"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product to associate the file with"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the user is active or not. false = Not activated, true = Activated"
        },
        "activity_id": {
          "type": "integer",
          "description": "The ID of the activity to associate the file with"
        },
        "description": {
          "type": "string",
          "description": "The description of the file"
        },
        "inline_flag": {
          "type": "boolean",
          "description": "Whether the file was uploaded as inline or not"
        },
        "person_name": {
          "type": "string",
          "description": "The name of the person associated with the file"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_name": {
          "type": "string",
          "description": "The name of the product associated with the file"
        },
        "mail_message_id": {
          "type": "string",
          "description": "The ID of the mail message to associate the file with"
        },
        "remote_location": {
          "type": "string",
          "description": "The location type to send the file to. Only googledrive is supported at the moment."
        },
        "mail_template_id": {
          "type": "string",
          "description": "The ID of the mail template to associate the file with"
        }
      },
      "description": "The file data"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object FiltersAddNewFilterRequest
{
  "type": "object",
  "title": "addFilterRequest",
  "required": [
    "name",
    "conditions",
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the filter"
    },
    "type": {
      "type": "string",
      "allOf": [
        {
          "enum": [
            "deals",
            "leads",
            "org",
            "people",
            "products",
            "activity",
            "projects"
          ],
          "type": "string"
        }
      ],
      "description": "The type of filter to create"
    },
    "conditions": {
      "type": "object",
      "description": "The conditions of the filter as a JSON object. Please note that a maximum of 16 conditions is allowed per filter and `date` values must be supplied in the `YYYY-MM-DD` format. It requires a minimum structure as follows: `{\"glue\":\"and\",\"conditions\":[{\"glue\":\"and\",\"conditions\": [CONDITION_OBJECTS]},{\"glue\":\"or\",\"conditions\":[CONDITION_OBJECTS]}]}`. Replace `CONDITION_OBJECTS` with JSON objects of the following structure: `{\"object\":\"\",\"field_id\":\"\", \"operator\":\"\",\"value\":\"\", \"extra_value\":\"\"}` or leave the array empty. Depending on the object type you should use another API endpoint to get `field_id`. There are five types of objects you can choose from: `\"person\"`, `\"deal\"`, `\"organization\"`, `\"product\"`, `\"activity\"` and you can use these types of operators depending on what type of a field you have: `\"IS NOT NULL\"`, `\"IS NULL\"`, `\"<=\"`, `\">=\"`, `\"<\"`, `\">\"`, `\"!=\"`, `\"=\"`, `\"LIKE '$%'\"`, `\"LIKE '%$%'\"`, `\"NOT LIKE '$%'\"`. To get a better understanding of how filters work try creating them directly from the Pipedrive application."
    }
  }
}
object FiltersAddNewFilterResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the created filter"
            },
            "name": {
              "type": "string",
              "description": "The name of the created filter"
            },
            "type": {
              "enum": [
                "deals",
                "leads",
                "org",
                "people",
                "products",
                "activity",
                "projects"
              ],
              "type": "string"
            },
            "user_id": {
              "type": "integer",
              "description": "The user ID of the created filter"
            },
            "add_time": {
              "type": "string",
              "description": "The add time of the created filter"
            },
            "conditions": {
              "type": "object",
              "description": "The created filter conditions object"
            },
            "visible_to": {
              "type": "integer",
              "description": "The visibility group ID of the created filter"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The activity flag of the created filter"
            },
            "update_time": {
              "type": "string",
              "description": "The update time of the created filter"
            },
            "custom_view_id": {
              "type": "integer",
              "description": "The custom view ID of the created filter"
            },
            "temporary_flag": {
              "type": "boolean",
              "description": "If the created filter is temporary or not"
            }
          }
        }
      }
    }
  ],
  "title": "postFilterResponse200"
}
object FiltersDeleteBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The array of the IDs of the deleted filter"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFiltersResponse200"
}
object FiltersGetAllResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the filter"
              },
              "name": {
                "type": "string",
                "description": "The name of the filter"
              },
              "type": {
                "type": "string",
                "description": "The type of the item"
              },
              "user_id": {
                "type": "integer",
                "description": "The owner of the filter"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the filter was added"
              },
              "visible_to": {
                "type": "integer",
                "description": "The visibility group ID of who can see then filter"
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the filter"
              },
              "update_time": {
                "type": "string",
                "description": "The date and time when the filter was updated"
              },
              "custom_view_id": {
                "type": "integer",
                "description": "Used by Pipedrive webapp"
              }
            },
            "description": "The filter object"
          },
          "description": "The array of filters"
        }
      }
    }
  ],
  "title": "getFiltersResponse200"
}
object FiltersGetDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the filter"
            },
            "name": {
              "type": "string",
              "description": "The name of the filter"
            },
            "type": {
              "type": "string",
              "description": "The type of the item"
            },
            "user_id": {
              "type": "integer",
              "description": "The owner of the filter"
            },
            "add_time": {
              "type": "string",
              "description": "The date and time when the filter was added"
            },
            "visible_to": {
              "type": "integer",
              "description": "The visibility group ID of who can see then filter"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the filter"
            },
            "update_time": {
              "type": "string",
              "description": "The date and time when the filter was updated"
            },
            "custom_view_id": {
              "type": "integer",
              "description": "Used by Pipedrive webapp"
            }
          },
          "description": "The filter object"
        }
      }
    }
  ],
  "title": "getFilterResponse200"
}
object FiltersGetHelpersResponse
{
  "type": "object",
  "title": "getFilterHelpersResponse200",
  "description": "The rules for filters"
}
object FiltersMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted filter"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFilterResponse200"
}
object FiltersUpdateFilterRequest
{
  "type": "object",
  "title": "updateFilterRequest",
  "required": [
    "conditions"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the filter"
    },
    "conditions": {
      "type": "object",
      "description": "The conditions of the filter as a JSON object. Please note that a maximum of 16 conditions is allowed per filter and `date` values must be supplied in the `YYYY-MM-DD` format. It requires a minimum structure as follows: `{\"glue\":\"and\",\"conditions\":[{\"glue\":\"and\",\"conditions\": [CONDITION_OBJECTS]},{\"glue\":\"or\",\"conditions\":[CONDITION_OBJECTS]}]}`. Replace `CONDITION_OBJECTS` with JSON objects of the following structure: `{\"object\":\"\",\"field_id\":\"\", \"operator\":\"\",\"value\":\"\", \"extra_value\":\"\"}` or leave the array empty. Depending on the object type you should use another API endpoint to get `field_id`. There are five types of objects you can choose from: `\"person\"`, `\"deal\"`, `\"organization\"`, `\"product\"`, `\"activity\"` and you can use these types of operators depending on what type of a field you have: `\"IS NOT NULL\"`, `\"IS NULL\"`, `\"<=\"`, `\">=\"`, `\"<\"`, `\">\"`, `\"!=\"`, `\"=\"`, `\"LIKE '$%'\"`, `\"LIKE '%$%'\"`, `\"NOT LIKE '$%'\"`. To get a better understanding of how filters work try creating them directly from the Pipedrive application."
    }
  }
}
object FiltersUpdateFilterResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the created filter"
            },
            "name": {
              "type": "string",
              "description": "The name of the created filter"
            },
            "type": {
              "enum": [
                "deals",
                "leads",
                "org",
                "people",
                "products",
                "activity",
                "projects"
              ],
              "type": "string"
            },
            "user_id": {
              "type": "integer",
              "description": "The user ID of the created filter"
            },
            "add_time": {
              "type": "string",
              "description": "The add time of the created filter"
            },
            "conditions": {
              "type": "object",
              "description": "The created filter conditions object"
            },
            "visible_to": {
              "type": "integer",
              "description": "The visibility group ID of the created filter"
            },
            "active_flag": {
              "type": "boolean",
              "description": "The activity flag of the created filter"
            },
            "update_time": {
              "type": "string",
              "description": "The update time of the created filter"
            },
            "custom_view_id": {
              "type": "integer",
              "description": "The custom view ID of the created filter"
            },
            "temporary_flag": {
              "type": "boolean",
              "description": "If the created filter is temporary or not"
            }
          }
        }
      }
    }
  ],
  "title": "postFilterResponse200"
}
object GoalsCreateReportRequest
{
  "type": "object",
  "title": "addGoalRequest",
  "required": [
    "type",
    "assignee",
    "expected_outcome",
    "duration",
    "interval"
  ],
  "properties": {
    "type": {
      "type": "object",
      "description": "The type of the goal. It requires the following JSON structure: `{ \"name\": \"deals_started\", \"params\": { \"pipeline_id\": [1, 2], \"activity_type_id\": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.”"
    },
    "title": {
      "type": "string",
      "description": "The title of the goal"
    },
    "assignee": {
      "type": "object",
      "description": "Who this goal is assigned to. It requires the following JSON structure: `{ \"id\": \"1\", \"type\": \"person\" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team."
    },
    "duration": {
      "type": "object",
      "description": "The date when the goal starts and ends. It requires the following JSON structure: `{ \"start\": \"2019-01-01\", \"end\": \"2022-12-31\" }`. Date in format of YYYY-MM-DD. \"end\" can be set to `null` for an infinite, open-ended goal."
    },
    "interval": {
      "enum": [
        "weekly",
        "monthly",
        "quarterly",
        "yearly"
      ],
      "type": "string",
      "description": "The interval of the goal"
    },
    "expected_outcome": {
      "type": "object",
      "description": "The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ \"target\": \"50\", \"tracking_metric\": \"quantity\" }` or `{ \"target\": \"50\", \"tracking_metric\": \"sum\", \"currency_id\": 1 }`. `currency_id` should only be added to `sum` type of goals."
    }
  }
}
object GoalsCreateReportResponse
{
  "type": "object",
  "title": "addOrUpdateGoalResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "goal": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The ID of the goal"
            },
            "type": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the goal type"
                },
                "params": {
                  "type": "object",
                  "properties": {
                    "pipeline_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of pipelines of the goal"
                    },
                    "activity_type_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of activity types of the goal"
                    }
                  },
                  "description": "The parameters that accompany the goal type"
                }
              },
              "description": "The type of the goal"
            },
            "title": {
              "type": "string",
              "description": "The title of the goal"
            },
            "assignee": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the goal assignee"
                },
                "type": {
                  "type": "string",
                  "description": "The type of the assignee"
                }
              },
              "description": "Who the goal is assigned to"
            },
            "duration": {
              "type": "object",
              "properties": {
                "end": {
                  "type": "string",
                  "description": "The end date of the goal"
                },
                "start": {
                  "type": "string",
                  "description": "The start date of the goal"
                }
              },
              "description": "The duration of the goal"
            },
            "interval": {
              "type": "string",
              "description": "The interval of the goal"
            },
            "owner_id": {
              "type": "integer",
              "description": "The ID of the creator of the goal"
            },
            "is_active": {
              "type": "boolean",
              "description": "Whether the goal is currently active or not"
            },
            "report_ids": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The IDs of the reports that belong to the goal"
            },
            "expected_outcome": {
              "type": "object",
              "properties": {
                "target": {
                  "type": "integer",
                  "description": "The numeric target of the goal"
                },
                "tracking_metric": {
                  "type": "string",
                  "description": "The tracking metric of the goal"
                }
              },
              "description": "The expected outcome of the goal"
            }
          }
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object GoalsGetByCriteriaResponse
{
  "type": "object",
  "title": "getGoalsResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "goals": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the goal"
              },
              "type": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the goal type"
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "pipeline_id": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "The IDs of pipelines of the goal"
                      },
                      "activity_type_id": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "The IDs of activity types of the goal"
                      }
                    },
                    "description": "The parameters that accompany the goal type"
                  }
                },
                "description": "The type of the goal"
              },
              "title": {
                "type": "string",
                "description": "The title of the goal"
              },
              "assignee": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the goal assignee"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the assignee"
                  }
                },
                "description": "Who the goal is assigned to"
              },
              "duration": {
                "type": "object",
                "properties": {
                  "end": {
                    "type": "string",
                    "description": "The end date of the goal"
                  },
                  "start": {
                    "type": "string",
                    "description": "The start date of the goal"
                  }
                },
                "description": "The duration of the goal"
              },
              "interval": {
                "type": "string",
                "description": "The interval of the goal"
              },
              "owner_id": {
                "type": "integer",
                "description": "The ID of the creator of the goal"
              },
              "is_active": {
                "type": "boolean",
                "description": "Whether the goal is currently active or not"
              },
              "report_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The IDs of the reports that belong to the goal"
              },
              "expected_outcome": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "integer",
                    "description": "The numeric target of the goal"
                  },
                  "tracking_metric": {
                    "type": "string",
                    "description": "The tracking metric of the goal"
                  }
                },
                "description": "The expected outcome of the goal"
              }
            }
          }
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object GoalsGetResultResponse
{
  "type": "object",
  "title": "getGoalResultResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "goal": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The ID of the goal"
            },
            "type": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the goal type"
                },
                "params": {
                  "type": "object",
                  "properties": {
                    "pipeline_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of pipelines of the goal"
                    },
                    "activity_type_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of activity types of the goal"
                    }
                  },
                  "description": "The parameters that accompany the goal type"
                }
              },
              "description": "The type of the goal"
            },
            "title": {
              "type": "string",
              "description": "The title of the goal"
            },
            "assignee": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the goal assignee"
                },
                "type": {
                  "type": "string",
                  "description": "The type of the assignee"
                }
              },
              "description": "Who the goal is assigned to"
            },
            "duration": {
              "type": "object",
              "properties": {
                "end": {
                  "type": "string",
                  "description": "The end date of the goal"
                },
                "start": {
                  "type": "string",
                  "description": "The start date of the goal"
                }
              },
              "description": "The duration of the goal"
            },
            "interval": {
              "type": "string",
              "description": "The interval of the goal"
            },
            "owner_id": {
              "type": "integer",
              "description": "The ID of the creator of the goal"
            },
            "is_active": {
              "type": "boolean",
              "description": "Whether the goal is currently active or not"
            },
            "report_ids": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The IDs of the reports that belong to the goal"
            },
            "expected_outcome": {
              "type": "object",
              "properties": {
                "target": {
                  "type": "integer",
                  "description": "The numeric target of the goal"
                },
                "tracking_metric": {
                  "type": "string",
                  "description": "The tracking metric of the goal"
                }
              },
              "description": "The expected outcome of the goal"
            }
          }
        },
        "progress": {
          "type": "integer",
          "description": "The numeric progress of the goal"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object GoalsMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteGoalResponse200",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object GoalsUpdateExistingGoalRequest
{
  "type": "object",
  "title": "basicGoalRequest",
  "properties": {
    "type": {
      "type": "object",
      "description": "The type of the goal. It requires the following JSON structure: `{ \"name\": \"deals_started\", \"params\": { \"pipeline_id\": [1, 2], \"activity_type_id\": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.”"
    },
    "title": {
      "type": "string",
      "description": "The title of the goal"
    },
    "assignee": {
      "type": "object",
      "description": "Who this goal is assigned to. It requires the following JSON structure: `{ \"id\": \"1\", \"type\": \"person\" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team."
    },
    "duration": {
      "type": "object",
      "description": "The date when the goal starts and ends. It requires the following JSON structure: `{ \"start\": \"2019-01-01\", \"end\": \"2022-12-31\" }`. Date in format of YYYY-MM-DD. \"end\" can be set to `null` for an infinite, open-ended goal."
    },
    "interval": {
      "enum": [
        "weekly",
        "monthly",
        "quarterly",
        "yearly"
      ],
      "type": "string",
      "description": "The interval of the goal"
    },
    "expected_outcome": {
      "type": "object",
      "description": "The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ \"target\": \"50\", \"tracking_metric\": \"quantity\" }` or `{ \"target\": \"50\", \"tracking_metric\": \"sum\", \"currency_id\": 1 }`. `currency_id` should only be added to `sum` type of goals."
    }
  }
}
object GoalsUpdateExistingGoalResponse
{
  "type": "object",
  "title": "addOrUpdateGoalResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "goal": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The ID of the goal"
            },
            "type": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the goal type"
                },
                "params": {
                  "type": "object",
                  "properties": {
                    "pipeline_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of pipelines of the goal"
                    },
                    "activity_type_id": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "The IDs of activity types of the goal"
                    }
                  },
                  "description": "The parameters that accompany the goal type"
                }
              },
              "description": "The type of the goal"
            },
            "title": {
              "type": "string",
              "description": "The title of the goal"
            },
            "assignee": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the goal assignee"
                },
                "type": {
                  "type": "string",
                  "description": "The type of the assignee"
                }
              },
              "description": "Who the goal is assigned to"
            },
            "duration": {
              "type": "object",
              "properties": {
                "end": {
                  "type": "string",
                  "description": "The end date of the goal"
                },
                "start": {
                  "type": "string",
                  "description": "The start date of the goal"
                }
              },
              "description": "The duration of the goal"
            },
            "interval": {
              "type": "string",
              "description": "The interval of the goal"
            },
            "owner_id": {
              "type": "integer",
              "description": "The ID of the creator of the goal"
            },
            "is_active": {
              "type": "boolean",
              "description": "Whether the goal is currently active or not"
            },
            "report_ids": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The IDs of the reports that belong to the goal"
            },
            "expected_outcome": {
              "type": "object",
              "properties": {
                "target": {
                  "type": "integer",
                  "description": "The numeric target of the goal"
                },
                "tracking_metric": {
                  "type": "string",
                  "description": "The tracking metric of the goal"
                }
              },
              "description": "The expected outcome of the goal"
            }
          }
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object ItemSearchByFieldValuesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the item"
              },
              "$field_key": {
                "description": "The value of the searched `field_key`"
              }
            }
          },
          "description": "The array of results"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchItemByFieldResponse200"
}
object ItemSearchSearchMultipleItemsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "description": "Item"
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of found items"
            },
            "related_items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "description": "Item"
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of related items if `search_for_related_items` was enabled"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchItemResponse200"
}
object LeadLabelsAddNewLabelRequest
{
  "type": "object",
  "title": "addLeadLabelRequest",
  "required": [
    "name",
    "color"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the lead label"
    },
    "color": {
      "enum": [
        "green",
        "blue",
        "red",
        "yellow",
        "purple",
        "gray"
      ],
      "type": "string",
      "description": "The color of the label. Only a subset of colors can be used."
    }
  }
}
object LeadLabelsAddNewLabelResponse
{
  "type": "object",
  "title": "addOrUpdateLeadLabelResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID of the lead label"
        },
        "name": {
          "type": "string",
          "description": "The name of the lead label"
        },
        "color": {
          "enum": [
            "green",
            "blue",
            "red",
            "yellow",
            "purple",
            "gray"
          ],
          "type": "string",
          "description": "The color of the label. Only a subset of colors can be used."
        },
        "add_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead label was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead label was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadLabelsDeleteLabel404Response
{
  "type": "object",
  "title": "leadResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object LeadLabelsDeleteLabelResponse
{
  "type": "object",
  "title": "leadIdResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadLabelsGetAllResponse
{
  "type": "object",
  "title": "getLeadLabelsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the lead label"
          },
          "name": {
            "type": "string",
            "description": "The name of the lead label"
          },
          "color": {
            "enum": [
              "green",
              "blue",
              "red",
              "yellow",
              "purple",
              "gray"
            ],
            "type": "string",
            "description": "The color of the label. Only a subset of colors can be used."
          },
          "add_time": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of when the lead label was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
          },
          "update_time": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of when the lead label was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadLabelsUpdateProperties404Response
{
  "type": "object",
  "title": "leadResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object LeadLabelsUpdatePropertiesRequest
{
  "type": "object",
  "title": "updateLeadLabelRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the lead label"
    },
    "color": {
      "enum": [
        "green",
        "blue",
        "red",
        "yellow",
        "purple",
        "gray"
      ],
      "type": "string",
      "description": "The color of the label. Only a subset of colors can be used."
    }
  }
}
object LeadLabelsUpdatePropertiesResponse
{
  "type": "object",
  "title": "addOrUpdateLeadLabelResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID of the lead label"
        },
        "name": {
          "type": "string",
          "description": "The name of the lead label"
        },
        "color": {
          "enum": [
            "green",
            "blue",
            "red",
            "yellow",
            "purple",
            "gray"
          ],
          "type": "string",
          "description": "The color of the label. Only a subset of colors can be used."
        },
        "add_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead label was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead label was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadSourcesGetAllResponse
{
  "type": "object",
  "title": "getLeadSourcesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The unique name of a lead source"
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadsCreateLeadRequest
{
  "type": "object",
  "title": "addLeadRequest",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "The name of the lead"
    },
    "value": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        }
      },
      "description": "The potential value of the lead"
    },
    "owner_id": {
      "type": "integer",
      "description": "The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used."
    },
    "was_seen": {
      "type": "boolean",
      "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
    },
    "label_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "The IDs of the lead labels which will be associated with the lead"
    },
    "person_id": {
      "type": "integer",
      "description": "The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. This property is required unless `organization_id` is specified."
    },
    "visible_to": {
      "type": "string",
      "allOf": [
        {
          "enum": [
            "1",
            "3",
            "5",
            "7"
          ],
          "type": "string"
        }
      ],
      "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
    },
    "organization_id": {
      "type": "integer",
      "description": "The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified."
    },
    "expected_close_date": {
      "type": "string",
      "format": "date",
      "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
    }
  }
}
object LeadsCreateLeadResponse
{
  "type": "object",
  "title": "oneLeadResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID of the lead in the UUID format"
        },
        "title": {
          "type": "string",
          "description": "The title of the lead"
        },
        "value": {
          "type": "object",
          "required": [
            "amount",
            "currency"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            }
          },
          "description": "The potential value of the lead"
        },
        "add_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "cc_email": {
          "type": "string",
          "description": "The BCC email of the lead"
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who owns the lead"
        },
        "was_seen": {
          "type": "boolean",
          "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
        },
        "label_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The IDs of the lead labels which are associated with the lead"
        },
        "person_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of a person which this lead is linked to"
        },
        "creator_id": {
          "type": "integer",
          "description": "The ID of the user who created the lead"
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>"
        },
        "is_archived": {
          "type": "boolean",
          "description": "A flag indicating whether the lead is archived or not"
        },
        "source_name": {
          "type": "string",
          "description": "Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI.\n"
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "organization_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of an organization which this lead is linked to"
        },
        "next_activity_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the next activity associated with the lead"
        },
        "expected_close_date": {
          "type": "string",
          "format": "date",
          "nullable": true,
          "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadsDeleteLead404Response
{
  "type": "object",
  "title": "leadResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object LeadsDeleteLeadResponse
{
  "type": "object",
  "title": "leadIdResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadsGetAllResponse
{
  "type": "object",
  "title": "getLeadsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the lead in the UUID format"
          },
          "title": {
            "type": "string",
            "description": "The title of the lead"
          },
          "value": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              }
            },
            "description": "The potential value of the lead"
          },
          "add_time": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
          },
          "cc_email": {
            "type": "string",
            "description": "The BCC email of the lead"
          },
          "owner_id": {
            "type": "integer",
            "description": "The ID of the user who owns the lead"
          },
          "was_seen": {
            "type": "boolean",
            "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
          },
          "label_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of the lead labels which are associated with the lead"
          },
          "person_id": {
            "type": "integer",
            "nullable": true,
            "description": "The ID of a person which this lead is linked to"
          },
          "creator_id": {
            "type": "integer",
            "description": "The ID of the user who created the lead"
          },
          "visible_to": {
            "type": "string",
            "allOf": [
              {
                "enum": [
                  "1",
                  "3",
                  "5",
                  "7"
                ],
                "type": "string"
              }
            ],
            "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>"
          },
          "is_archived": {
            "type": "boolean",
            "description": "A flag indicating whether the lead is archived or not"
          },
          "source_name": {
            "type": "string",
            "description": "Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI.\n"
          },
          "update_time": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
          },
          "organization_id": {
            "type": "integer",
            "nullable": true,
            "description": "The ID of an organization which this lead is linked to"
          },
          "next_activity_id": {
            "type": "integer",
            "nullable": true,
            "description": "The ID of the next activity associated with the lead"
          },
          "expected_close_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object LeadsGetDetails404Response
{
  "type": "object",
  "title": "leadResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object LeadsGetDetailsResponse
{
  "type": "object",
  "title": "oneLeadResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID of the lead in the UUID format"
        },
        "title": {
          "type": "string",
          "description": "The title of the lead"
        },
        "value": {
          "type": "object",
          "required": [
            "amount",
            "currency"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            }
          },
          "description": "The potential value of the lead"
        },
        "add_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "cc_email": {
          "type": "string",
          "description": "The BCC email of the lead"
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who owns the lead"
        },
        "was_seen": {
          "type": "boolean",
          "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
        },
        "label_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The IDs of the lead labels which are associated with the lead"
        },
        "person_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of a person which this lead is linked to"
        },
        "creator_id": {
          "type": "integer",
          "description": "The ID of the user who created the lead"
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>"
        },
        "is_archived": {
          "type": "boolean",
          "description": "A flag indicating whether the lead is archived or not"
        },
        "source_name": {
          "type": "string",
          "description": "Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI.\n"
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "organization_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of an organization which this lead is linked to"
        },
        "next_activity_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the next activity associated with the lead"
        },
        "expected_close_date": {
          "type": "string",
          "format": "date",
          "nullable": true,
          "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LeadsListPermittedUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object LeadsSearchLeadsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The ID of the lead"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the item"
                      },
                      "notes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of notes"
                      },
                      "owner": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the owner of the lead"
                          }
                        }
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the lead"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The value of the lead"
                      },
                      "emails": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "person": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the person the lead is associated with"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the person the lead is associated with"
                          }
                        }
                      },
                      "phones": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "currency": {
                        "type": "string",
                        "description": "The currency of the lead"
                      },
                      "visible_to": {
                        "type": "integer",
                        "description": "The visibility of the lead"
                      },
                      "is_archived": {
                        "type": "boolean",
                        "description": "A flag indicating whether the lead is archived or not"
                      },
                      "organization": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the organization the lead is associated with"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the organization the lead is associated with"
                          }
                        }
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Custom fields"
                      }
                    }
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of leads"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchLeadsResponse200"
}
object LeadsUpdateLeadProperties404Response
{
  "type": "object",
  "title": "leadResponse404",
  "properties": {
    "data": {
      "type": "object",
      "example": null,
      "nullable": true
    },
    "error": {
      "type": "string",
      "description": "The description of the error"
    },
    "success": {
      "type": "boolean",
      "example": false
    },
    "error_info": {
      "type": "string",
      "description": "A message describing how to solve the problem"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object LeadsUpdateLeadPropertiesRequest
{
  "type": "object",
  "title": "updateLeadRequest",
  "properties": {
    "title": {
      "type": "string",
      "nullable": true,
      "description": "The name of the lead"
    },
    "value": {
      "type": "object",
      "nullable": true,
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        }
      },
      "description": "The potential value of the lead"
    },
    "owner_id": {
      "type": "integer",
      "description": "The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used."
    },
    "was_seen": {
      "type": "boolean",
      "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
    },
    "label_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "The IDs of the lead labels which will be associated with the lead"
    },
    "person_id": {
      "type": "integer",
      "nullable": true,
      "description": "The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both.\n"
    },
    "visible_to": {
      "type": "string",
      "allOf": [
        {
          "enum": [
            "1",
            "3",
            "5",
            "7"
          ],
          "type": "string"
        }
      ],
      "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
    },
    "is_archived": {
      "type": "boolean",
      "description": "A flag indicating whether the lead is archived or not"
    },
    "organization_id": {
      "type": "integer",
      "nullable": true,
      "description": "The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both."
    },
    "expected_close_date": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
    }
  }
}
object LeadsUpdateLeadPropertiesResponse
{
  "type": "object",
  "title": "oneLeadResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID of the lead in the UUID format"
        },
        "title": {
          "type": "string",
          "description": "The title of the lead"
        },
        "value": {
          "type": "object",
          "required": [
            "amount",
            "currency"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            }
          },
          "description": "The potential value of the lead"
        },
        "add_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "cc_email": {
          "type": "string",
          "description": "The BCC email of the lead"
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who owns the lead"
        },
        "was_seen": {
          "type": "boolean",
          "description": "A flag indicating whether the lead was seen by someone in the Pipedrive UI"
        },
        "label_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The IDs of the lead labels which are associated with the lead"
        },
        "person_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of a person which this lead is linked to"
        },
        "creator_id": {
          "type": "integer",
          "description": "The ID of the user who created the lead"
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>"
        },
        "is_archived": {
          "type": "boolean",
          "description": "A flag indicating whether the lead is archived or not"
        },
        "source_name": {
          "type": "string",
          "description": "Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI.\n"
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ."
        },
        "organization_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of an organization which this lead is linked to"
        },
        "next_activity_id": {
          "type": "integer",
          "nullable": true,
          "description": "The ID of the next activity associated with the lead"
        },
        "expected_close_date": {
          "type": "string",
          "format": "date",
          "nullable": true,
          "description": "The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD."
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}
object LegacyTeamsAddNewTeam403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsAddNewTeamRequest
{
  "type": "object",
  "title": "addTeamRequest",
  "required": [
    "name",
    "manager_id"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The team name"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "The list of user IDs"
    },
    "manager_id": {
      "type": "integer",
      "description": "The team manager ID"
    },
    "description": {
      "type": "string",
      "description": "The team description"
    }
  }
}
object LegacyTeamsAddNewTeamResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "title": "teamId",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The team ID"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "title": "addTeamRequest",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The team name"
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "The list of user IDs"
                        },
                        "manager_id": {
                          "type": "integer",
                          "description": "The team manager ID"
                        },
                        "description": {
                          "type": "string",
                          "description": "The team description"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is active"
                        },
                        "deleted_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is deleted"
                        }
                      }
                    }
                  ],
                  "title": "updateTeamRequest"
                },
                {
                  "type": "object",
                  "title": "baseTeamAdditionalProperties",
                  "properties": {
                    "add_time": {
                      "type": "string",
                      "description": "The team creation time. Format: YYYY-MM-DD HH:MM:SS"
                    },
                    "created_by_user_id": {
                      "type": "integer",
                      "description": "The ID of the user who created the team"
                    }
                  }
                }
              ],
              "title": "updateTeamWithAdditionalProperties"
            }
          ],
          "title": "baseTeam"
        }
      }
    }
  ],
  "title": "teamResponse200"
}
object LegacyTeamsAddUsersToTeam403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsAddUsersToTeam404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsAddUsersToTeamRequest
{
  "type": "object",
  "title": "addTeamUserRequest",
  "required": [
    "users"
  ],
  "properties": {
    "users": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "The list of user IDs"
    }
  }
}
object LegacyTeamsAddUsersToTeamResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object LegacyTeamsGetAllTeamsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "title": "teamId",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The team ID"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "allOf": [
                      {
                        "type": "object",
                        "title": "addTeamRequest",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The team name"
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "The list of user IDs"
                          },
                          "manager_id": {
                            "type": "integer",
                            "description": "The team manager ID"
                          },
                          "description": {
                            "type": "string",
                            "description": "The team description"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "active_flag": {
                            "allOf": [
                              {
                                "enum": [
                                  0,
                                  1
                                ],
                                "type": "number",
                                "title": "numberBoolean"
                              }
                            ],
                            "description": "Flag that indicates whether the team is active"
                          },
                          "deleted_flag": {
                            "allOf": [
                              {
                                "enum": [
                                  0,
                                  1
                                ],
                                "type": "number",
                                "title": "numberBoolean"
                              }
                            ],
                            "description": "Flag that indicates whether the team is deleted"
                          }
                        }
                      }
                    ],
                    "title": "updateTeamRequest"
                  },
                  {
                    "type": "object",
                    "title": "baseTeamAdditionalProperties",
                    "properties": {
                      "add_time": {
                        "type": "string",
                        "description": "The team creation time. Format: YYYY-MM-DD HH:MM:SS"
                      },
                      "created_by_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who created the team"
                      }
                    }
                  }
                ],
                "title": "updateTeamWithAdditionalProperties"
              }
            ],
            "title": "baseTeam"
          }
        }
      }
    }
  ],
  "title": "teamsResponse200"
}
object LegacyTeamsGetAllUsers404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsGetAllUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object LegacyTeamsGetData404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsGetDataResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "title": "teamId",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The team ID"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "title": "addTeamRequest",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The team name"
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "The list of user IDs"
                        },
                        "manager_id": {
                          "type": "integer",
                          "description": "The team manager ID"
                        },
                        "description": {
                          "type": "string",
                          "description": "The team description"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is active"
                        },
                        "deleted_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is deleted"
                        }
                      }
                    }
                  ],
                  "title": "updateTeamRequest"
                },
                {
                  "type": "object",
                  "title": "baseTeamAdditionalProperties",
                  "properties": {
                    "add_time": {
                      "type": "string",
                      "description": "The team creation time. Format: YYYY-MM-DD HH:MM:SS"
                    },
                    "created_by_user_id": {
                      "type": "integer",
                      "description": "The ID of the user who created the team"
                    }
                  }
                }
              ],
              "title": "updateTeamWithAdditionalProperties"
            }
          ],
          "title": "baseTeam"
        }
      }
    }
  ],
  "title": "teamResponse200"
}
object LegacyTeamsGetUserTeamsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "title": "teamId",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The team ID"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "allOf": [
                      {
                        "type": "object",
                        "title": "addTeamRequest",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The team name"
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "The list of user IDs"
                          },
                          "manager_id": {
                            "type": "integer",
                            "description": "The team manager ID"
                          },
                          "description": {
                            "type": "string",
                            "description": "The team description"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "active_flag": {
                            "allOf": [
                              {
                                "enum": [
                                  0,
                                  1
                                ],
                                "type": "number",
                                "title": "numberBoolean"
                              }
                            ],
                            "description": "Flag that indicates whether the team is active"
                          },
                          "deleted_flag": {
                            "allOf": [
                              {
                                "enum": [
                                  0,
                                  1
                                ],
                                "type": "number",
                                "title": "numberBoolean"
                              }
                            ],
                            "description": "Flag that indicates whether the team is deleted"
                          }
                        }
                      }
                    ],
                    "title": "updateTeamRequest"
                  },
                  {
                    "type": "object",
                    "title": "baseTeamAdditionalProperties",
                    "properties": {
                      "add_time": {
                        "type": "string",
                        "description": "The team creation time. Format: YYYY-MM-DD HH:MM:SS"
                      },
                      "created_by_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who created the team"
                      }
                    }
                  }
                ],
                "title": "updateTeamWithAdditionalProperties"
              }
            ],
            "title": "baseTeam"
          }
        }
      }
    }
  ],
  "title": "teamsResponse200"
}
object LegacyTeamsRemoveUsers403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsRemoveUsers404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsRemoveUsersRequest
{
  "type": "object",
  "title": "deleteTeamUserRequest",
  "required": [
    "users"
  ],
  "properties": {
    "users": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "The list of user IDs"
    }
  }
}
object LegacyTeamsRemoveUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object LegacyTeamsUpdateTeamObject403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsUpdateTeamObject404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object LegacyTeamsUpdateTeamObjectRequest
{
  "allOf": [
    {
      "type": "object",
      "title": "addTeamRequest",
      "properties": {
        "name": {
          "type": "string",
          "description": "The team name"
        },
        "users": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        },
        "manager_id": {
          "type": "integer",
          "description": "The team manager ID"
        },
        "description": {
          "type": "string",
          "description": "The team description"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "active_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Flag that indicates whether the team is active"
        },
        "deleted_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Flag that indicates whether the team is deleted"
        }
      }
    }
  ],
  "title": "updateTeamRequest"
}
object LegacyTeamsUpdateTeamObjectResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "title": "teamId",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The team ID"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "title": "addTeamRequest",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The team name"
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "The list of user IDs"
                        },
                        "manager_id": {
                          "type": "integer",
                          "description": "The team manager ID"
                        },
                        "description": {
                          "type": "string",
                          "description": "The team description"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is active"
                        },
                        "deleted_flag": {
                          "allOf": [
                            {
                              "enum": [
                                0,
                                1
                              ],
                              "type": "number",
                              "title": "numberBoolean"
                            }
                          ],
                          "description": "Flag that indicates whether the team is deleted"
                        }
                      }
                    }
                  ],
                  "title": "updateTeamRequest"
                },
                {
                  "type": "object",
                  "title": "baseTeamAdditionalProperties",
                  "properties": {
                    "add_time": {
                      "type": "string",
                      "description": "The team creation time. Format: YYYY-MM-DD HH:MM:SS"
                    },
                    "created_by_user_id": {
                      "type": "integer",
                      "description": "The ID of the user who created the team"
                    }
                  }
                }
              ],
              "title": "updateTeamWithAdditionalProperties"
            }
          ],
          "title": "baseTeam"
        }
      }
    }
  ],
  "title": "teamResponse200"
}
object MailboxGetAllMailMessagesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail thread"
                  },
                  "snippet": {
                    "type": "string",
                    "description": "A snippet"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "ID of the user whom mail message will be assigned to"
                  },
                  "read_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is read"
                  },
                  "account_id": {
                    "type": "string",
                    "description": "The connection account ID"
                  },
                  "synced_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is synced"
                  },
                  "deleted_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is deleted"
                  },
                  "smart_bcc_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether one of the parties of the mail thread is Bcc"
                  },
                  "has_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has an attachment"
                  },
                  "mail_tracking_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Mail tracking status"
                  },
                  "has_real_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has real attachments (which are not inline)"
                  },
                  "has_inline_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has inline attachments"
                  },
                  "mail_link_tracking_enabled_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the link tracking of the mail thread is enabled"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "cc": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of the mail thread participant"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the mail thread participant"
                        },
                        "latest_sent": {
                          "type": "boolean",
                          "description": "Whether the mail thread participant was last to send an email"
                        },
                        "message_time": {
                          "type": "number",
                          "description": "Message time"
                        },
                        "email_address": {
                          "type": "string",
                          "description": "Email address of the mail thread participant"
                        },
                        "linked_person_id": {
                          "type": "integer",
                          "description": "ID of the linked person"
                        },
                        "linked_person_name": {
                          "type": "string",
                          "description": "Email of the linked person"
                        },
                        "mail_message_party_id": {
                          "type": "integer",
                          "description": "ID of the mail message party"
                        },
                        "linked_organization_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Linked Organization ID"
                        }
                      },
                      "description": "Member of a thread"
                    },
                    "description": "Participants of the Cc"
                  },
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of the mail thread participant"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the mail thread participant"
                        },
                        "latest_sent": {
                          "type": "boolean",
                          "description": "Whether the mail thread participant was last to send an email"
                        },
                        "message_time": {
                          "type": "number",
                          "description": "Message time"
                        },
                        "email_address": {
                          "type": "string",
                          "description": "Email address of the mail thread participant"
                        },
                        "linked_person_id": {
                          "type": "integer",
                          "description": "ID of the linked person"
                        },
                        "linked_person_name": {
                          "type": "string",
                          "description": "Email of the linked person"
                        },
                        "mail_message_party_id": {
                          "type": "integer",
                          "description": "ID of the mail message party"
                        },
                        "linked_organization_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Linked Organization ID"
                        }
                      },
                      "description": "Member of a thread"
                    },
                    "description": "Recipients of the mail thread"
                  },
                  "bcc": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of the mail thread participant"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the mail thread participant"
                        },
                        "latest_sent": {
                          "type": "boolean",
                          "description": "Whether the mail thread participant was last to send an email"
                        },
                        "message_time": {
                          "type": "number",
                          "description": "Message time"
                        },
                        "email_address": {
                          "type": "string",
                          "description": "Email address of the mail thread participant"
                        },
                        "linked_person_id": {
                          "type": "integer",
                          "description": "ID of the linked person"
                        },
                        "linked_person_name": {
                          "type": "string",
                          "description": "Email of the linked person"
                        },
                        "mail_message_party_id": {
                          "type": "integer",
                          "description": "ID of the mail message party"
                        },
                        "linked_organization_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Linked Organization ID"
                        }
                      },
                      "description": "Member of a thread"
                    },
                    "description": "Participants of the Bcc"
                  },
                  "from": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of the mail thread participant"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the mail thread participant"
                        },
                        "latest_sent": {
                          "type": "boolean",
                          "description": "Whether the mail thread participant was last to send an email"
                        },
                        "message_time": {
                          "type": "number",
                          "description": "Message time"
                        },
                        "email_address": {
                          "type": "string",
                          "description": "Email address of the mail thread participant"
                        },
                        "linked_person_id": {
                          "type": "integer",
                          "description": "ID of the linked person"
                        },
                        "linked_person_name": {
                          "type": "string",
                          "description": "Email of the linked person"
                        },
                        "mail_message_party_id": {
                          "type": "integer",
                          "description": "ID of the mail message party"
                        },
                        "linked_organization_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "Linked Organization ID"
                        }
                      },
                      "description": "Member of a thread"
                    },
                    "description": "Senders of the mail thread"
                  },
                  "draft": {
                    "type": "string",
                    "nullable": true,
                    "description": "If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`."
                  },
                  "add_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail message was inserted to database"
                  },
                  "body_url": {
                    "type": "string",
                    "description": "A link to the mail thread message"
                  },
                  "sent_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread message is sent"
                  },
                  "update_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail message was updated in database received"
                  },
                  "message_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail message was received or created"
                  },
                  "has_body_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread message has a body"
                  },
                  "mail_thread_id": {
                    "type": "integer",
                    "description": "ID of the mail thread"
                  },
                  "sent_from_pipedrive_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread message is sent from Pipedrive"
                  }
                }
              }
            ]
          },
          "description": "The array of the mail messages of the mail thread"
        }
      }
    }
  ],
  "title": "getAllMailMessagesOfMailThreadResponse200"
}
object MailboxGetMailMessageResponse
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "service": {
          "type": "string",
          "description": "The service name of the response."
        },
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        },
        "statusCode": {
          "type": "integer",
          "description": "The email service specific status code and it is returned through the response body."
        },
        "statusText": {
          "type": "string",
          "description": "The status text of the response."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "cc": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail participant"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the mail participant"
                  },
                  "email_address": {
                    "type": "string",
                    "description": "Mail address of the mail participant"
                  },
                  "linked_person_id": {
                    "type": "integer",
                    "description": "ID of the linked person to the mail message"
                  },
                  "linked_person_name": {
                    "type": "string",
                    "description": "Name of the linked person to the mail message"
                  },
                  "mail_message_party_id": {
                    "type": "integer",
                    "description": "ID of the mail message participant"
                  }
                }
              },
              "description": "The array of mail message copies (object)"
            },
            "id": {
              "type": "integer",
              "description": "ID of the mail message."
            },
            "to": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail participant"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the mail participant"
                  },
                  "email_address": {
                    "type": "string",
                    "description": "Mail address of the mail participant"
                  },
                  "linked_person_id": {
                    "type": "integer",
                    "description": "ID of the linked person to the mail message"
                  },
                  "linked_person_name": {
                    "type": "string",
                    "description": "Name of the linked person to the mail message"
                  },
                  "mail_message_party_id": {
                    "type": "integer",
                    "description": "ID of the mail message participant"
                  }
                }
              },
              "description": "The array of mail message receiver (object)"
            },
            "bcc": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail participant"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the mail participant"
                  },
                  "email_address": {
                    "type": "string",
                    "description": "Mail address of the mail participant"
                  },
                  "linked_person_id": {
                    "type": "integer",
                    "description": "ID of the linked person to the mail message"
                  },
                  "linked_person_name": {
                    "type": "string",
                    "description": "Name of the linked person to the mail message"
                  },
                  "mail_message_party_id": {
                    "type": "integer",
                    "description": "ID of the mail message participant"
                  }
                }
              },
              "description": "The array of mail message blind copies (object)"
            },
            "from": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail participant"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the mail participant"
                  },
                  "email_address": {
                    "type": "string",
                    "description": "Mail address of the mail participant"
                  },
                  "linked_person_id": {
                    "type": "integer",
                    "description": "ID of the linked person to the mail message"
                  },
                  "linked_person_name": {
                    "type": "string",
                    "description": "Name of the linked person to the mail message"
                  },
                  "mail_message_party_id": {
                    "type": "integer",
                    "description": "ID of the mail message participant"
                  }
                }
              },
              "description": "The array of mail message sender (object)"
            },
            "draft": {
              "type": "string",
              "description": "If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`."
            },
            "snippet": {
              "type": "string",
              "description": "The snippet of mail message. Snippet length is up to 225 characters."
            },
            "subject": {
              "type": "string",
              "description": "The subject of mail message"
            },
            "user_id": {
              "type": "integer",
              "description": "ID of the user whom mail message will be assigned to"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The insertion into the database time of the mail message"
            },
            "body_url": {
              "type": "string",
              "description": "The mail message body URL"
            },
            "read_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message is read or not by the user"
            },
            "sent_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has been sent or not"
            },
            "account_id": {
              "type": "string",
              "description": "The connection account ID"
            },
            "draft_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message is a draft or not"
            },
            "synced_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message is synced with the provider or not"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The updating time in the database of the mail message"
            },
            "deleted_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message is deleted or not"
            },
            "message_time": {
              "type": "string",
              "format": "date-time",
              "description": "Creation or receival time of the mail message"
            },
            "has_body_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has a body or not"
            },
            "mail_thread_id": {
              "type": "integer",
              "description": "ID of the mail message thread"
            },
            "smart_bcc_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has been created by Smart Email BCC feature or not"
            },
            "has_attachments_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has an attachment or not"
            },
            "mail_tracking_status": {
              "enum": [
                "opened",
                "not opened"
              ],
              "type": "string",
              "nullable": true,
              "description": "The status of tracking mail message. Value is `null` if tracking is not enabled."
            },
            "sent_from_pipedrive_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has been sent from Pipedrive app or not"
            },
            "has_real_attachments_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has an attachment (which is not inline) or not"
            },
            "has_inline_attachments_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the mail message has an inline attachment or not"
            },
            "mail_link_tracking_enabled_flag": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault0",
                  "default": 0
                }
              ],
              "description": "Whether the link tracking in mail message body is enabled."
            }
          }
        }
      }
    }
  ],
  "title": "mailMessageResponse200"
}
object MailboxGetMailThreadResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the mail thread"
                    },
                    "snippet": {
                      "type": "string",
                      "description": "A snippet"
                    },
                    "subject": {
                      "type": "string",
                      "description": "The subject"
                    },
                    "user_id": {
                      "type": "integer",
                      "description": "ID of the user whom mail message will be assigned to"
                    },
                    "read_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread is read"
                    },
                    "account_id": {
                      "type": "string",
                      "description": "The connection account ID"
                    },
                    "synced_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread is synced"
                    },
                    "deleted_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread is deleted"
                    },
                    "smart_bcc_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether one of the parties of the mail thread is Bcc"
                    },
                    "has_attachments_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has an attachment"
                    },
                    "mail_tracking_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "Mail tracking status"
                    },
                    "has_real_attachments_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has real attachments (which are not inline)"
                    },
                    "has_inline_attachments_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has inline attachments"
                    },
                    "mail_link_tracking_enabled_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the link tracking of the mail thread is enabled"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "deal_id": {
                      "type": "integer",
                      "nullable": true,
                      "description": "The ID of the deal"
                    },
                    "folders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Folders in which messages from thread are being stored"
                    },
                    "lead_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "The ID of the lead"
                    },
                    "parties": {
                      "type": "object",
                      "properties": {
                        "to": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "ID of the mail thread participant"
                              },
                              "name": {
                                "type": "string",
                                "description": "Name of the mail thread participant"
                              },
                              "latest_sent": {
                                "type": "boolean",
                                "description": "Whether the mail thread participant was last to send an email"
                              },
                              "message_time": {
                                "type": "number",
                                "description": "Message time"
                              },
                              "email_address": {
                                "type": "string",
                                "description": "Email address of the mail thread participant"
                              },
                              "linked_person_id": {
                                "type": "integer",
                                "description": "ID of the linked person"
                              },
                              "linked_person_name": {
                                "type": "string",
                                "description": "Email of the linked person"
                              },
                              "mail_message_party_id": {
                                "type": "integer",
                                "description": "ID of the mail message party"
                              },
                              "linked_organization_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "Linked Organization ID"
                              }
                            },
                            "description": "Member of a thread"
                          },
                          "description": "Recipients of the mail thread"
                        },
                        "from": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "ID of the mail thread participant"
                              },
                              "name": {
                                "type": "string",
                                "description": "Name of the mail thread participant"
                              },
                              "latest_sent": {
                                "type": "boolean",
                                "description": "Whether the mail thread participant was last to send an email"
                              },
                              "message_time": {
                                "type": "number",
                                "description": "Message time"
                              },
                              "email_address": {
                                "type": "string",
                                "description": "Email address of the mail thread participant"
                              },
                              "linked_person_id": {
                                "type": "integer",
                                "description": "ID of the linked person"
                              },
                              "linked_person_name": {
                                "type": "string",
                                "description": "Email of the linked person"
                              },
                              "mail_message_party_id": {
                                "type": "integer",
                                "description": "ID of the mail message party"
                              },
                              "linked_organization_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "Linked Organization ID"
                              }
                            },
                            "description": "Member of a thread"
                          },
                          "description": "Senders of the mail thread"
                        }
                      },
                      "description": "Parties of the mail thread"
                    },
                    "version": {
                      "type": "number",
                      "description": "Version"
                    },
                    "add_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The time when the mail thread was inserted to database"
                    },
                    "deal_status": {
                      "type": "string",
                      "nullable": true,
                      "description": "Status of the deal"
                    },
                    "shared_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread is shared"
                    },
                    "update_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The time when the mail thread was updated in database received"
                    },
                    "snippet_sent": {
                      "type": "string",
                      "description": "A snippet from a message sent"
                    },
                    "archived_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread is archived"
                    },
                    "has_sent_flag": {
                      "type": "number",
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has messages sent"
                    },
                    "message_count": {
                      "type": "integer",
                      "description": "An amount of messages"
                    },
                    "snippet_draft": {
                      "type": "string",
                      "nullable": true,
                      "description": "A snippet from a draft"
                    },
                    "drafts_parties": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Parties of the drafted mail thread"
                    },
                    "has_draft_flag": {
                      "type": "number",
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has any drafts"
                    },
                    "external_deleted_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread has been deleted externally"
                    },
                    "all_messages_sent_flag": {
                      "type": "number",
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether all the mail thread messages have been sent"
                    },
                    "last_message_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last message timestamp"
                    },
                    "first_message_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The time when the mail thread has had the first message received or created"
                    },
                    "first_message_to_me_flag": {
                      "allOf": [
                        {
                          "enum": [
                            0,
                            1
                          ],
                          "type": "number",
                          "title": "numberBooleanDefault0",
                          "default": 0
                        }
                      ],
                      "description": "Whether the mail thread was initialized by others"
                    },
                    "last_message_sent_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "The last time when the mail thread has had a message sent"
                    },
                    "last_message_received_timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The last time when the mail thread has had a message received"
                    }
                  }
                }
              ],
              "title": "baseMailThread"
            }
          ],
          "description": "The mail thread object"
        }
      }
    }
  ],
  "title": "getOneMailThreadResponse200"
}
object MailboxGetMailThreadsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID of the mail thread"
                  },
                  "snippet": {
                    "type": "string",
                    "description": "A snippet"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "ID of the user whom mail message will be assigned to"
                  },
                  "read_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is read"
                  },
                  "account_id": {
                    "type": "string",
                    "description": "The connection account ID"
                  },
                  "synced_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is synced"
                  },
                  "deleted_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is deleted"
                  },
                  "smart_bcc_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether one of the parties of the mail thread is Bcc"
                  },
                  "has_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has an attachment"
                  },
                  "mail_tracking_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Mail tracking status"
                  },
                  "has_real_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has real attachments (which are not inline)"
                  },
                  "has_inline_attachments_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has inline attachments"
                  },
                  "mail_link_tracking_enabled_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the link tracking of the mail thread is enabled"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "deal_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the deal"
                  },
                  "folders": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Folders in which messages from thread are being stored"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "The ID of the lead"
                  },
                  "parties": {
                    "type": "object",
                    "properties": {
                      "to": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail thread participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail thread participant"
                            },
                            "latest_sent": {
                              "type": "boolean",
                              "description": "Whether the mail thread participant was last to send an email"
                            },
                            "message_time": {
                              "type": "number",
                              "description": "Message time"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Email address of the mail thread participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Email of the linked person"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message party"
                            },
                            "linked_organization_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "Linked Organization ID"
                            }
                          },
                          "description": "Member of a thread"
                        },
                        "description": "Recipients of the mail thread"
                      },
                      "from": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail thread participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail thread participant"
                            },
                            "latest_sent": {
                              "type": "boolean",
                              "description": "Whether the mail thread participant was last to send an email"
                            },
                            "message_time": {
                              "type": "number",
                              "description": "Message time"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Email address of the mail thread participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Email of the linked person"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message party"
                            },
                            "linked_organization_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "Linked Organization ID"
                            }
                          },
                          "description": "Member of a thread"
                        },
                        "description": "Senders of the mail thread"
                      }
                    },
                    "description": "Parties of the mail thread"
                  },
                  "version": {
                    "type": "number",
                    "description": "Version"
                  },
                  "add_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail thread was inserted to database"
                  },
                  "deal_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Status of the deal"
                  },
                  "shared_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is shared"
                  },
                  "update_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail thread was updated in database received"
                  },
                  "snippet_sent": {
                    "type": "string",
                    "description": "A snippet from a message sent"
                  },
                  "archived_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread is archived"
                  },
                  "has_sent_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has messages sent"
                  },
                  "message_count": {
                    "type": "integer",
                    "description": "An amount of messages"
                  },
                  "snippet_draft": {
                    "type": "string",
                    "nullable": true,
                    "description": "A snippet from a draft"
                  },
                  "drafts_parties": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Parties of the drafted mail thread"
                  },
                  "has_draft_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has any drafts"
                  },
                  "external_deleted_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread has been deleted externally"
                  },
                  "all_messages_sent_flag": {
                    "type": "number",
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether all the mail thread messages have been sent"
                  },
                  "last_message_timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Last message timestamp"
                  },
                  "first_message_timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The time when the mail thread has had the first message received or created"
                  },
                  "first_message_to_me_flag": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBooleanDefault0",
                        "default": 0
                      }
                    ],
                    "description": "Whether the mail thread was initialized by others"
                  },
                  "last_message_sent_timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "The last time when the mail thread has had a message sent"
                  },
                  "last_message_received_timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The last time when the mail thread has had a message received"
                  }
                }
              }
            ],
            "title": "baseMailThread"
          },
          "description": "The array of mail threads"
        }
      }
    }
  ],
  "title": "getMailThreadsResponse200"
}
object MailboxMarkThreadDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted mail thread"
            }
          }
        }
      }
    }
  ],
  "title": "deleteMailThreadResponse200"
}
object MailboxUpdateMailThreadDetailsRequest
{
  "type": "object",
  "title": "updateMailThreadDetailsRequest",
  "properties": {
    "deal_id": {
      "type": "integer",
      "description": "The ID of the deal this thread is associated with"
    },
    "lead_id": {
      "type": "string",
      "format": "uuid",
      "description": "The ID of the lead this thread is associated with"
    },
    "read_flag": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether this thread is read or unread"
    },
    "shared_flag": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether this thread is shared with other users in your company"
    },
    "archived_flag": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether this thread is archived or not. You can only archive threads that belong to Inbox folder. Archived threads will disappear from Inbox."
    }
  }
}
object MailboxUpdateMailThreadDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "ID of the mail thread"
                },
                "snippet": {
                  "type": "string",
                  "description": "A snippet"
                },
                "subject": {
                  "type": "string",
                  "description": "The subject"
                },
                "user_id": {
                  "type": "integer",
                  "description": "ID of the user whom mail message will be assigned to"
                },
                "read_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread is read"
                },
                "account_id": {
                  "type": "string",
                  "description": "The connection account ID"
                },
                "synced_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread is synced"
                },
                "deleted_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread is deleted"
                },
                "smart_bcc_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether one of the parties of the mail thread is Bcc"
                },
                "has_attachments_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has an attachment"
                },
                "mail_tracking_status": {
                  "type": "string",
                  "nullable": true,
                  "description": "Mail tracking status"
                },
                "has_real_attachments_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has real attachments (which are not inline)"
                },
                "has_inline_attachments_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has inline attachments"
                },
                "mail_link_tracking_enabled_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the link tracking of the mail thread is enabled"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "deal_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "The ID of the deal"
                },
                "folders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Folders in which messages from thread are being stored"
                },
                "lead_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true,
                  "description": "The ID of the lead"
                },
                "parties": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the mail thread participant"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the mail thread participant"
                          },
                          "latest_sent": {
                            "type": "boolean",
                            "description": "Whether the mail thread participant was last to send an email"
                          },
                          "message_time": {
                            "type": "number",
                            "description": "Message time"
                          },
                          "email_address": {
                            "type": "string",
                            "description": "Email address of the mail thread participant"
                          },
                          "linked_person_id": {
                            "type": "integer",
                            "description": "ID of the linked person"
                          },
                          "linked_person_name": {
                            "type": "string",
                            "description": "Email of the linked person"
                          },
                          "mail_message_party_id": {
                            "type": "integer",
                            "description": "ID of the mail message party"
                          },
                          "linked_organization_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Linked Organization ID"
                          }
                        },
                        "description": "Member of a thread"
                      },
                      "description": "Recipients of the mail thread"
                    },
                    "from": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the mail thread participant"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the mail thread participant"
                          },
                          "latest_sent": {
                            "type": "boolean",
                            "description": "Whether the mail thread participant was last to send an email"
                          },
                          "message_time": {
                            "type": "number",
                            "description": "Message time"
                          },
                          "email_address": {
                            "type": "string",
                            "description": "Email address of the mail thread participant"
                          },
                          "linked_person_id": {
                            "type": "integer",
                            "description": "ID of the linked person"
                          },
                          "linked_person_name": {
                            "type": "string",
                            "description": "Email of the linked person"
                          },
                          "mail_message_party_id": {
                            "type": "integer",
                            "description": "ID of the mail message party"
                          },
                          "linked_organization_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Linked Organization ID"
                          }
                        },
                        "description": "Member of a thread"
                      },
                      "description": "Senders of the mail thread"
                    }
                  },
                  "description": "Parties of the mail thread"
                },
                "version": {
                  "type": "number",
                  "description": "Version"
                },
                "add_time": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The time when the mail thread was inserted to database"
                },
                "deal_status": {
                  "type": "string",
                  "nullable": true,
                  "description": "Status of the deal"
                },
                "shared_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread is shared"
                },
                "update_time": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The time when the mail thread was updated in database received"
                },
                "snippet_sent": {
                  "type": "string",
                  "description": "A snippet from a message sent"
                },
                "archived_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread is archived"
                },
                "has_sent_flag": {
                  "type": "number",
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has messages sent"
                },
                "message_count": {
                  "type": "integer",
                  "description": "An amount of messages"
                },
                "snippet_draft": {
                  "type": "string",
                  "nullable": true,
                  "description": "A snippet from a draft"
                },
                "drafts_parties": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "description": "Parties of the drafted mail thread"
                },
                "has_draft_flag": {
                  "type": "number",
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has any drafts"
                },
                "external_deleted_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread has been deleted externally"
                },
                "all_messages_sent_flag": {
                  "type": "number",
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether all the mail thread messages have been sent"
                },
                "last_message_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Last message timestamp"
                },
                "first_message_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The time when the mail thread has had the first message received or created"
                },
                "first_message_to_me_flag": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBooleanDefault0",
                      "default": 0
                    }
                  ],
                  "description": "Whether the mail thread was initialized by others"
                },
                "last_message_sent_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true,
                  "description": "The last time when the mail thread has had a message sent"
                },
                "last_message_received_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The last time when the mail thread has had a message received"
                }
              }
            }
          ],
          "title": "baseMailThread",
          "description": "The mail thread object"
        }
      }
    }
  ],
  "title": "updateMailThreadDetailsResponse200"
}
object MeetingsLinkUserProvider401Response
{
  "type": "object",
  "title": "userProviderLinkErrorResponse",
  "properties": {
    "message": {
      "type": "string",
      "example": "Missing user id or company id",
      "description": "The error message of the request"
    },
    "success": {
      "type": "boolean",
      "description": "Boolean that indicates whether the request was successful or not"
    }
  }
}
object MeetingsLinkUserProviderRequest
{
  "type": "object",
  "title": "addUserProviderLinkRequest",
  "required": [
    "user_provider_id",
    "user_id",
    "company_id",
    "marketplace_client_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "example": 123,
      "description": "Pipedrive user ID"
    },
    "company_id": {
      "type": "integer",
      "example": 456,
      "description": "Pipedrive company ID"
    },
    "user_provider_id": {
      "type": "string",
      "format": "uuid",
      "example": "1e3943c9-6395-462b-b432-1f252c017f3d",
      "description": "Unique identifier linking a user to the installed integration. Generated by the integration."
    },
    "marketplace_client_id": {
      "type": "string",
      "example": "57da5c3c55a82bb4",
      "description": "Pipedrive Marketplace client ID of the installed integration"
    }
  }
}
object MeetingsLinkUserProviderResponse
{
  "type": "object",
  "title": "userProviderLinkSuccessResponse",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "The user was added successfully",
          "description": "The success message of the request"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "Boolean that indicates whether the request was successful or not"
    }
  }
}
object MeetingsRemoveUserProviderLink401Response
{
  "type": "object",
  "title": "userProviderLinkErrorResponse",
  "properties": {
    "message": {
      "type": "string",
      "example": "Missing user id or company id",
      "description": "The error message of the request"
    },
    "success": {
      "type": "boolean",
      "description": "Boolean that indicates whether the request was successful or not"
    }
  }
}
object MeetingsRemoveUserProviderLink403Response
{
  "type": "object",
  "title": "userProviderLinkErrorResponse",
  "properties": {
    "message": {
      "type": "string",
      "example": "Missing user id or company id",
      "description": "The error message of the request"
    },
    "success": {
      "type": "boolean",
      "description": "Boolean that indicates whether the request was successful or not"
    }
  }
}
object MeetingsRemoveUserProviderLinkResponse
{
  "type": "object",
  "title": "userProviderLinkSuccessResponse",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "The user was added successfully",
          "description": "The success message of the request"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "Boolean that indicates whether the request was successful or not"
    }
  }
}
object NoteFieldsGetAllNoteFieldsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the field"
              },
              "key": {
                "type": "string",
                "description": "The key of the field"
              },
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "description": "The options of the field. When there are no options, `null` is returned."
              },
              "edit_flag": {
                "type": "boolean",
                "description": "The edit flag of the field"
              },
              "field_type": {
                "enum": [
                  "address",
                  "date",
                  "daterange",
                  "double",
                  "enum",
                  "monetary",
                  "org",
                  "people",
                  "phone",
                  "set",
                  "text",
                  "time",
                  "timerange",
                  "user",
                  "varchar",
                  "varchar_auto",
                  "visible_to"
                ],
                "type": "string",
                "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the field"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the field is mandatory"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Not used"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getNoteFieldsResponse200"
}
object NotesAddNewCommentRequest
{
  "type": "object",
  "title": "CommentPostPutObject",
  "required": [
    "content"
  ],
  "properties": {
    "content": {
      "type": "string",
      "description": "The content of the comment in HTML format. Subject to sanitization on the back-end."
    }
  }
}
object NotesAddNewCommentResponse
{
  "type": "object",
  "title": "oneCommentResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the note"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user who created the comment"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "object_id": {
          "type": "string",
          "description": "The ID of the object that the comment is attached to, will be the id of the note"
        },
        "company_id": {
          "type": "integer",
          "description": "The ID of the company"
        },
        "updater_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the comment"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "object_type": {
          "type": "string",
          "description": "The type of object that the comment is attached to, will be \"note\""
        },
        "update_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesCreateNoteRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "content"
      ],
      "properties": {
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization this note will be attached to. This property is required unless one of (`deal_id/lead_id/person_id`) is specified."
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal the note will be attached to. This property is required unless one of (`lead_id/person_id/org_id`) is specified."
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead the note will be attached to. This property is required unless one of (`deal_id/person_id/org_id`) is specified."
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person this note will be attached to. This property is required unless one of (`deal_id/lead_id/org_id`) is specified."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the author of the note. Only an admin can change the author."
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the note in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        },
        "pinned_to_deal_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to deal pinning state (`deal_id` is also required)"
        },
        "pinned_to_lead_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to lead pinning state (`lead_id` is also required)"
        },
        "pinned_to_person_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to person pinning state (`person_id` is also required)"
        },
        "pinned_to_organization_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to organization pinning state (`org_id` is also required)"
        }
      }
    }
  ]
}
object NotesCreateNoteResponse
{
  "type": "object",
  "title": "oneNoteResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the note"
        },
        "deal": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "The title of the deal this note is attached to"
            }
          },
          "description": "The deal this note is attached to"
        },
        "user": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the note creator"
            },
            "email": {
              "type": "string",
              "description": "The email of the note creator"
            },
            "is_you": {
              "type": "boolean",
              "description": "Whether the note is created by you or not"
            },
            "icon_url": {
              "type": "string",
              "description": "The URL of the note creator avatar picture"
            }
          },
          "description": "The user who created the note"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization the note is attached to"
        },
        "person": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the person the note is attached to"
            }
          },
          "description": "The person the note is attached to"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal the note is attached to"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead the note is attached to"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the note creator"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person the note is attached to"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the note"
        },
        "organization": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the organization the note is attached to"
            }
          },
          "description": "The organization the note is attached to"
        },
        "last_update_user_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the note"
        },
        "pinned_to_deal_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to deal pinning state"
        },
        "pinned_to_person_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to person pinning state"
        },
        "pinned_to_organization_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to organization pinning state"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesDeleteCommentResponse
{
  "type": "object",
  "title": "deleteCommentResponse200",
  "properties": {
    "data": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesDeleteNoteResponse
{
  "type": "object",
  "title": "deleteNoteResponse200",
  "properties": {
    "data": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesGetAllCommentsResponse
{
  "type": "object",
  "title": "getCommentsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the note"
          },
          "content": {
            "type": "string",
            "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
          },
          "user_id": {
            "type": "integer",
            "description": "The ID of the user who created the comment"
          },
          "add_time": {
            "type": "string",
            "description": "The creation date and time of the note"
          },
          "object_id": {
            "type": "string",
            "description": "The ID of the object that the comment is attached to, will be the id of the note"
          },
          "company_id": {
            "type": "integer",
            "description": "The ID of the company"
          },
          "updater_id": {
            "type": "integer",
            "description": "The ID of the user who last updated the comment"
          },
          "active_flag": {
            "type": "boolean",
            "description": "Whether the note is active or deleted"
          },
          "object_type": {
            "type": "string",
            "description": "The type of object that the comment is attached to, will be \"note\""
          },
          "update_time": {
            "type": "string",
            "description": "The creation date and time of the note"
          }
        }
      },
      "description": "The array of comments"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            },
            {
              "type": "object",
              "properties": {
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                }
              }
            }
          ],
          "description": "The pagination details of the list"
        }
      }
    }
  }
}
object NotesGetAllResponse
{
  "type": "object",
  "title": "getNotesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the note"
          },
          "deal": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "The title of the deal this note is attached to"
              }
            },
            "description": "The deal this note is attached to"
          },
          "user": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the note creator"
              },
              "email": {
                "type": "string",
                "description": "The email of the note creator"
              },
              "is_you": {
                "type": "boolean",
                "description": "Whether the note is created by you or not"
              },
              "icon_url": {
                "type": "string",
                "description": "The URL of the note creator avatar picture"
              }
            },
            "description": "The user who created the note"
          },
          "org_id": {
            "type": "integer",
            "description": "The ID of the organization the note is attached to"
          },
          "person": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the person the note is attached to"
              }
            },
            "description": "The person the note is attached to"
          },
          "content": {
            "type": "string",
            "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
          },
          "deal_id": {
            "type": "integer",
            "description": "The ID of the deal the note is attached to"
          },
          "lead_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the lead the note is attached to"
          },
          "user_id": {
            "type": "integer",
            "description": "The ID of the note creator"
          },
          "add_time": {
            "type": "string",
            "description": "The creation date and time of the note"
          },
          "person_id": {
            "type": "integer",
            "description": "The ID of the person the note is attached to"
          },
          "active_flag": {
            "type": "boolean",
            "description": "Whether the note is active or deleted"
          },
          "update_time": {
            "type": "string",
            "description": "The last updated date and time of the note"
          },
          "organization": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the organization the note is attached to"
              }
            },
            "description": "The organization the note is attached to"
          },
          "last_update_user_id": {
            "type": "integer",
            "description": "The ID of the user who last updated the note"
          },
          "pinned_to_deal_flag": {
            "type": "boolean",
            "description": "If true, the results are filtered by note to deal pinning state"
          },
          "pinned_to_person_flag": {
            "type": "boolean",
            "description": "If true, the results are filtered by note to person pinning state"
          },
          "pinned_to_organization_flag": {
            "type": "boolean",
            "description": "If true, the results are filtered by note to organization pinning state"
          }
        }
      },
      "description": "The array of notes"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            },
            {
              "type": "object",
              "properties": {
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                }
              }
            }
          ],
          "description": "The pagination details of the list"
        }
      }
    }
  }
}
object NotesGetCommentDetailsResponse
{
  "type": "object",
  "title": "oneCommentResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the note"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user who created the comment"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "object_id": {
          "type": "string",
          "description": "The ID of the object that the comment is attached to, will be the id of the note"
        },
        "company_id": {
          "type": "integer",
          "description": "The ID of the company"
        },
        "updater_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the comment"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "object_type": {
          "type": "string",
          "description": "The type of object that the comment is attached to, will be \"note\""
        },
        "update_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesGetDetailsResponse
{
  "type": "object",
  "title": "oneNoteResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the note"
        },
        "deal": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "The title of the deal this note is attached to"
            }
          },
          "description": "The deal this note is attached to"
        },
        "user": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the note creator"
            },
            "email": {
              "type": "string",
              "description": "The email of the note creator"
            },
            "is_you": {
              "type": "boolean",
              "description": "Whether the note is created by you or not"
            },
            "icon_url": {
              "type": "string",
              "description": "The URL of the note creator avatar picture"
            }
          },
          "description": "The user who created the note"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization the note is attached to"
        },
        "person": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the person the note is attached to"
            }
          },
          "description": "The person the note is attached to"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal the note is attached to"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead the note is attached to"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the note creator"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person the note is attached to"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the note"
        },
        "organization": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the organization the note is attached to"
            }
          },
          "description": "The organization the note is attached to"
        },
        "last_update_user_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the note"
        },
        "pinned_to_deal_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to deal pinning state"
        },
        "pinned_to_person_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to person pinning state"
        },
        "pinned_to_organization_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to organization pinning state"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesUpdateCommentRequest
{
  "type": "object",
  "title": "CommentPostPutObject",
  "required": [
    "content"
  ],
  "properties": {
    "content": {
      "type": "string",
      "description": "The content of the comment in HTML format. Subject to sanitization on the back-end."
    }
  }
}
object NotesUpdateCommentResponse
{
  "type": "object",
  "title": "oneCommentResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the note"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user who created the comment"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "object_id": {
          "type": "string",
          "description": "The ID of the object that the comment is attached to, will be the id of the note"
        },
        "company_id": {
          "type": "integer",
          "description": "The ID of the company"
        },
        "updater_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the comment"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "object_type": {
          "type": "string",
          "description": "The type of object that the comment is attached to, will be \"note\""
        },
        "update_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object NotesUpdateNoteRequest
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization the note will be attached to"
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal the note will be attached to"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead the note will be attached to"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person the note will be attached to"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the author of the note. Only an admin can change the author."
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the note in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        },
        "pinned_to_deal_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to deal pinning state (`deal_id` is also required)"
        },
        "pinned_to_lead_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to lead pinning state (`lead_id` is also required)"
        },
        "pinned_to_person_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to person pinning state (`person_id` is also required)"
        },
        "pinned_to_organization_flag": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "If set, the results are filtered by note to organization pinning state (`org_id` is also required)"
        }
      }
    }
  ],
  "title": "noteRequest"
}
object NotesUpdateNoteResponse
{
  "type": "object",
  "title": "oneNoteResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the note"
        },
        "deal": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "The title of the deal this note is attached to"
            }
          },
          "description": "The deal this note is attached to"
        },
        "user": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the note creator"
            },
            "email": {
              "type": "string",
              "description": "The email of the note creator"
            },
            "is_you": {
              "type": "boolean",
              "description": "Whether the note is created by you or not"
            },
            "icon_url": {
              "type": "string",
              "description": "The URL of the note creator avatar picture"
            }
          },
          "description": "The user who created the note"
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization the note is attached to"
        },
        "person": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the person the note is attached to"
            }
          },
          "description": "The person the note is attached to"
        },
        "content": {
          "type": "string",
          "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
        },
        "deal_id": {
          "type": "integer",
          "description": "The ID of the deal the note is attached to"
        },
        "lead_id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the lead the note is attached to"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the note creator"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the note"
        },
        "person_id": {
          "type": "integer",
          "description": "The ID of the person the note is attached to"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the note is active or deleted"
        },
        "update_time": {
          "type": "string",
          "description": "The last updated date and time of the note"
        },
        "organization": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the organization the note is attached to"
            }
          },
          "description": "The organization the note is attached to"
        },
        "last_update_user_id": {
          "type": "integer",
          "description": "The ID of the user who last updated the note"
        },
        "pinned_to_deal_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to deal pinning state"
        },
        "pinned_to_person_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to person pinning state"
        },
        "pinned_to_organization_flag": {
          "type": "boolean",
          "description": "If true, the results are filtered by note to organization pinning state"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OauthRefreshTokenRequest
{
  "type": "object",
  "title": "getTokensRequest",
  "properties": {
    "grant_type": {
      "enum": [
        "authorization_code",
        "refresh_token"
      ],
      "type": "string",
      "default": "refresh_token",
      "description": "Since you are to refresh your access_token, you must use the value \"refresh_token\""
    },
    "refresh_token": {
      "type": "string",
      "description": "The refresh token that you received after you exchanged the authorization code"
    }
  }
}
object OauthRefreshTokenResponse
{
  "type": "object",
  "title": "getTokensResponse200",
  "properties": {
    "scope": {
      "type": "string",
      "description": "List of scopes to which users have agreed to grant access within this `access_token`"
    },
    "api_domain": {
      "type": "string",
      "description": "The base URL path, including the company_domain, where the requests can be sent to"
    },
    "expires_in": {
      "type": "integer",
      "description": "The maximum time in seconds until the `access_token` expires"
    },
    "token_type": {
      "type": "string",
      "description": "The format of the token. Always \"Bearer\"."
    },
    "access_token": {
      "type": "string",
      "description": "You need to use an `access_token` for accessing the user's data via API. You will need to [refresh the access token](https://pipedrive.readme.io/docs/marketplace-oauth-authorization#step-7-refreshing-the-tokens) if the `access_token` becomes invalid."
    },
    "refresh_token": {
      "type": "string",
      "description": "A refresh token is needed when you refresh the access token. refresh_token will expire if it isn't used in 60 days. Each time refresh_token is used, its expiry date is reset back to 60 days."
    }
  }
}
object OrganizationFieldsAddNewFieldRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. Example: `[{\"label\":\"New Item\"}]`"
        },
        "add_visible_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether the field is available in the 'add new' modal or not (both in the web and mobile app)"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "field_type"
      ],
      "properties": {
        "field_type": {
          "enum": [
            "address",
            "date",
            "daterange",
            "double",
            "enum",
            "monetary",
            "org",
            "people",
            "phone",
            "set",
            "text",
            "time",
            "timerange",
            "user",
            "varchar",
            "varchar_auto",
            "visible_to"
          ],
          "type": "string",
          "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
        }
      }
    }
  ],
  "title": "createFieldRequest"
}
object OrganizationFieldsAddNewFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object OrganizationFieldsDeleteMultipleBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The list of deleted field IDs"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldsResponse200"
}
object OrganizationFieldsGetAllFieldsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the field. Value is `null` in case of subfields."
              },
              "key": {
                "type": "string",
                "description": "The key of the field. For custom fields this is generated upon creation."
              },
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "The options of the field. When there are no options, `null` is returned."
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the field"
              },
              "order_nr": {
                "type": "integer",
                "description": "The order number of the field"
              },
              "edit_flag": {
                "type": "boolean",
                "description": "The edit flag of the field"
              },
              "subfields": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The subfields of the field. Only present when the field has subfields."
              },
              "field_type": {
                "allOf": [
                  {
                    "enum": [
                      "address",
                      "date",
                      "daterange",
                      "double",
                      "enum",
                      "monetary",
                      "org",
                      "people",
                      "phone",
                      "set",
                      "text",
                      "time",
                      "timerange",
                      "user",
                      "varchar",
                      "varchar_auto",
                      "visible_to"
                    ],
                    "type": "string",
                    "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                  }
                ]
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the field"
              },
              "is_subfield": {
                "type": "boolean",
                "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the field"
              },
              "sortable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be sorted by this field"
              },
              "important_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the field is mandatory"
              },
              "options_deleted": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
              },
              "searchable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be searched by this field"
              },
              "add_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Whether or not the field of an item can be edited in bulk"
              },
              "filtering_allowed": {
                "type": "boolean",
                "description": "Whether or not items can be filtered by this field"
              },
              "index_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "details_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "last_updated_by_user_id": {
                "type": "integer",
                "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "fieldsResponse200"
}
object OrganizationFieldsGetSpecificFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object OrganizationFieldsMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field that was deleted"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldResponse200"
}
object OrganizationFieldsUpdateFieldRequest
{
  "type": "object",
  "title": "updateFieldRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the field"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: `[{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}]`"
    },
    "add_visible_flag": {
      "type": "boolean",
      "default": true,
      "description": "Whether the field is available in 'add new' modal or not (both in web and mobile app)"
    }
  }
}
object OrganizationFieldsUpdateFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object OrganizationRelationshipsCreateNewRelationshipRequest
{
  "type": "object",
  "title": "addOrganizationRelationshipRequest",
  "required": [
    "type",
    "rel_owner_org_id",
    "rel_linked_org_id"
  ],
  "properties": {
    "type": {
      "enum": [
        "parent",
        "related"
      ],
      "type": "string",
      "description": "The type of organization relationship"
    },
    "org_id": {
      "type": "integer",
      "description": "The ID of the base organization for the returned calculated values"
    },
    "rel_owner_org_id": {
      "type": "integer",
      "description": "The owner of the relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter."
    },
    "rel_linked_org_id": {
      "type": "integer",
      "description": "The linked organization in the relationship. If type is `parent`, then the linked organization is the daughter."
    }
  }
}
object OrganizationRelationshipsCreateNewRelationshipResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the organization relationship"
            },
            "type": {
              "type": "string",
              "description": "The type of the relationship"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the relationship"
            },
            "active_flag": {
              "type": "string",
              "description": "Whether the relationship is active or not"
            },
            "update_time": {
              "type": "string",
              "description": "The last updated date and time of the relationship"
            },
            "rel_owner_org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization"
                    }
                  }
                }
              ],
              "title": "relationshipOrganizationInfoItem"
            },
            "rel_linked_org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization"
                    }
                  }
                }
              ],
              "title": "relationshipOrganizationInfoItem"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "addOrganizationRelationshipResponse200"
}
object OrganizationRelationshipsDeleteByIdResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted organization relationship"
            }
          }
        }
      }
    }
  ],
  "title": "deleteOrganizationRelationshipResponse200"
}
object OrganizationRelationshipsGetAllRelationshipsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the organization relationship"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the relationship"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The creation date and time of the relationship"
                      },
                      "active_flag": {
                        "type": "string",
                        "description": "Whether the relationship is active or not"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last updated date and time of the relationship"
                      },
                      "rel_owner_org_id": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the organization associated with the item"
                              },
                              "address": {
                                "type": "string",
                                "description": "The address of the organization"
                              },
                              "cc_email": {
                                "type": "string",
                                "description": "The BCC email of the organization associated with the item"
                              },
                              "owner_id": {
                                "type": "integer",
                                "description": "The ID of the owner of the organization that is associated with the item"
                              },
                              "people_count": {
                                "type": "integer",
                                "description": "The number of people connected with the organization that is associated with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "description": "The ID of the organization"
                              }
                            }
                          }
                        ],
                        "title": "relationshipOrganizationInfoItem"
                      },
                      "rel_linked_org_id": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the organization associated with the item"
                              },
                              "address": {
                                "type": "string",
                                "description": "The address of the organization"
                              },
                              "cc_email": {
                                "type": "string",
                                "description": "The BCC email of the organization associated with the item"
                              },
                              "owner_id": {
                                "type": "integer",
                                "description": "The ID of the owner of the organization that is associated with the item"
                              },
                              "people_count": {
                                "type": "integer",
                                "description": "The number of people connected with the organization that is associated with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "description": "The ID of the organization"
                              }
                            }
                          }
                        ],
                        "title": "relationshipOrganizationInfoItem"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "calculated_type": {
                        "type": "string",
                        "description": "The calculated type of the relationship with the linked organization"
                      },
                      "calculated_related_org_id": {
                        "type": "integer",
                        "description": "The ID of the linked organization"
                      }
                    }
                  }
                ],
                "title": "organizationRelationshipWithCalculatedFields"
              },
              {
                "type": "object",
                "properties": {
                  "related_organization_name": {
                    "type": "string",
                    "description": "The name of the linked organization"
                  }
                }
              }
            ],
            "title": "organizationRelationshipDetails"
          },
          "description": "The array of organization relationships"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getOrganizationRelationshipsResponse200"
}
object OrganizationRelationshipsGetByIdResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the organization relationship"
                },
                "type": {
                  "type": "string",
                  "description": "The type of the relationship"
                },
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the relationship"
                },
                "active_flag": {
                  "type": "string",
                  "description": "Whether the relationship is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the relationship"
                },
                "rel_owner_org_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the organization"
                        }
                      }
                    }
                  ],
                  "title": "relationshipOrganizationInfoItem"
                },
                "rel_linked_org_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the organization"
                        }
                      }
                    }
                  ],
                  "title": "relationshipOrganizationInfoItem"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "calculated_type": {
                  "type": "string",
                  "description": "The calculated type of the relationship with the linked organization"
                },
                "calculated_related_org_id": {
                  "type": "integer",
                  "description": "The ID of the linked organization"
                }
              }
            }
          ],
          "title": "organizationRelationshipWithCalculatedFields"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getOrganizationRelationshipResponse200"
}
object OrganizationRelationshipsUpdateAndReturnRequest
{
  "type": "object",
  "title": "organizationRelationship",
  "properties": {
    "type": {
      "enum": [
        "parent",
        "related"
      ],
      "type": "string",
      "description": "The type of organization relationship"
    },
    "org_id": {
      "type": "integer",
      "description": "The ID of the base organization for the returned calculated values"
    },
    "rel_owner_org_id": {
      "type": "integer",
      "description": "The owner of this relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter."
    },
    "rel_linked_org_id": {
      "type": "integer",
      "description": "The linked organization in this relationship. If type is `parent`, then the linked organization is the daughter."
    }
  }
}
object OrganizationRelationshipsUpdateAndReturnResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the organization relationship"
            },
            "type": {
              "type": "string",
              "description": "The type of the relationship"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the relationship"
            },
            "active_flag": {
              "type": "string",
              "description": "Whether the relationship is active or not"
            },
            "update_time": {
              "type": "string",
              "description": "The last updated date and time of the relationship"
            },
            "rel_owner_org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization"
                    }
                  }
                }
              ],
              "title": "relationshipOrganizationInfoItem"
            },
            "rel_linked_org_id": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "The ID of the organization"
                    }
                  }
                }
              ],
              "title": "relationshipOrganizationInfoItem"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "updateOrganizationRelationshipResponse200"
}
object OrganizationsAddFollowerRequest
{
  "type": "object",
  "title": "addOrganizationFollowerRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object OrganizationsAddFollowerResponse
{
  "type": "object",
  "title": "addOrganizationFollowerResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "integer",
              "description": "The ID of the organization"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the follower"
            },
            "user_id": {
              "type": "integer",
              "description": "The user ID of the follower related to the item"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date and time of adding the follower to the item"
            }
          }
        }
      ]
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OrganizationsAddNewOrganizationRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the organization"
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the organization in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        }
      }
    },
    {
      "type": "object",
      "title": "basicOrganization",
      "properties": {
        "label": {
          "type": "integer",
          "description": "The ID of the label."
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this organization. When omitted, the authorized user ID will be used."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the organization. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        }
      }
    }
  ],
  "title": "addOrganizationRequest"
}
object OrganizationsAddNewOrganizationResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the organization"
                    },
                    "label": {
                      "type": "integer",
                      "description": "The label assigned to the organization"
                    },
                    "add_time": {
                      "type": "string",
                      "description": "The creation date and time of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email associated with the organization"
                    },
                    "owner_id": {
                      "allOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the user"
                            },
                            "name": {
                              "type": "string",
                              "description": "The name of the user"
                            },
                            "email": {
                              "type": "string",
                              "description": "The email of the user"
                            },
                            "has_pic": {
                              "type": "integer",
                              "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                            },
                            "pic_hash": {
                              "type": "string",
                              "nullable": true,
                              "description": "The user picture hash"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the user is active or not"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "description": "The ID of the owner"
                            }
                          }
                        }
                      ],
                      "title": "owner"
                    },
                    "company_id": {
                      "type": "integer",
                      "description": "The ID of the company related to the organization"
                    },
                    "first_char": {
                      "type": "string",
                      "description": "The first character of the organization name"
                    },
                    "owner_name": {
                      "type": "string",
                      "description": "The name of the organization owner"
                    },
                    "picture_id": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    },
                    "visible_to": {
                      "type": "string",
                      "description": "The visibility group ID of who can see the organization"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the organization is active or not"
                    },
                    "update_time": {
                      "type": "string",
                      "description": "The last updated date and time of the organization"
                    },
                    "country_code": {
                      "type": "string",
                      "nullable": true,
                      "description": "The country code of the organization"
                    }
                  }
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "files_count": {
                              "type": "integer",
                              "description": "The count of files related to the organization"
                            },
                            "notes_count": {
                              "type": "integer",
                              "description": "The count of notes related to the organization"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The count of persons related to the organization"
                            },
                            "followers_count": {
                              "type": "integer",
                              "description": "The count of followers related to the organization"
                            },
                            "activities_count": {
                              "type": "integer",
                              "description": "The count of activities related to the organization"
                            },
                            "email_messages_count": {
                              "type": "integer",
                              "description": "The count of email messages related to the organization"
                            },
                            "done_activities_count": {
                              "type": "integer",
                              "description": "The count of done activities related to the organization"
                            },
                            "undone_activities_count": {
                              "type": "integer",
                              "description": "The count of undone activities related to the organization"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "address": {
                              "type": "string",
                              "description": "The full address of the organization"
                            },
                            "address_route": {
                              "type": "string",
                              "description": "The route of the organization location"
                            },
                            "address_country": {
                              "type": "string",
                              "description": "The country of the organization location"
                            },
                            "address_locality": {
                              "type": "string",
                              "description": "The locality of the organization location"
                            },
                            "address_subpremise": {
                              "type": "string",
                              "description": "The sub-premise of the organization location"
                            },
                            "address_postal_code": {
                              "type": "string",
                              "description": "The postal code of the organization location"
                            },
                            "address_sublocality": {
                              "type": "string",
                              "description": "The sub-locality of the organization location"
                            },
                            "address_street_number": {
                              "type": "string",
                              "description": "The street number of the organization location"
                            },
                            "address_formatted_address": {
                              "type": "string",
                              "description": "The formatted organization location"
                            },
                            "address_admin_area_level_1": {
                              "type": "string",
                              "description": "The level 1 admin area of the organization location"
                            },
                            "address_admin_area_level_2": {
                              "type": "string",
                              "description": "The level 2 admin area of the organization location"
                            }
                          }
                        }
                      ],
                      "title": "organizationCountAndAddressInfo"
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealsCountAndActivityInfo"
                    }
                  ],
                  "title": "additionalBaseOrganizationItemInfo"
                }
              ],
              "title": "baseOrganizationItem"
            },
            {
              "type": "object",
              "properties": {
                "edit_name": {
                  "type": "boolean",
                  "description": "If the company ID of the organization and company ID of the request is same or not"
                }
              }
            }
          ],
          "title": "baseOrganizationItemWithEditNameFlag"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "addOrganizationResponse200"
}
object OrganizationsDeleteFollowerResponse
{
  "type": "object",
  "title": "deleteOrganizationFollowerResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the follower that was deleted from the organization"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OrganizationsDeleteMarkedOrganizationResponse
{
  "type": "object",
  "title": "deleteOrganizationResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the organization that was deleted"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OrganizationsDeleteMultipleBulkResponse
{
  "type": "object",
  "title": "deleteOrganizationsResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "The IDs of the organizations that were deleted"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OrganizationsGetAllResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the organization"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the organization"
                  },
                  "label": {
                    "type": "integer",
                    "description": "The label assigned to the organization"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the organization"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email associated with the organization"
                  },
                  "owner_id": {
                    "allOf": [
                      {
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the user"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user"
                          },
                          "email": {
                            "type": "string",
                            "description": "The email of the user"
                          },
                          "has_pic": {
                            "type": "integer",
                            "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                          },
                          "pic_hash": {
                            "type": "string",
                            "nullable": true,
                            "description": "The user picture hash"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the user is active or not"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the owner"
                          }
                        }
                      }
                    ],
                    "title": "owner"
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The ID of the company related to the organization"
                  },
                  "first_char": {
                    "type": "string",
                    "description": "The first character of the organization name"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the organization owner"
                  },
                  "picture_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the picture associated with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "item_id": {
                            "type": "integer",
                            "description": "The ID of related item"
                          },
                          "add_time": {
                            "type": "string",
                            "description": "The add time of the picture"
                          },
                          "pictures": {
                            "type": "object",
                            "properties": {
                              "128": {
                                "type": "string",
                                "description": "The URL of the 128*128 picture"
                              },
                              "512": {
                                "type": "string",
                                "description": "The URL of the 512*512 picture"
                              }
                            }
                          },
                          "item_type": {
                            "type": "string",
                            "description": "The type of item the picture is related to"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated picture is active or not"
                          },
                          "update_time": {
                            "type": "string",
                            "description": "The update time of the picture"
                          },
                          "added_by_user_id": {
                            "type": "integer",
                            "description": "The ID of the user who added the picture"
                          }
                        }
                      }
                    ]
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility group ID of who can see the organization"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the organization is active or not"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the organization"
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "The country code of the organization"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "files_count": {
                            "type": "integer",
                            "description": "The count of files related to the organization"
                          },
                          "notes_count": {
                            "type": "integer",
                            "description": "The count of notes related to the organization"
                          },
                          "people_count": {
                            "type": "integer",
                            "description": "The count of persons related to the organization"
                          },
                          "followers_count": {
                            "type": "integer",
                            "description": "The count of followers related to the organization"
                          },
                          "activities_count": {
                            "type": "integer",
                            "description": "The count of activities related to the organization"
                          },
                          "email_messages_count": {
                            "type": "integer",
                            "description": "The count of email messages related to the organization"
                          },
                          "done_activities_count": {
                            "type": "integer",
                            "description": "The count of done activities related to the organization"
                          },
                          "undone_activities_count": {
                            "type": "integer",
                            "description": "The count of undone activities related to the organization"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "description": "The full address of the organization"
                          },
                          "address_route": {
                            "type": "string",
                            "description": "The route of the organization location"
                          },
                          "address_country": {
                            "type": "string",
                            "description": "The country of the organization location"
                          },
                          "address_locality": {
                            "type": "string",
                            "description": "The locality of the organization location"
                          },
                          "address_subpremise": {
                            "type": "string",
                            "description": "The sub-premise of the organization location"
                          },
                          "address_postal_code": {
                            "type": "string",
                            "description": "The postal code of the organization location"
                          },
                          "address_sublocality": {
                            "type": "string",
                            "description": "The sub-locality of the organization location"
                          },
                          "address_street_number": {
                            "type": "string",
                            "description": "The street number of the organization location"
                          },
                          "address_formatted_address": {
                            "type": "string",
                            "description": "The formatted organization location"
                          },
                          "address_admin_area_level_1": {
                            "type": "string",
                            "description": "The level 1 admin area of the organization location"
                          },
                          "address_admin_area_level_2": {
                            "type": "string",
                            "description": "The level 2 admin area of the organization location"
                          }
                        }
                      }
                    ],
                    "title": "organizationCountAndAddressInfo"
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "won_deals_count": {
                            "type": "integer",
                            "description": "The count of won deals related with the item"
                          },
                          "lost_deals_count": {
                            "type": "integer",
                            "description": "The count of lost deals related with the item"
                          },
                          "open_deals_count": {
                            "type": "integer",
                            "description": "The count of open deals related with the item"
                          },
                          "closed_deals_count": {
                            "type": "integer",
                            "description": "The count of closed deals related with the item"
                          },
                          "related_won_deals_count": {
                            "type": "integer",
                            "description": "The count of related won deals related with the item"
                          },
                          "related_lost_deals_count": {
                            "type": "integer",
                            "description": "The count of related lost deals related with the item"
                          },
                          "related_open_deals_count": {
                            "type": "integer",
                            "description": "The count of related open deals related with the item"
                          },
                          "related_closed_deals_count": {
                            "type": "integer",
                            "description": "The count of related closed deals related with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "last_activity_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The ID of the last activity associated with the deal"
                          },
                          "next_activity_id": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The ID of the next activity associated with the deal"
                          },
                          "last_activity_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "The date of the last activity associated with the deal"
                          },
                          "next_activity_date": {
                            "type": "string",
                            "nullable": true,
                            "description": "The date of the next activity associated with the deal"
                          },
                          "next_activity_time": {
                            "type": "string",
                            "nullable": true,
                            "description": "The time of the next activity associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealsCountAndActivityInfo"
                  }
                ],
                "title": "additionalBaseOrganizationItemInfo"
              }
            ],
            "title": "baseOrganizationItem"
          },
          "description": "The array of organizations"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getOrganizationsResponse200"
}
object OrganizationsGetDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the organization"
                        },
                        "label": {
                          "type": "integer",
                          "description": "The label assigned to the organization"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The creation date and time of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email associated with the organization"
                        },
                        "owner_id": {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "The ID of the user"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the user"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The email of the user"
                                },
                                "has_pic": {
                                  "type": "integer",
                                  "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                },
                                "pic_hash": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The user picture hash"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the user is active or not"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the owner"
                                }
                              }
                            }
                          ],
                          "title": "owner"
                        },
                        "company_id": {
                          "type": "integer",
                          "description": "The ID of the company related to the organization"
                        },
                        "first_char": {
                          "type": "string",
                          "description": "The first character of the organization name"
                        },
                        "owner_name": {
                          "type": "string",
                          "description": "The name of the organization owner"
                        },
                        "picture_id": {
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the picture associated with the item"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "item_id": {
                                  "type": "integer",
                                  "description": "The ID of related item"
                                },
                                "add_time": {
                                  "type": "string",
                                  "description": "The add time of the picture"
                                },
                                "pictures": {
                                  "type": "object",
                                  "properties": {
                                    "128": {
                                      "type": "string",
                                      "description": "The URL of the 128*128 picture"
                                    },
                                    "512": {
                                      "type": "string",
                                      "description": "The URL of the 512*512 picture"
                                    }
                                  }
                                },
                                "item_type": {
                                  "type": "string",
                                  "description": "The type of item the picture is related to"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the associated picture is active or not"
                                },
                                "update_time": {
                                  "type": "string",
                                  "description": "The update time of the picture"
                                },
                                "added_by_user_id": {
                                  "type": "integer",
                                  "description": "The ID of the user who added the picture"
                                }
                              }
                            }
                          ]
                        },
                        "visible_to": {
                          "type": "string",
                          "description": "The visibility group ID of who can see the organization"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the organization is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The last updated date and time of the organization"
                        },
                        "country_code": {
                          "type": "string",
                          "nullable": true,
                          "description": "The country code of the organization"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "files_count": {
                                  "type": "integer",
                                  "description": "The count of files related to the organization"
                                },
                                "notes_count": {
                                  "type": "integer",
                                  "description": "The count of notes related to the organization"
                                },
                                "people_count": {
                                  "type": "integer",
                                  "description": "The count of persons related to the organization"
                                },
                                "followers_count": {
                                  "type": "integer",
                                  "description": "The count of followers related to the organization"
                                },
                                "activities_count": {
                                  "type": "integer",
                                  "description": "The count of activities related to the organization"
                                },
                                "email_messages_count": {
                                  "type": "integer",
                                  "description": "The count of email messages related to the organization"
                                },
                                "done_activities_count": {
                                  "type": "integer",
                                  "description": "The count of done activities related to the organization"
                                },
                                "undone_activities_count": {
                                  "type": "integer",
                                  "description": "The count of undone activities related to the organization"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "address": {
                                  "type": "string",
                                  "description": "The full address of the organization"
                                },
                                "address_route": {
                                  "type": "string",
                                  "description": "The route of the organization location"
                                },
                                "address_country": {
                                  "type": "string",
                                  "description": "The country of the organization location"
                                },
                                "address_locality": {
                                  "type": "string",
                                  "description": "The locality of the organization location"
                                },
                                "address_subpremise": {
                                  "type": "string",
                                  "description": "The sub-premise of the organization location"
                                },
                                "address_postal_code": {
                                  "type": "string",
                                  "description": "The postal code of the organization location"
                                },
                                "address_sublocality": {
                                  "type": "string",
                                  "description": "The sub-locality of the organization location"
                                },
                                "address_street_number": {
                                  "type": "string",
                                  "description": "The street number of the organization location"
                                },
                                "address_formatted_address": {
                                  "type": "string",
                                  "description": "The formatted organization location"
                                },
                                "address_admin_area_level_1": {
                                  "type": "string",
                                  "description": "The level 1 admin area of the organization location"
                                },
                                "address_admin_area_level_2": {
                                  "type": "string",
                                  "description": "The level 2 admin area of the organization location"
                                }
                              }
                            }
                          ],
                          "title": "organizationCountAndAddressInfo"
                        },
                        {
                          "type": "object",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "won_deals_count": {
                                  "type": "integer",
                                  "description": "The count of won deals related with the item"
                                },
                                "lost_deals_count": {
                                  "type": "integer",
                                  "description": "The count of lost deals related with the item"
                                },
                                "open_deals_count": {
                                  "type": "integer",
                                  "description": "The count of open deals related with the item"
                                },
                                "closed_deals_count": {
                                  "type": "integer",
                                  "description": "The count of closed deals related with the item"
                                },
                                "related_won_deals_count": {
                                  "type": "integer",
                                  "description": "The count of related won deals related with the item"
                                },
                                "related_lost_deals_count": {
                                  "type": "integer",
                                  "description": "The count of related lost deals related with the item"
                                },
                                "related_open_deals_count": {
                                  "type": "integer",
                                  "description": "The count of related open deals related with the item"
                                },
                                "related_closed_deals_count": {
                                  "type": "integer",
                                  "description": "The count of related closed deals related with the item"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "last_activity_id": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "The ID of the last activity associated with the deal"
                                },
                                "next_activity_id": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "The ID of the next activity associated with the deal"
                                },
                                "last_activity_date": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The date of the last activity associated with the deal"
                                },
                                "next_activity_date": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The date of the next activity associated with the deal"
                                },
                                "next_activity_time": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The time of the next activity associated with the deal"
                                }
                              }
                            }
                          ],
                          "title": "dealsCountAndActivityInfo"
                        }
                      ],
                      "title": "additionalBaseOrganizationItemInfo"
                    }
                  ],
                  "title": "baseOrganizationItem"
                },
                {
                  "type": "object",
                  "properties": {
                    "edit_name": {
                      "type": "boolean",
                      "description": "If the company ID of the organization and company ID of the request is same or not"
                    }
                  }
                }
              ],
              "title": "baseOrganizationItemWithEditNameFlag"
            },
            {
              "type": "object",
              "properties": {
                "last_activity": {
                  "type": "object",
                  "nullable": true,
                  "description": "Please refer to response schema of <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivity\">Activity</a>"
                },
                "next_activity": {
                  "type": "object",
                  "nullable": true,
                  "description": "Please refer to response schema of <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivity\">Activity</a>"
                }
              }
            }
          ],
          "title": "organizationItem"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "followers": {
              "type": "object",
              "properties": {
                "FOLLOWER_USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the follower associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the follower"
                            },
                            "email": {
                              "type": "string",
                              "description": "The email of the follower"
                            },
                            "user_id": {
                              "type": "integer",
                              "description": "The user ID of the follower"
                            },
                            "pic_hash": {
                              "type": "string",
                              "description": "The follower picture hash"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The user ID of the follower"
                }
              },
              "description": "The follower that is associated with the item"
            },
            "dropbox_email": {
              "type": "string",
              "description": "Dropbox email for the organization"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getOrganizationResponse200"
}
object OrganizationsListActivitiesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization this activity is associated with"
                  },
                  "deal_id": {
                    "type": "integer",
                    "description": "The ID of the deal this activity is associated with"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "The ID of the lead in the UUID format this activity is associated with"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The due date of the activity. Format: YYYY-MM-DD"
                  },
                  "due_time": {
                    "type": "string",
                    "description": "The due time of the activity in UTC. Format: HH:MM"
                  },
                  "duration": {
                    "type": "string",
                    "description": "The duration of the activity. Format: HH:MM"
                  },
                  "location": {
                    "type": "string",
                    "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person this activity is associated with"
                  },
                  "project_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the project this activity is associated with"
                  },
                  "public_description": {
                    "type": "string",
                    "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the activity, generated when the activity was created"
                  },
                  "done": {
                    "type": "boolean",
                    "description": "Whether the activity is done or not"
                  },
                  "file": {
                    "type": "object",
                    "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
                  },
                  "note": {
                    "type": "string",
                    "description": "The note of the activity (HTML format)"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
                  },
                  "series": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject of the activity"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user whom the activity is assigned to"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization this activity is associated with"
                  },
                  "rec_rule": {
                    "type": "string",
                    "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
                  },
                  "busy_flag": {
                    "type": "boolean",
                    "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The user's company ID"
                  },
                  "deal_title": {
                    "type": "string",
                    "description": "The name of the deal this activity is associated with"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the user this activity is owned by"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the activity is active or not"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person this activity is associated with"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "participants": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "List of multiple persons (participants) this activity is associated with"
                  },
                  "reference_id": {
                    "type": "integer",
                    "description": "Together with the `reference_type`, gives the ID of the other object"
                  },
                  "gcal_event_id": {
                    "type": "string",
                    "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_route": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates street name."
                  },
                  "reference_type": {
                    "type": "string",
                    "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
                  },
                  "update_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who was the last to update this activity"
                  },
                  "source_timezone": {
                    "type": "string",
                    "description": "The timezone the activity was created in an external calendar"
                  },
                  "deal_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the deal"
                  },
                  "location_country": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates country."
                  },
                  "location_locality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates city/town/village/locality."
                  },
                  "created_by_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who created the activity"
                  },
                  "google_calendar_id": {
                    "type": "string",
                    "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "person_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the person"
                  },
                  "rec_rule_extension": {
                    "type": "string",
                    "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
                  },
                  "assigned_to_user_id": {
                    "type": "integer",
                    "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
                  },
                  "location_subpremise": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates apartment/suite number."
                  },
                  "marked_as_done_time": {
                    "type": "string",
                    "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "google_calendar_etag": {
                    "type": "string",
                    "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_postal_code": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates ZIP/postal code."
                  },
                  "location_sublocality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates district/sublocality."
                  },
                  "conference_meeting_id": {
                    "type": "string",
                    "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
                  },
                  "conference_meeting_url": {
                    "type": "string",
                    "description": "The link to join the meeting which is associated with this activity"
                  },
                  "last_notification_time": {
                    "type": "string",
                    "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
                  },
                  "location_street_number": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates house number."
                  },
                  "rec_master_activity_id": {
                    "type": "integer",
                    "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
                  },
                  "notification_language_id": {
                    "type": "integer",
                    "description": "The ID of the language the notifications are sent in"
                  },
                  "conference_meeting_client": {
                    "type": "string",
                    "description": "The ID of the Marketplace app, which is connected to this activity"
                  },
                  "last_notification_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
                  },
                  "location_formatted_address": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates full/combined address."
                  },
                  "location_admin_area_level_1": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates state/county."
                  },
                  "location_admin_area_level_2": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates region."
                  },
                  "calendar_sync_include_context": {
                    "type": "string",
                    "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
                  }
                }
              }
            ],
            "title": "activityResponseObject"
          },
          "description": "The array of activities"
        },
        "additional_data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "activity_distribution": {
                  "type": "object",
                  "properties": {
                    "ASSIGNED_TO_USER_ID": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "share": {
                          "type": "integer",
                          "description": "The percentage of activities belongs to the user"
                        },
                        "activities": {
                          "type": "object",
                          "properties": {
                            "ACTIVITY_TYPE_NAME": {
                              "type": "integer",
                              "description": "The count of activities related to a specific type"
                            }
                          },
                          "description": "The count of activities related to the user grouped by activity type"
                        },
                        "activity_count": {
                          "type": "integer",
                          "description": "The overall count of activities for the user"
                        }
                      },
                      "description": "The ID of the user"
                    }
                  },
                  "description": "The distribution of activities related to the organization grouped by the user ID"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            }
          ],
          "title": "activityDistributionDataWithAdditionalData"
        }
      }
    }
  ],
  "title": "getAssociatedActivitiesResponse200"
}
object OrganizationsListAllOrganizations403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object OrganizationsListAllOrganizationsResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "description": "The full address of the organization"
              },
              "address_route": {
                "type": "string",
                "description": "The route of the organization location"
              },
              "address_country": {
                "type": "string",
                "description": "The country of the organization location"
              },
              "address_locality": {
                "type": "string",
                "description": "The locality of the organization location"
              },
              "address_subpremise": {
                "type": "string",
                "description": "The sub-premise of the organization location"
              },
              "address_postal_code": {
                "type": "string",
                "description": "The postal code of the organization location"
              },
              "address_sublocality": {
                "type": "string",
                "description": "The sub-locality of the organization location"
              },
              "address_street_number": {
                "type": "string",
                "description": "The street number of the organization location"
              },
              "address_formatted_address": {
                "type": "string",
                "description": "The formatted organization location"
              },
              "address_admin_area_level_1": {
                "type": "string",
                "description": "The level 1 admin area of the organization location"
              },
              "address_admin_area_level_2": {
                "type": "string",
                "description": "The level 2 admin area of the organization location"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the organization"
              },
              "name": {
                "type": "string",
                "description": "The name of the organization"
              },
              "label": {
                "type": "integer",
                "nullable": true,
                "description": "The label assigned to the organization"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the organization was added/created. Format: YYYY-MM-DD HH:MM:SS"
              },
              "cc_email": {
                "type": "string",
                "description": "The BCC email associated with the organization"
              },
              "owner_id": {
                "type": "integer",
                "description": "The ID of the owner"
              },
              "visible_to": {
                "type": "string",
                "description": "The visibility group ID of who can see the organization"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the organization is active or not"
              },
              "delete_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time this organization was deleted. Format: YYYY-MM-DD HH:MM:SS"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the organization. Format: YYYY-MM-DD HH:MM:SS"
              }
            }
          }
        ],
        "title": "organizationsCollectionResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object OrganizationsListAttachedFilesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the file"
              },
              "cid": {
                "type": "string",
                "description": "The ID of the inline attachment"
              },
              "url": {
                "type": "string",
                "description": "The URL of the download file"
              },
              "name": {
                "type": "string",
                "description": "The visible name of the file"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization to associate the file with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal to associate the file with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the lead to associate the file with"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user to associate the file with"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the file"
              },
              "deal_name": {
                "type": "string",
                "description": "The name of the deal associated with the dile"
              },
              "file_name": {
                "type": "string",
                "description": "The original name of the file"
              },
              "file_size": {
                "type": "integer",
                "description": "The size of the file"
              },
              "lead_name": {
                "type": "string",
                "description": "The name of the lead associated with the file"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person to associate the file with"
              },
              "remote_id": {
                "type": "string",
                "description": "The ID of the remote item"
              },
              "s3_bucket": {
                "type": "string",
                "description": "The location of the cloud storage"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product to associate the file with"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the user is active or not. false = Not activated, true = Activated"
              },
              "activity_id": {
                "type": "integer",
                "description": "The ID of the activity to associate the file with"
              },
              "description": {
                "type": "string",
                "description": "The description of the file"
              },
              "inline_flag": {
                "type": "boolean",
                "description": "Whether the file was uploaded as inline or not"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the file"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
              },
              "product_name": {
                "type": "string",
                "description": "The name of the product associated with the file"
              },
              "mail_message_id": {
                "type": "string",
                "description": "The ID of the mail message to associate the file with"
              },
              "remote_location": {
                "type": "string",
                "description": "The location type to send the file to. Only googledrive is supported at the moment."
              },
              "mail_template_id": {
                "type": "string",
                "description": "The ID of the mail template to associate the file with"
              }
            },
            "description": "The file data"
          },
          "description": "The array of files"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFilesResponse200"
}
object OrganizationsListDealsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the deal"
                  },
                  "org_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the organization associated with the deal"
                          },
                          "address": {
                            "type": "string",
                            "description": "The address of the organization that is associated with the deal"
                          },
                          "cc_email": {
                            "type": "string",
                            "description": "The BCC email of the organization associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the organization that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated organization is active or not"
                          },
                          "people_count": {
                            "type": "integer",
                            "description": "The number of people connected with the organization that is associated with the deal"
                          }
                        },
                        "description": "The organization which is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the organization associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealOrganizationDataWithId"
                  },
                  "user_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the user"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user"
                          },
                          "email": {
                            "type": "string",
                            "description": "The email of the user"
                          },
                          "has_pic": {
                            "type": "boolean",
                            "description": "If the user has a picture or not"
                          },
                          "pic_hash": {
                            "type": "string",
                            "nullable": true,
                            "description": "The user picture hash"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the user is active or not"
                          }
                        },
                        "description": "The user who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the user"
                          }
                        }
                      }
                    ],
                    "title": "dealUserDataWithId"
                  },
                  "person_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person associated with the deal"
                          },
                          "email": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the email"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The email of the associated person"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary email or not"
                                }
                              }
                            },
                            "description": "The emails of the person associated with the deal"
                          },
                          "phone": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the phone number"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The phone number of the person associated with the deal"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary phone number or not"
                                }
                              }
                            },
                            "description": "The phone numbers of the person associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the person that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated person is active or not"
                          }
                        },
                        "description": "The person who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the person associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealPersonDataWithId"
                  },
                  "creator_user_id": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the deal creator"
                      },
                      "email": {
                        "type": "string",
                        "description": "The email of the deal creator"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "has_pic": {
                        "type": "boolean",
                        "description": "If the creator has a picture or not"
                      },
                      "pic_hash": {
                        "type": "string",
                        "nullable": true,
                        "description": "The creator picture hash"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the creator is active or not"
                      }
                    },
                    "description": "The creator of the deal"
                  }
                }
              },
              {
                "type": "object",
                "title": "baseDeal",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The label or multiple labels assigned to the deal"
                  },
                  "title": {
                    "type": "string",
                    "description": "The title of the deal"
                  },
                  "value": {
                    "type": "number",
                    "description": "The value of the deal"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the deal is active or not"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status of the deal"
                  },
                  "deleted": {
                    "type": "boolean",
                    "description": "Whether the deal is deleted or not"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the deal"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email of the deal"
                  },
                  "currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the deal"
                  },
                  "stage_id": {
                    "type": "integer",
                    "description": "The ID of the deal stage"
                  },
                  "won_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as won"
                  },
                  "lost_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as lost"
                  },
                  "close_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of closing the deal"
                  },
                  "org_hidden": {
                    "type": "boolean",
                    "description": "If the organization that is associated with the deal is hidden or not"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the deal owner"
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility of the deal"
                  },
                  "files_count": {
                    "type": "integer",
                    "description": "The number of files associated with the deal"
                  },
                  "lost_reason": {
                    "type": "string",
                    "nullable": true,
                    "description": "The reason for losing the deal"
                  },
                  "notes_count": {
                    "type": "integer",
                    "description": "The number of notes associated with the deal"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person associated with the deal"
                  },
                  "pipeline_id": {
                    "type": "integer",
                    "description": "The ID of the pipeline associated with the deal"
                  },
                  "probability": {
                    "type": "number",
                    "nullable": true,
                    "description": "The success probability percentage of the deal"
                  },
                  "rotten_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of changing the deal status as rotten"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal"
                  },
                  "person_hidden": {
                    "type": "boolean",
                    "description": "If the person that is associated with the deal is hidden or not"
                  },
                  "first_won_time": {
                    "type": "string",
                    "description": "The date and time of the first time changing the deal status as won"
                  },
                  "products_count": {
                    "type": "integer",
                    "description": "The number of products associated with the deal"
                  },
                  "stage_order_nr": {
                    "type": "integer",
                    "description": "The order number of the deal stage associated with the deal"
                  },
                  "weighted_value": {
                    "type": "number",
                    "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                  },
                  "followers_count": {
                    "type": "integer",
                    "description": "The number of followers associated with the deal"
                  },
                  "formatted_value": {
                    "type": "string",
                    "description": "The deal value formatted with selected currency. E.g. US$500"
                  },
                  "activities_count": {
                    "type": "integer",
                    "description": "The number of activities associated with the deal"
                  },
                  "last_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the last activity associated with the deal"
                  },
                  "next_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the next activity associated with the deal"
                  },
                  "stage_change_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal stage"
                  },
                  "last_activity_date": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date of the last activity associated with the deal"
                  },
                  "next_activity_date": {
                    "type": "string",
                    "description": "The date of the next activity associated with the deal"
                  },
                  "next_activity_note": {
                    "type": "string",
                    "description": "The note of the next activity associated with the deal"
                  },
                  "next_activity_time": {
                    "type": "string",
                    "description": "The time of the next activity associated with the deal"
                  },
                  "next_activity_type": {
                    "type": "string",
                    "description": "The type of the next activity associated with the deal"
                  },
                  "participants_count": {
                    "type": "integer",
                    "description": "The number of participants associated with the deal"
                  },
                  "expected_close_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The expected close date of the deal"
                  },
                  "email_messages_count": {
                    "type": "integer",
                    "description": "The number of emails associated with the deal"
                  },
                  "done_activities_count": {
                    "type": "integer",
                    "description": "The number of completed activities associated with the deal"
                  },
                  "next_activity_subject": {
                    "type": "string",
                    "description": "The subject of the next activity associated with the deal"
                  },
                  "next_activity_duration": {
                    "type": "string",
                    "description": "The duration of the next activity associated with the deal"
                  },
                  "last_incoming_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last incoming email associated with the deal"
                  },
                  "last_outgoing_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last outgoing email associated with the deal"
                  },
                  "undone_activities_count": {
                    "type": "integer",
                    "description": "The number of incomplete activities associated with the deal"
                  },
                  "weighted_value_currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "formatted_weighted_value": {
                    "type": "string",
                    "description": "The weighted_value formatted with selected currency. E.g. US$500"
                  }
                }
              }
            ],
            "title": "dealNonStrict"
          },
          "description": "The array of deals"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "stage": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the stage"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the stage"
                },
                "add_time": {
                  "type": "string",
                  "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of the stage"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the stage is active or deleted"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline to add the stage to"
                },
                "rotten_days": {
                  "type": "integer",
                  "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
                },
                "rotten_flag": {
                  "type": "boolean",
                  "description": "Whether deals in this stage can become rotten"
                },
                "update_time": {
                  "type": "string",
                  "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "integer",
                  "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "pipeline": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the pipeline"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the pipeline"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether this pipeline will be made inactive (hidden) or active"
                },
                "add_time": {
                  "type": "string",
                  "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                },
                "url_title": {
                  "type": "string",
                  "description": "The pipeline title displayed in the URL"
                },
                "update_time": {
                  "type": "string",
                  "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "boolean",
                  "description": "Whether deal probability is disabled or enabled for this pipeline"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getAssociatedDealsResponse200"
}
object OrganizationsListFieldUpdatesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "description": "The date and time of the change"
              },
              "field_key": {
                "type": "string",
                "description": "The key of the field that was changed"
              },
              "new_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field after the change"
              },
              "old_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field before the change"
              },
              "actor_user_id": {
                "type": "integer",
                "description": "The ID of the user who made the change"
              },
              "change_source": {
                "type": "string",
                "nullable": true,
                "description": "The source of change, for example 'app', 'mobile', 'api', etc."
              },
              "is_bulk_update_flag": {
                "type": "boolean",
                "description": "Whether the change was made as part of a bulk update"
              },
              "change_source_user_agent": {
                "type": "string",
                "nullable": true,
                "description": "The user agent from which the change was made"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "next_cursor": {
              "type": "string",
              "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getChangelogResponse200"
}
object OrganizationsListFollowersResponse
{
  "type": "object",
  "title": "getAssociatedFollowersResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the follower"
              },
              "user_id": {
                "type": "integer",
                "description": "The user ID of the follower related to the item"
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time of adding the follower to the item"
              }
            }
          }
        ]
      },
      "description": "The array of followers"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "next_start": {
              "type": "integer",
              "description": "Next pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "Whether there are more list items in the collection than displayed"
            }
          },
          "description": "Pagination details of the list"
        }
      }
    }
  }
}
object OrganizationsListMailMessagesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message copies (object)"
                      },
                      "id": {
                        "type": "integer",
                        "description": "ID of the mail message."
                      },
                      "to": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message receiver (object)"
                      },
                      "bcc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message blind copies (object)"
                      },
                      "from": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message sender (object)"
                      },
                      "draft": {
                        "type": "string",
                        "description": "If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`."
                      },
                      "snippet": {
                        "type": "string",
                        "description": "The snippet of mail message. Snippet length is up to 225 characters."
                      },
                      "subject": {
                        "type": "string",
                        "description": "The subject of mail message"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "ID of the user whom mail message will be assigned to"
                      },
                      "add_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The insertion into the database time of the mail message"
                      },
                      "body_url": {
                        "type": "string",
                        "description": "The mail message body URL"
                      },
                      "read_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is read or not by the user"
                      },
                      "sent_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent or not"
                      },
                      "account_id": {
                        "type": "string",
                        "description": "The connection account ID"
                      },
                      "draft_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is a draft or not"
                      },
                      "synced_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is synced with the provider or not"
                      },
                      "update_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The updating time in the database of the mail message"
                      },
                      "deleted_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is deleted or not"
                      },
                      "message_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Creation or receival time of the mail message"
                      },
                      "has_body_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has a body or not"
                      },
                      "mail_thread_id": {
                        "type": "integer",
                        "description": "ID of the mail message thread"
                      },
                      "smart_bcc_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been created by Smart Email BCC feature or not"
                      },
                      "has_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment or not"
                      },
                      "mail_tracking_status": {
                        "enum": [
                          "opened",
                          "not opened"
                        ],
                        "type": "string",
                        "nullable": true,
                        "description": "The status of tracking mail message. Value is `null` if tracking is not enabled."
                      },
                      "sent_from_pipedrive_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent from Pipedrive app or not"
                      },
                      "has_real_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment (which is not inline) or not"
                      },
                      "has_inline_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an inline attachment or not"
                      },
                      "mail_link_tracking_enabled_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the link tracking in mail message body is enabled."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "nylas_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the sync provider"
                      },
                      "item_type": {
                        "type": "string",
                        "description": "The type of the data item"
                      },
                      "s3_bucket": {
                        "type": "string",
                        "description": "The name of the S3 bucket"
                      },
                      "timestamp": {
                        "type": "string",
                        "description": "The add date and time of the Mail Message"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company"
                      },
                      "template_id": {
                        "type": "integer",
                        "description": "The ID of the mail template"
                      },
                      "mua_message_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the mail user agent"
                      },
                      "s3_bucket_path": {
                        "type": "string",
                        "description": "The path of the S3 bucket"
                      },
                      "external_deleted_flag": {
                        "type": "boolean",
                        "description": "If the Mail Message has been deleted on the provider side or not"
                      }
                    }
                  }
                ],
                "title": "mailMessageItemForList"
              },
              "object": {
                "type": "string",
                "description": "The type of the data item"
              },
              "timestamp": {
                "type": "string",
                "description": "The date and time when the item was created"
              }
            }
          },
          "description": "The array of mail messages"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedMailMessagesResponse200"
}
object OrganizationsListPermittedUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "The list of permitted user IDs"
        }
      }
    }
  ],
  "title": "listPermittedUsersResponse200"
}
object OrganizationsListPersonsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the person"
                  },
                  "email": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "Email"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if email is primary for the person or not"
                        }
                      }
                    },
                    "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                  },
                  "label": {
                    "type": "integer",
                    "description": "The label assigned to the person"
                  },
                  "phone": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "The phone number"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if phone number is primary for the person or not"
                        }
                      }
                    },
                    "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email associated with the person"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the person"
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The ID of the company related to the person"
                  },
                  "first_char": {
                    "type": "string",
                    "description": "The first letter of the name of the person"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the owner associated with the person"
                  },
                  "picture_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the picture associated with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "item_id": {
                            "type": "integer",
                            "description": "The ID of related item"
                          },
                          "add_time": {
                            "type": "string",
                            "description": "The add time of the picture"
                          },
                          "pictures": {
                            "type": "object",
                            "properties": {
                              "128": {
                                "type": "string",
                                "description": "The URL of the 128*128 picture"
                              },
                              "512": {
                                "type": "string",
                                "description": "The URL of the 512*512 picture"
                              }
                            }
                          },
                          "item_type": {
                            "type": "string",
                            "description": "The type of item the picture is related to"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated picture is active or not"
                          },
                          "update_time": {
                            "type": "string",
                            "description": "The update time of the picture"
                          },
                          "added_by_user_id": {
                            "type": "integer",
                            "description": "The ID of the user who added the picture"
                          }
                        }
                      }
                    ]
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility group ID of who can see the person"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the person is active or not"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "org_id": {
                            "allOf": [
                              {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "description": "The name of the organization associated with the item"
                                      },
                                      "address": {
                                        "type": "string",
                                        "description": "The address of the organization"
                                      },
                                      "cc_email": {
                                        "type": "string",
                                        "description": "The BCC email of the organization associated with the item"
                                      },
                                      "owner_id": {
                                        "type": "integer",
                                        "description": "The ID of the owner of the organization that is associated with the item"
                                      },
                                      "people_count": {
                                        "type": "integer",
                                        "description": "The number of people connected with the organization that is associated with the item"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "integer",
                                        "description": "The ID of the organization"
                                      }
                                    }
                                  }
                                ],
                                "title": "relationshipOrganizationInfoItem"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the associated organization is active or not"
                                  }
                                }
                              }
                            ],
                            "title": "relationshipOrganizationInfoItemWithActiveFlag"
                          },
                          "owner_id": {
                            "allOf": [
                              {
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "The ID of the user"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the user"
                                  },
                                  "email": {
                                    "type": "string",
                                    "description": "The email of the user"
                                  },
                                  "has_pic": {
                                    "type": "integer",
                                    "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                  },
                                  "pic_hash": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The user picture hash"
                                  },
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the user is active or not"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "integer",
                                    "description": "The ID of the owner"
                                  }
                                }
                              }
                            ],
                            "title": "owner"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person"
                          },
                          "last_name": {
                            "type": "string",
                            "description": "The last name of the person"
                          },
                          "first_name": {
                            "type": "string",
                            "description": "The first name of the person"
                          }
                        }
                      }
                    ],
                    "title": "personNameInfoWithOrgAndOwnerId"
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "files_count": {
                                "type": "integer",
                                "description": "The count of files related to the person"
                              },
                              "notes_count": {
                                "type": "integer",
                                "description": "The count of notes related to the person"
                              },
                              "followers_count": {
                                "type": "integer",
                                "description": "The count of followers related to the person"
                              },
                              "activities_count": {
                                "type": "integer",
                                "description": "The count of activities related to the person"
                              },
                              "email_messages_count": {
                                "type": "integer",
                                "description": "The count of email messages related to the person"
                              },
                              "done_activities_count": {
                                "type": "integer",
                                "description": "The count of done activities related to the person"
                              },
                              "undone_activities_count": {
                                "type": "integer",
                                "description": "The count of undone activities related to the person"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_incoming_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last incoming email associated with the person"
                              },
                              "last_outgoing_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last outgoing email associated with the person"
                              }
                            }
                          }
                        ],
                        "title": "personCountAndEmailInfo"
                      },
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "won_deals_count": {
                                "type": "integer",
                                "description": "The count of won deals related with the item"
                              },
                              "lost_deals_count": {
                                "type": "integer",
                                "description": "The count of lost deals related with the item"
                              },
                              "open_deals_count": {
                                "type": "integer",
                                "description": "The count of open deals related with the item"
                              },
                              "closed_deals_count": {
                                "type": "integer",
                                "description": "The count of closed deals related with the item"
                              },
                              "related_won_deals_count": {
                                "type": "integer",
                                "description": "The count of related won deals related with the item"
                              },
                              "related_lost_deals_count": {
                                "type": "integer",
                                "description": "The count of related lost deals related with the item"
                              },
                              "related_open_deals_count": {
                                "type": "integer",
                                "description": "The count of related open deals related with the item"
                              },
                              "related_closed_deals_count": {
                                "type": "integer",
                                "description": "The count of related closed deals related with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the last activity associated with the deal"
                              },
                              "next_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the next activity associated with the deal"
                              },
                              "last_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the last activity associated with the deal"
                              },
                              "next_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the next activity associated with the deal"
                              },
                              "next_activity_time": {
                                "type": "string",
                                "nullable": true,
                                "description": "The time of the next activity associated with the deal"
                              }
                            }
                          }
                        ],
                        "title": "dealCountAndActivityInfo"
                      }
                    ],
                    "title": "personCountEmailDealAndActivityInfo"
                  }
                ],
                "title": "additionalPersonInfo"
              }
            ],
            "title": "personItem"
          },
          "description": "The array of persons"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "listPersonsResponse200"
}
object OrganizationsListUpdatesAboutResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "description": "The data related to the update"
              },
              "object": {
                "type": "string",
                "description": "The type of the person update. (Possible object types - organizationChange, dealChange, file, activity)"
              },
              "timestamp": {
                "type": "string",
                "description": "The creation date and time of the update"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getAssociatedUpdatesResponse200"
}
object OrganizationsMergeTwoRequest
{
  "type": "object",
  "title": "mergeOrganizationsRequest",
  "required": [
    "merge_with_id"
  ],
  "properties": {
    "merge_with_id": {
      "type": "integer",
      "description": "The ID of the organization that the organization will be merged with"
    }
  }
}
object OrganizationsMergeTwoResponse
{
  "type": "object",
  "title": "mergeOrganizationsResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the merged organization"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object OrganizationsSearchByCriteriaResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the organization"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the organization"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the item"
                      },
                      "notes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of notes"
                      },
                      "owner": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the owner of the deal"
                          }
                        }
                      },
                      "address": {
                        "type": "string",
                        "description": "The address of the organization"
                      },
                      "visible_to": {
                        "type": "integer",
                        "description": "The visibility of the organization"
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Custom fields"
                      }
                    }
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of found items"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchOrganizationResponse200"
}
object OrganizationsUpdatePropertiesRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the organization"
        }
      }
    },
    {
      "type": "object",
      "title": "basicOrganization",
      "properties": {
        "label": {
          "type": "integer",
          "description": "The ID of the label."
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this organization. When omitted, the authorized user ID will be used."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the organization. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        }
      }
    }
  ],
  "title": "updateOrganizationRequest"
}
object OrganizationsUpdatePropertiesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the organization"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the organization"
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the organization"
                },
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the organization"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the organization"
                },
                "owner_id": {
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the owner"
                        }
                      }
                    }
                  ],
                  "title": "owner"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the organization"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first character of the organization name"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the organization owner"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the organization"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the organization is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the organization"
                },
                "country_code": {
                  "type": "string",
                  "nullable": true,
                  "description": "The country code of the organization"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "files_count": {
                          "type": "integer",
                          "description": "The count of files related to the organization"
                        },
                        "notes_count": {
                          "type": "integer",
                          "description": "The count of notes related to the organization"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The count of persons related to the organization"
                        },
                        "followers_count": {
                          "type": "integer",
                          "description": "The count of followers related to the organization"
                        },
                        "activities_count": {
                          "type": "integer",
                          "description": "The count of activities related to the organization"
                        },
                        "email_messages_count": {
                          "type": "integer",
                          "description": "The count of email messages related to the organization"
                        },
                        "done_activities_count": {
                          "type": "integer",
                          "description": "The count of done activities related to the organization"
                        },
                        "undone_activities_count": {
                          "type": "integer",
                          "description": "The count of undone activities related to the organization"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "description": "The full address of the organization"
                        },
                        "address_route": {
                          "type": "string",
                          "description": "The route of the organization location"
                        },
                        "address_country": {
                          "type": "string",
                          "description": "The country of the organization location"
                        },
                        "address_locality": {
                          "type": "string",
                          "description": "The locality of the organization location"
                        },
                        "address_subpremise": {
                          "type": "string",
                          "description": "The sub-premise of the organization location"
                        },
                        "address_postal_code": {
                          "type": "string",
                          "description": "The postal code of the organization location"
                        },
                        "address_sublocality": {
                          "type": "string",
                          "description": "The sub-locality of the organization location"
                        },
                        "address_street_number": {
                          "type": "string",
                          "description": "The street number of the organization location"
                        },
                        "address_formatted_address": {
                          "type": "string",
                          "description": "The formatted organization location"
                        },
                        "address_admin_area_level_1": {
                          "type": "string",
                          "description": "The level 1 admin area of the organization location"
                        },
                        "address_admin_area_level_2": {
                          "type": "string",
                          "description": "The level 2 admin area of the organization location"
                        }
                      }
                    }
                  ],
                  "title": "organizationCountAndAddressInfo"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "won_deals_count": {
                          "type": "integer",
                          "description": "The count of won deals related with the item"
                        },
                        "lost_deals_count": {
                          "type": "integer",
                          "description": "The count of lost deals related with the item"
                        },
                        "open_deals_count": {
                          "type": "integer",
                          "description": "The count of open deals related with the item"
                        },
                        "closed_deals_count": {
                          "type": "integer",
                          "description": "The count of closed deals related with the item"
                        },
                        "related_won_deals_count": {
                          "type": "integer",
                          "description": "The count of related won deals related with the item"
                        },
                        "related_lost_deals_count": {
                          "type": "integer",
                          "description": "The count of related lost deals related with the item"
                        },
                        "related_open_deals_count": {
                          "type": "integer",
                          "description": "The count of related open deals related with the item"
                        },
                        "related_closed_deals_count": {
                          "type": "integer",
                          "description": "The count of related closed deals related with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "last_activity_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The ID of the last activity associated with the deal"
                        },
                        "next_activity_id": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The ID of the next activity associated with the deal"
                        },
                        "last_activity_date": {
                          "type": "string",
                          "nullable": true,
                          "description": "The date of the last activity associated with the deal"
                        },
                        "next_activity_date": {
                          "type": "string",
                          "nullable": true,
                          "description": "The date of the next activity associated with the deal"
                        },
                        "next_activity_time": {
                          "type": "string",
                          "nullable": true,
                          "description": "The time of the next activity associated with the deal"
                        }
                      }
                    }
                  ],
                  "title": "dealsCountAndActivityInfo"
                }
              ],
              "title": "additionalBaseOrganizationItemInfo"
            }
          ],
          "title": "baseOrganizationItem"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "updateOrganizationResponse200"
}
object PermissionSetsGetAllResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of user permission set"
              },
              "app": {
                "enum": [
                  "sales",
                  "projects",
                  "campaigns",
                  "global",
                  "account_settings"
                ],
                "type": "string",
                "description": "The app that permission set belongs to"
              },
              "name": {
                "type": "string",
                "description": "The name of the permission set"
              },
              "type": {
                "enum": [
                  "admin",
                  "manager",
                  "regular",
                  "custom"
                ],
                "type": "string",
                "description": "The type of permission set"
              },
              "description": {
                "type": "string",
                "description": "The description of the permission set"
              },
              "assignment_count": {
                "type": "integer",
                "description": "The number of users assigned to this permission set"
              }
            }
          },
          "description": "The array of permission set"
        }
      }
    }
  ],
  "title": "getPermissionSetsResponse200"
}
object PermissionSetsGetOne404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object PermissionSetsGetOneResponse
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of user permission set"
        },
        "app": {
          "enum": [
            "sales",
            "projects",
            "campaigns",
            "global",
            "account_settings"
          ],
          "type": "string",
          "description": "The app that permission set belongs to"
        },
        "name": {
          "type": "string",
          "description": "The name of the permission set"
        },
        "type": {
          "enum": [
            "admin",
            "manager",
            "regular",
            "custom"
          ],
          "type": "string",
          "description": "The type of permission set"
        },
        "description": {
          "type": "string",
          "description": "The description of the permission set"
        },
        "assignment_count": {
          "type": "integer",
          "description": "The number of users assigned to this permission set"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "contents": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A permission assigned to this permission set"
        }
      }
    }
  ],
  "title": "singlePermissionSetResponse200"
}
object PermissionSetsListAssignments404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object PermissionSetsListAssignmentsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the permission set"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user in the permission set"
              },
              "permission_set_id": {
                "type": "string",
                "description": "The ID of the permission set"
              }
            }
          },
          "description": "An array of the assignments of the user"
        }
      }
    }
  ],
  "title": "userAssignmentsToPermissionSetResponse200"
}
object PersonFieldsAddNewFieldRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. Example: `[{\"label\":\"New Item\"}]`"
        },
        "add_visible_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether the field is available in the 'add new' modal or not (both in the web and mobile app)"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "field_type"
      ],
      "properties": {
        "field_type": {
          "enum": [
            "address",
            "date",
            "daterange",
            "double",
            "enum",
            "monetary",
            "org",
            "people",
            "phone",
            "set",
            "text",
            "time",
            "timerange",
            "user",
            "varchar",
            "varchar_auto",
            "visible_to"
          ],
          "type": "string",
          "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
        }
      }
    }
  ],
  "title": "createFieldRequest"
}
object PersonFieldsAddNewFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object PersonFieldsDeleteMultipleBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The list of deleted field IDs"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldsResponse200"
}
object PersonFieldsGetAllFieldsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the field. Value is `null` in case of subfields."
              },
              "key": {
                "type": "string",
                "description": "The key of the field. For custom fields this is generated upon creation."
              },
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "nullable": true,
                "description": "The options of the field. When there are no options, `null` is returned."
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the field"
              },
              "order_nr": {
                "type": "integer",
                "description": "The order number of the field"
              },
              "edit_flag": {
                "type": "boolean",
                "description": "The edit flag of the field"
              },
              "subfields": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The subfields of the field. Only present when the field has subfields."
              },
              "field_type": {
                "allOf": [
                  {
                    "enum": [
                      "address",
                      "date",
                      "daterange",
                      "double",
                      "enum",
                      "monetary",
                      "org",
                      "people",
                      "phone",
                      "set",
                      "text",
                      "time",
                      "timerange",
                      "user",
                      "varchar",
                      "varchar_auto",
                      "visible_to"
                    ],
                    "type": "string",
                    "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                  }
                ]
              },
              "active_flag": {
                "type": "boolean",
                "description": "The active flag of the field"
              },
              "is_subfield": {
                "type": "boolean",
                "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the field"
              },
              "sortable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be sorted by this field"
              },
              "important_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the field is mandatory"
              },
              "options_deleted": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
              },
              "searchable_flag": {
                "type": "boolean",
                "description": "Whether or not items can be searched by this field"
              },
              "add_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Whether or not the field of an item can be edited in bulk"
              },
              "filtering_allowed": {
                "type": "boolean",
                "description": "Whether or not items can be filtered by this field"
              },
              "index_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "details_visible_flag": {
                "type": "boolean",
                "description": "Not used"
              },
              "last_updated_by_user_id": {
                "type": "integer",
                "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "fieldsResponse200"
}
object PersonFieldsGetSpecificFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object PersonFieldsMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field that was deleted"
            }
          }
        }
      }
    }
  ],
  "title": "deleteFieldResponse200"
}
object PersonFieldsUpdateFieldRequest
{
  "type": "object",
  "title": "updateFieldRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the field"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: `[{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}]`"
    },
    "add_visible_flag": {
      "type": "boolean",
      "default": true,
      "description": "Whether the field is available in 'add new' modal or not (both in web and mobile app)"
    }
  }
}
object PersonFieldsUpdateFieldResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the field. Value is `null` in case of subfields."
            },
            "key": {
              "type": "string",
              "description": "The key of the field. For custom fields this is generated upon creation."
            },
            "name": {
              "type": "string",
              "description": "The name of the field"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "nullable": true,
              "description": "The options of the field. When there are no options, `null` is returned."
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the field"
            },
            "order_nr": {
              "type": "integer",
              "description": "The order number of the field"
            },
            "edit_flag": {
              "type": "boolean",
              "description": "The edit flag of the field"
            },
            "subfields": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The subfields of the field. Only present when the field has subfields."
            },
            "field_type": {
              "allOf": [
                {
                  "enum": [
                    "address",
                    "date",
                    "daterange",
                    "double",
                    "enum",
                    "monetary",
                    "org",
                    "people",
                    "phone",
                    "set",
                    "text",
                    "time",
                    "timerange",
                    "user",
                    "varchar",
                    "varchar_auto",
                    "visible_to"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`address`</td><td>Address field (has multiple subfields, autocompleted by Google Maps)</td></tr><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td></tr><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td></tr><tr><td>`double`</td><td>Numeric value</td></tr><tr><td>`enum`</td><td>Options field with a single possible chosen option</td></tr><tr></tr><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td></tr><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td></tr><tr><td>`people`</td><td>Person field (contains a person ID which is stored on the same account)</td></tr><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td></tr><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td></tr><tr><td>`text`</td><td>Long text (up to 65k characters)</td></tr><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td></tr><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td></tr><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td></tr><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td></tr><tr><td>`visible_to`</td><td>System field that keeps item's visibility setting</td></tr></table>"
                }
              ]
            },
            "active_flag": {
              "type": "boolean",
              "description": "The active flag of the field"
            },
            "is_subfield": {
              "type": "boolean",
              "description": "Whether or not the field is a subfield of another field. Only present if field is subfield."
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the field"
            },
            "sortable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be sorted by this field"
            },
            "important_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "mandatory_flag": {
              "type": "boolean",
              "description": "Whether or not the field is mandatory"
            },
            "options_deleted": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "The deleted options of the field. Only present when there is at least 1 deleted option."
            },
            "searchable_flag": {
              "type": "boolean",
              "description": "Whether or not items can be searched by this field"
            },
            "add_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "bulk_edit_allowed": {
              "type": "boolean",
              "description": "Whether or not the field of an item can be edited in bulk"
            },
            "filtering_allowed": {
              "type": "boolean",
              "description": "Whether or not items can be filtered by this field"
            },
            "index_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "details_visible_flag": {
              "type": "boolean",
              "description": "Not used"
            },
            "last_updated_by_user_id": {
              "type": "integer",
              "description": "The ID of the user who created or most recently updated the field, only applicable for custom fields"
            }
          }
        }
      }
    }
  ],
  "title": "fieldResponse200"
}
object PersonsAddFollowerRequest
{
  "type": "object",
  "title": "addPersonFollowerRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object PersonsAddFollowerResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the follower"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who was added as a follower to a person"
            },
            "add_time": {
              "type": "string",
              "description": "The date and time when the follower was added to a person. Format: YYYY-MM-DD HH:MM:SS"
            },
            "person_id": {
              "type": "integer",
              "description": "The ID of the person to whom the follower was added"
            }
          }
        }
      }
    }
  ],
  "title": "addPersonFollowerResponse200"
}
object PersonsAddPictureRequest
{
  "type": "object",
  "title": "addPersonPictureRequest",
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "One image supplied in the multipart/form-data encoding"
    },
    "crop_x": {
      "type": "integer",
      "description": "X coordinate to where start cropping form (in pixels)"
    },
    "crop_y": {
      "type": "integer",
      "description": "Y coordinate to where start cropping form (in pixels)"
    },
    "crop_width": {
      "type": "integer",
      "description": "The width of the cropping area (in pixels)"
    },
    "crop_height": {
      "type": "integer",
      "description": "The height of the cropping area (in pixels)"
    }
  }
}
object PersonsAddPictureResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "PICTURE_ID": {
              "type": "object",
              "allOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                }
              ],
              "description": "The ID of the picture"
            }
          },
          "description": "The picture that is associated with the item"
        }
      }
    }
  ],
  "title": "addPersonPictureResponse200"
}
object PersonsCreateNewPersonRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the person"
        }
      }
    },
    {
      "type": "object",
      "title": "basicPersonRequest",
      "properties": {
        "email": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
              },
              "value": {
                "type": "string",
                "description": "The email"
              },
              "primary": {
                "type": "boolean",
                "description": "Boolean that indicates if email is primary for the person or not"
              }
            }
          },
          "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required."
        },
        "label": {
          "type": "integer",
          "description": "The ID of the label."
        },
        "phone": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
              },
              "value": {
                "type": "string",
                "description": "The phone number"
              },
              "primary": {
                "type": "boolean",
                "description": "Boolean that indicates if phone number is primary for the person or not"
              }
            }
          },
          "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization this person will belong to"
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the person. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "marketing_status": {
          "allOf": [
            {
              "enum": [
                "no_consent",
                "unsubscribed",
                "subscribed",
                "archived"
              ],
              "type": "string"
            }
          ],
          "description": "If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>"
        }
      }
    }
  ],
  "title": "addPersonRequest"
}
object PersonsCreateNewPersonResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the person"
                },
                "email": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "Email"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if email is primary for the person or not"
                      }
                    }
                  },
                  "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the person"
                },
                "phone": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "The phone number"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if phone number is primary for the person or not"
                      }
                    }
                  },
                  "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the person"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the person"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the person"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first letter of the name of the person"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the owner associated with the person"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the person"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the person is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The name of the organization associated with the item"
                                    },
                                    "address": {
                                      "type": "string",
                                      "description": "The address of the organization"
                                    },
                                    "cc_email": {
                                      "type": "string",
                                      "description": "The BCC email of the organization associated with the item"
                                    },
                                    "owner_id": {
                                      "type": "integer",
                                      "description": "The ID of the owner of the organization that is associated with the item"
                                    },
                                    "people_count": {
                                      "type": "integer",
                                      "description": "The number of people connected with the organization that is associated with the item"
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "description": "The ID of the organization"
                                    }
                                  }
                                }
                              ],
                              "title": "relationshipOrganizationInfoItem"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the associated organization is active or not"
                                }
                              }
                            }
                          ],
                          "title": "relationshipOrganizationInfoItemWithActiveFlag"
                        },
                        "owner_id": {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "The ID of the user"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the user"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The email of the user"
                                },
                                "has_pic": {
                                  "type": "integer",
                                  "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                },
                                "pic_hash": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The user picture hash"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the user is active or not"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the owner"
                                }
                              }
                            }
                          ],
                          "title": "owner"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the person"
                        },
                        "last_name": {
                          "type": "string",
                          "description": "The last name of the person"
                        },
                        "first_name": {
                          "type": "string",
                          "description": "The first name of the person"
                        }
                      }
                    }
                  ],
                  "title": "personNameInfoWithOrgAndOwnerId"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "files_count": {
                              "type": "integer",
                              "description": "The count of files related to the person"
                            },
                            "notes_count": {
                              "type": "integer",
                              "description": "The count of notes related to the person"
                            },
                            "followers_count": {
                              "type": "integer",
                              "description": "The count of followers related to the person"
                            },
                            "activities_count": {
                              "type": "integer",
                              "description": "The count of activities related to the person"
                            },
                            "email_messages_count": {
                              "type": "integer",
                              "description": "The count of email messages related to the person"
                            },
                            "done_activities_count": {
                              "type": "integer",
                              "description": "The count of done activities related to the person"
                            },
                            "undone_activities_count": {
                              "type": "integer",
                              "description": "The count of undone activities related to the person"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_incoming_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last incoming email associated with the person"
                            },
                            "last_outgoing_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last outgoing email associated with the person"
                            }
                          }
                        }
                      ],
                      "title": "personCountAndEmailInfo"
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealCountAndActivityInfo"
                    }
                  ],
                  "title": "personCountEmailDealAndActivityInfo"
                }
              ],
              "title": "additionalPersonInfo"
            }
          ],
          "title": "personItem"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "addPersonResponse200"
}
object PersonsDeleteFollowerResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted person"
            }
          }
        }
      }
    }
  ],
  "title": "deletePersonResponse200"
}
object PersonsDeleteMultipleBulkResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The list of deleted persons IDs"
            }
          }
        }
      }
    }
  ],
  "title": "deletePersonsResponse200"
}
object PersonsDeletePictureResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted person"
            }
          }
        }
      }
    }
  ],
  "title": "deletePersonResponse200"
}
object PersonsGetAll403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object PersonsGetAllResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "personsCollectionResponseObject",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the person"
          },
          "name": {
            "type": "string",
            "description": "The name of the person"
          },
          "email": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                },
                "value": {
                  "type": "string",
                  "description": "The email"
                },
                "primary": {
                  "type": "boolean",
                  "description": "Boolean that indicates if email is primary for the person or not"
                }
              }
            },
            "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required."
          },
          "label": {
            "type": "integer",
            "nullable": true,
            "description": "The label assigned to the person"
          },
          "phone": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                },
                "value": {
                  "type": "string",
                  "description": "The phone number"
                },
                "primary": {
                  "type": "boolean",
                  "description": "Boolean that indicates if phone number is primary for the person or not"
                }
              }
            },
            "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
          },
          "org_id": {
            "type": "integer",
            "description": "The ID of the organization related to the person"
          },
          "add_time": {
            "type": "string",
            "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
          },
          "cc_email": {
            "type": "string",
            "description": "The BCC email associated with the person"
          },
          "owner_id": {
            "type": "integer",
            "description": "The ID of the owner related to the person"
          },
          "picture_id": {
            "type": "integer",
            "nullable": true,
            "description": "The ID of the picture associated with the item"
          },
          "visible_to": {
            "type": "string",
            "description": "The visibility group ID of who can see the person"
          },
          "active_flag": {
            "type": "boolean",
            "description": "Whether the person is active or not"
          },
          "delete_time": {
            "type": "string",
            "nullable": true,
            "description": "The date and time this person was deleted. Format: YYYY-MM-DD HH:MM:SS"
          },
          "update_time": {
            "type": "string",
            "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object PersonsGetPersonDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the person"
                },
                "email": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "Email"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if email is primary for the person or not"
                      }
                    }
                  },
                  "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the person"
                },
                "phone": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "The phone number"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if phone number is primary for the person or not"
                      }
                    }
                  },
                  "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the person"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the person"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the person"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first letter of the name of the person"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the owner associated with the person"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the person"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the person is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The name of the organization associated with the item"
                                    },
                                    "address": {
                                      "type": "string",
                                      "description": "The address of the organization"
                                    },
                                    "cc_email": {
                                      "type": "string",
                                      "description": "The BCC email of the organization associated with the item"
                                    },
                                    "owner_id": {
                                      "type": "integer",
                                      "description": "The ID of the owner of the organization that is associated with the item"
                                    },
                                    "people_count": {
                                      "type": "integer",
                                      "description": "The number of people connected with the organization that is associated with the item"
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "description": "The ID of the organization"
                                    }
                                  }
                                }
                              ],
                              "title": "relationshipOrganizationInfoItem"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the associated organization is active or not"
                                }
                              }
                            }
                          ],
                          "title": "relationshipOrganizationInfoItemWithActiveFlag"
                        },
                        "owner_id": {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "The ID of the user"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the user"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The email of the user"
                                },
                                "has_pic": {
                                  "type": "integer",
                                  "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                },
                                "pic_hash": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The user picture hash"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the user is active or not"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the owner"
                                }
                              }
                            }
                          ],
                          "title": "owner"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the person"
                        },
                        "last_name": {
                          "type": "string",
                          "description": "The last name of the person"
                        },
                        "first_name": {
                          "type": "string",
                          "description": "The first name of the person"
                        }
                      }
                    }
                  ],
                  "title": "personNameInfoWithOrgAndOwnerId"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "files_count": {
                              "type": "integer",
                              "description": "The count of files related to the person"
                            },
                            "notes_count": {
                              "type": "integer",
                              "description": "The count of notes related to the person"
                            },
                            "followers_count": {
                              "type": "integer",
                              "description": "The count of followers related to the person"
                            },
                            "activities_count": {
                              "type": "integer",
                              "description": "The count of activities related to the person"
                            },
                            "email_messages_count": {
                              "type": "integer",
                              "description": "The count of email messages related to the person"
                            },
                            "done_activities_count": {
                              "type": "integer",
                              "description": "The count of done activities related to the person"
                            },
                            "undone_activities_count": {
                              "type": "integer",
                              "description": "The count of undone activities related to the person"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_incoming_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last incoming email associated with the person"
                            },
                            "last_outgoing_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last outgoing email associated with the person"
                            }
                          }
                        }
                      ],
                      "title": "personCountAndEmailInfo"
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealCountAndActivityInfo"
                    }
                  ],
                  "title": "personCountEmailDealAndActivityInfo"
                }
              ],
              "title": "additionalPersonInfo"
            }
          ],
          "title": "personItem"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "dropbox_email": {
              "type": "string",
              "description": "Dropbox email for the person"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getPersonResponse200"
}
object PersonsListActivitiesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization this activity is associated with"
                  },
                  "deal_id": {
                    "type": "integer",
                    "description": "The ID of the deal this activity is associated with"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "The ID of the lead in the UUID format this activity is associated with"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The due date of the activity. Format: YYYY-MM-DD"
                  },
                  "due_time": {
                    "type": "string",
                    "description": "The due time of the activity in UTC. Format: HH:MM"
                  },
                  "duration": {
                    "type": "string",
                    "description": "The duration of the activity. Format: HH:MM"
                  },
                  "location": {
                    "type": "string",
                    "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person this activity is associated with"
                  },
                  "project_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the project this activity is associated with"
                  },
                  "public_description": {
                    "type": "string",
                    "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the activity, generated when the activity was created"
                  },
                  "done": {
                    "type": "boolean",
                    "description": "Whether the activity is done or not"
                  },
                  "file": {
                    "type": "object",
                    "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
                  },
                  "note": {
                    "type": "string",
                    "description": "The note of the activity (HTML format)"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
                  },
                  "series": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject of the activity"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user whom the activity is assigned to"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization this activity is associated with"
                  },
                  "rec_rule": {
                    "type": "string",
                    "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
                  },
                  "busy_flag": {
                    "type": "boolean",
                    "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The user's company ID"
                  },
                  "deal_title": {
                    "type": "string",
                    "description": "The name of the deal this activity is associated with"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the user this activity is owned by"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the activity is active or not"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person this activity is associated with"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "participants": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "nullable": true,
                    "description": "List of multiple persons (participants) this activity is associated with"
                  },
                  "reference_id": {
                    "type": "integer",
                    "description": "Together with the `reference_type`, gives the ID of the other object"
                  },
                  "gcal_event_id": {
                    "type": "string",
                    "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_route": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates street name."
                  },
                  "reference_type": {
                    "type": "string",
                    "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
                  },
                  "update_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who was the last to update this activity"
                  },
                  "source_timezone": {
                    "type": "string",
                    "description": "The timezone the activity was created in an external calendar"
                  },
                  "deal_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the deal"
                  },
                  "location_country": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates country."
                  },
                  "location_locality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates city/town/village/locality."
                  },
                  "created_by_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who created the activity"
                  },
                  "google_calendar_id": {
                    "type": "string",
                    "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "person_dropbox_bcc": {
                    "type": "string",
                    "description": "The BCC email address of the person"
                  },
                  "rec_rule_extension": {
                    "type": "string",
                    "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
                  },
                  "assigned_to_user_id": {
                    "type": "integer",
                    "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
                  },
                  "location_subpremise": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates apartment/suite number."
                  },
                  "marked_as_done_time": {
                    "type": "string",
                    "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "google_calendar_etag": {
                    "type": "string",
                    "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
                  },
                  "location_postal_code": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates ZIP/postal code."
                  },
                  "location_sublocality": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates district/sublocality."
                  },
                  "conference_meeting_id": {
                    "type": "string",
                    "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
                  },
                  "conference_meeting_url": {
                    "type": "string",
                    "description": "The link to join the meeting which is associated with this activity"
                  },
                  "last_notification_time": {
                    "type": "string",
                    "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
                  },
                  "location_street_number": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates house number."
                  },
                  "rec_master_activity_id": {
                    "type": "integer",
                    "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
                  },
                  "notification_language_id": {
                    "type": "integer",
                    "description": "The ID of the language the notifications are sent in"
                  },
                  "conference_meeting_client": {
                    "type": "string",
                    "description": "The ID of the Marketplace app, which is connected to this activity"
                  },
                  "last_notification_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
                  },
                  "location_formatted_address": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates full/combined address."
                  },
                  "location_admin_area_level_1": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates state/county."
                  },
                  "location_admin_area_level_2": {
                    "type": "string",
                    "description": "A subfield of the location field. Indicates region."
                  },
                  "calendar_sync_include_context": {
                    "type": "string",
                    "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
                  }
                }
              }
            ],
            "title": "activityResponseObject"
          },
          "description": "The array of activities"
        },
        "additional_data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "activity_distribution": {
                  "type": "object",
                  "properties": {
                    "ASSIGNED_TO_USER_ID": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "share": {
                          "type": "integer",
                          "description": "The percentage of activities belongs to the user"
                        },
                        "activities": {
                          "type": "object",
                          "properties": {
                            "ACTIVITY_TYPE_NAME": {
                              "type": "integer",
                              "description": "The count of activities related to a specific type"
                            }
                          },
                          "description": "The count of activities related to the user grouped by activity type"
                        },
                        "activity_count": {
                          "type": "integer",
                          "description": "The overall count of activities for the user"
                        }
                      },
                      "description": "The ID of the user"
                    }
                  },
                  "description": "The distribution of activities related to the organization grouped by the user ID"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "If there are more list items in the collection than displayed or not"
                }
              },
              "description": "The additional data of the list"
            }
          ],
          "title": "activityDistributionDataWithAdditionalData"
        }
      }
    }
  ],
  "title": "getAssociatedActivitiesResponse200"
}
object PersonsListAllPersonsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the person"
                  },
                  "email": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "Email"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if email is primary for the person or not"
                        }
                      }
                    },
                    "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                  },
                  "label": {
                    "type": "integer",
                    "description": "The label assigned to the person"
                  },
                  "phone": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                        },
                        "value": {
                          "type": "string",
                          "description": "The phone number"
                        },
                        "primary": {
                          "type": "boolean",
                          "description": "Boolean that indicates if phone number is primary for the person or not"
                        }
                      }
                    },
                    "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email associated with the person"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the person"
                  },
                  "company_id": {
                    "type": "integer",
                    "description": "The ID of the company related to the person"
                  },
                  "first_char": {
                    "type": "string",
                    "description": "The first letter of the name of the person"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the owner associated with the person"
                  },
                  "picture_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the picture associated with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "item_id": {
                            "type": "integer",
                            "description": "The ID of related item"
                          },
                          "add_time": {
                            "type": "string",
                            "description": "The add time of the picture"
                          },
                          "pictures": {
                            "type": "object",
                            "properties": {
                              "128": {
                                "type": "string",
                                "description": "The URL of the 128*128 picture"
                              },
                              "512": {
                                "type": "string",
                                "description": "The URL of the 512*512 picture"
                              }
                            }
                          },
                          "item_type": {
                            "type": "string",
                            "description": "The type of item the picture is related to"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated picture is active or not"
                          },
                          "update_time": {
                            "type": "string",
                            "description": "The update time of the picture"
                          },
                          "added_by_user_id": {
                            "type": "integer",
                            "description": "The ID of the user who added the picture"
                          }
                        }
                      }
                    ]
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility group ID of who can see the person"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the person is active or not"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                  }
                }
              },
              {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "org_id": {
                            "allOf": [
                              {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "description": "The name of the organization associated with the item"
                                      },
                                      "address": {
                                        "type": "string",
                                        "description": "The address of the organization"
                                      },
                                      "cc_email": {
                                        "type": "string",
                                        "description": "The BCC email of the organization associated with the item"
                                      },
                                      "owner_id": {
                                        "type": "integer",
                                        "description": "The ID of the owner of the organization that is associated with the item"
                                      },
                                      "people_count": {
                                        "type": "integer",
                                        "description": "The number of people connected with the organization that is associated with the item"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "integer",
                                        "description": "The ID of the organization"
                                      }
                                    }
                                  }
                                ],
                                "title": "relationshipOrganizationInfoItem"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the associated organization is active or not"
                                  }
                                }
                              }
                            ],
                            "title": "relationshipOrganizationInfoItemWithActiveFlag"
                          },
                          "owner_id": {
                            "allOf": [
                              {
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "The ID of the user"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the user"
                                  },
                                  "email": {
                                    "type": "string",
                                    "description": "The email of the user"
                                  },
                                  "has_pic": {
                                    "type": "integer",
                                    "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                  },
                                  "pic_hash": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The user picture hash"
                                  },
                                  "active_flag": {
                                    "type": "boolean",
                                    "description": "Whether the user is active or not"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "integer",
                                    "description": "The ID of the owner"
                                  }
                                }
                              }
                            ],
                            "title": "owner"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person"
                          },
                          "last_name": {
                            "type": "string",
                            "description": "The last name of the person"
                          },
                          "first_name": {
                            "type": "string",
                            "description": "The first name of the person"
                          }
                        }
                      }
                    ],
                    "title": "personNameInfoWithOrgAndOwnerId"
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "files_count": {
                                "type": "integer",
                                "description": "The count of files related to the person"
                              },
                              "notes_count": {
                                "type": "integer",
                                "description": "The count of notes related to the person"
                              },
                              "followers_count": {
                                "type": "integer",
                                "description": "The count of followers related to the person"
                              },
                              "activities_count": {
                                "type": "integer",
                                "description": "The count of activities related to the person"
                              },
                              "email_messages_count": {
                                "type": "integer",
                                "description": "The count of email messages related to the person"
                              },
                              "done_activities_count": {
                                "type": "integer",
                                "description": "The count of done activities related to the person"
                              },
                              "undone_activities_count": {
                                "type": "integer",
                                "description": "The count of undone activities related to the person"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_incoming_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last incoming email associated with the person"
                              },
                              "last_outgoing_mail_time": {
                                "type": "string",
                                "description": "The date and time of the last outgoing email associated with the person"
                              }
                            }
                          }
                        ],
                        "title": "personCountAndEmailInfo"
                      },
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "won_deals_count": {
                                "type": "integer",
                                "description": "The count of won deals related with the item"
                              },
                              "lost_deals_count": {
                                "type": "integer",
                                "description": "The count of lost deals related with the item"
                              },
                              "open_deals_count": {
                                "type": "integer",
                                "description": "The count of open deals related with the item"
                              },
                              "closed_deals_count": {
                                "type": "integer",
                                "description": "The count of closed deals related with the item"
                              },
                              "related_won_deals_count": {
                                "type": "integer",
                                "description": "The count of related won deals related with the item"
                              },
                              "related_lost_deals_count": {
                                "type": "integer",
                                "description": "The count of related lost deals related with the item"
                              },
                              "related_open_deals_count": {
                                "type": "integer",
                                "description": "The count of related open deals related with the item"
                              },
                              "related_closed_deals_count": {
                                "type": "integer",
                                "description": "The count of related closed deals related with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the last activity associated with the deal"
                              },
                              "next_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the next activity associated with the deal"
                              },
                              "last_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the last activity associated with the deal"
                              },
                              "next_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the next activity associated with the deal"
                              },
                              "next_activity_time": {
                                "type": "string",
                                "nullable": true,
                                "description": "The time of the next activity associated with the deal"
                              }
                            }
                          }
                        ],
                        "title": "dealCountAndActivityInfo"
                      }
                    ],
                    "title": "personCountEmailDealAndActivityInfo"
                  }
                ],
                "title": "additionalPersonInfo"
              }
            ],
            "title": "personItem"
          },
          "description": "The array of persons"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "picture": {
              "type": "object",
              "properties": {
                "PICTURE_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the picture associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "item_id": {
                              "type": "integer",
                              "description": "The ID of related item"
                            },
                            "add_time": {
                              "type": "string",
                              "description": "The add time of the picture"
                            },
                            "pictures": {
                              "type": "object",
                              "properties": {
                                "128": {
                                  "type": "string",
                                  "description": "The URL of the 128*128 picture"
                                },
                                "512": {
                                  "type": "string",
                                  "description": "The URL of the 512*512 picture"
                                }
                              }
                            },
                            "item_type": {
                              "type": "string",
                              "description": "The type of item the picture is related to"
                            },
                            "active_flag": {
                              "type": "boolean",
                              "description": "Whether the associated picture is active or not"
                            },
                            "update_time": {
                              "type": "string",
                              "description": "The update time of the picture"
                            },
                            "added_by_user_id": {
                              "type": "integer",
                              "description": "The ID of the user who added the picture"
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "description": "The ID of the picture"
                }
              },
              "description": "The picture that is associated with the item"
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getPersonsResponse200"
}
object PersonsListChangelogResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "description": "The date and time of the change"
              },
              "field_key": {
                "type": "string",
                "description": "The key of the field that was changed"
              },
              "new_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field after the change"
              },
              "old_value": {
                "type": "string",
                "nullable": true,
                "description": "The value of the field before the change"
              },
              "actor_user_id": {
                "type": "integer",
                "description": "The ID of the user who made the change"
              },
              "change_source": {
                "type": "string",
                "nullable": true,
                "description": "The source of change, for example 'app', 'mobile', 'api', etc."
              },
              "is_bulk_update_flag": {
                "type": "boolean",
                "description": "Whether the change was made as part of a bulk update"
              },
              "change_source_user_agent": {
                "type": "string",
                "nullable": true,
                "description": "The user agent from which the change was made"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "next_cursor": {
              "type": "string",
              "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getChangelogResponse200"
}
object PersonsListDealsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the deal"
                  },
                  "org_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the organization associated with the deal"
                          },
                          "address": {
                            "type": "string",
                            "description": "The address of the organization that is associated with the deal"
                          },
                          "cc_email": {
                            "type": "string",
                            "description": "The BCC email of the organization associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the organization that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated organization is active or not"
                          },
                          "people_count": {
                            "type": "integer",
                            "description": "The number of people connected with the organization that is associated with the deal"
                          }
                        },
                        "description": "The organization which is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the organization associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealOrganizationDataWithId"
                  },
                  "user_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the user"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user"
                          },
                          "email": {
                            "type": "string",
                            "description": "The email of the user"
                          },
                          "has_pic": {
                            "type": "boolean",
                            "description": "If the user has a picture or not"
                          },
                          "pic_hash": {
                            "type": "string",
                            "nullable": true,
                            "description": "The user picture hash"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the user is active or not"
                          }
                        },
                        "description": "The user who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the user"
                          }
                        }
                      }
                    ],
                    "title": "dealUserDataWithId"
                  },
                  "person_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person associated with the deal"
                          },
                          "email": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the email"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The email of the associated person"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary email or not"
                                }
                              }
                            },
                            "description": "The emails of the person associated with the deal"
                          },
                          "phone": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the phone number"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The phone number of the person associated with the deal"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary phone number or not"
                                }
                              }
                            },
                            "description": "The phone numbers of the person associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the person that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated person is active or not"
                          }
                        },
                        "description": "The person who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the person associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealPersonDataWithId"
                  },
                  "creator_user_id": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the deal creator"
                      },
                      "email": {
                        "type": "string",
                        "description": "The email of the deal creator"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "has_pic": {
                        "type": "boolean",
                        "description": "If the creator has a picture or not"
                      },
                      "pic_hash": {
                        "type": "string",
                        "nullable": true,
                        "description": "The creator picture hash"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the creator is active or not"
                      }
                    },
                    "description": "The creator of the deal"
                  }
                }
              },
              {
                "type": "object",
                "title": "baseDeal",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The label or multiple labels assigned to the deal"
                  },
                  "title": {
                    "type": "string",
                    "description": "The title of the deal"
                  },
                  "value": {
                    "type": "number",
                    "description": "The value of the deal"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the deal is active or not"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status of the deal"
                  },
                  "deleted": {
                    "type": "boolean",
                    "description": "Whether the deal is deleted or not"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the deal"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email of the deal"
                  },
                  "currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the deal"
                  },
                  "stage_id": {
                    "type": "integer",
                    "description": "The ID of the deal stage"
                  },
                  "won_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as won"
                  },
                  "lost_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as lost"
                  },
                  "close_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of closing the deal"
                  },
                  "org_hidden": {
                    "type": "boolean",
                    "description": "If the organization that is associated with the deal is hidden or not"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the deal owner"
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility of the deal"
                  },
                  "files_count": {
                    "type": "integer",
                    "description": "The number of files associated with the deal"
                  },
                  "lost_reason": {
                    "type": "string",
                    "nullable": true,
                    "description": "The reason for losing the deal"
                  },
                  "notes_count": {
                    "type": "integer",
                    "description": "The number of notes associated with the deal"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person associated with the deal"
                  },
                  "pipeline_id": {
                    "type": "integer",
                    "description": "The ID of the pipeline associated with the deal"
                  },
                  "probability": {
                    "type": "number",
                    "nullable": true,
                    "description": "The success probability percentage of the deal"
                  },
                  "rotten_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of changing the deal status as rotten"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal"
                  },
                  "person_hidden": {
                    "type": "boolean",
                    "description": "If the person that is associated with the deal is hidden or not"
                  },
                  "first_won_time": {
                    "type": "string",
                    "description": "The date and time of the first time changing the deal status as won"
                  },
                  "products_count": {
                    "type": "integer",
                    "description": "The number of products associated with the deal"
                  },
                  "stage_order_nr": {
                    "type": "integer",
                    "description": "The order number of the deal stage associated with the deal"
                  },
                  "weighted_value": {
                    "type": "number",
                    "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                  },
                  "followers_count": {
                    "type": "integer",
                    "description": "The number of followers associated with the deal"
                  },
                  "formatted_value": {
                    "type": "string",
                    "description": "The deal value formatted with selected currency. E.g. US$500"
                  },
                  "activities_count": {
                    "type": "integer",
                    "description": "The number of activities associated with the deal"
                  },
                  "last_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the last activity associated with the deal"
                  },
                  "next_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the next activity associated with the deal"
                  },
                  "stage_change_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal stage"
                  },
                  "last_activity_date": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date of the last activity associated with the deal"
                  },
                  "next_activity_date": {
                    "type": "string",
                    "description": "The date of the next activity associated with the deal"
                  },
                  "next_activity_note": {
                    "type": "string",
                    "description": "The note of the next activity associated with the deal"
                  },
                  "next_activity_time": {
                    "type": "string",
                    "description": "The time of the next activity associated with the deal"
                  },
                  "next_activity_type": {
                    "type": "string",
                    "description": "The type of the next activity associated with the deal"
                  },
                  "participants_count": {
                    "type": "integer",
                    "description": "The number of participants associated with the deal"
                  },
                  "expected_close_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The expected close date of the deal"
                  },
                  "email_messages_count": {
                    "type": "integer",
                    "description": "The number of emails associated with the deal"
                  },
                  "done_activities_count": {
                    "type": "integer",
                    "description": "The number of completed activities associated with the deal"
                  },
                  "next_activity_subject": {
                    "type": "string",
                    "description": "The subject of the next activity associated with the deal"
                  },
                  "next_activity_duration": {
                    "type": "string",
                    "description": "The duration of the next activity associated with the deal"
                  },
                  "last_incoming_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last incoming email associated with the deal"
                  },
                  "last_outgoing_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last outgoing email associated with the deal"
                  },
                  "undone_activities_count": {
                    "type": "integer",
                    "description": "The number of incomplete activities associated with the deal"
                  },
                  "weighted_value_currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "formatted_weighted_value": {
                    "type": "string",
                    "description": "The weighted_value formatted with selected currency. E.g. US$500"
                  }
                }
              }
            ],
            "title": "dealNonStrict"
          },
          "description": "The array of deals"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "stage": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the stage"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the stage"
                },
                "add_time": {
                  "type": "string",
                  "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of the stage"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the stage is active or deleted"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline to add the stage to"
                },
                "rotten_days": {
                  "type": "integer",
                  "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
                },
                "rotten_flag": {
                  "type": "boolean",
                  "description": "Whether deals in this stage can become rotten"
                },
                "update_time": {
                  "type": "string",
                  "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "integer",
                  "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "pipeline": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the pipeline"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the pipeline"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether this pipeline will be made inactive (hidden) or active"
                },
                "add_time": {
                  "type": "string",
                  "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                },
                "url_title": {
                  "type": "string",
                  "description": "The pipeline title displayed in the URL"
                },
                "update_time": {
                  "type": "string",
                  "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "boolean",
                  "description": "Whether deal probability is disabled or enabled for this pipeline"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getAssociatedDealsResponse200"
}
object PersonsListFollowersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the user follower"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal which the follower was added to"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the follower was added to the person"
              }
            }
          },
          "description": "The list of followers"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFollowersResponse200"
}
object PersonsListMailMessagesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message copies (object)"
                      },
                      "id": {
                        "type": "integer",
                        "description": "ID of the mail message."
                      },
                      "to": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message receiver (object)"
                      },
                      "bcc": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message blind copies (object)"
                      },
                      "from": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "ID of the mail participant"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the mail participant"
                            },
                            "email_address": {
                              "type": "string",
                              "description": "Mail address of the mail participant"
                            },
                            "linked_person_id": {
                              "type": "integer",
                              "description": "ID of the linked person to the mail message"
                            },
                            "linked_person_name": {
                              "type": "string",
                              "description": "Name of the linked person to the mail message"
                            },
                            "mail_message_party_id": {
                              "type": "integer",
                              "description": "ID of the mail message participant"
                            }
                          }
                        },
                        "description": "The array of mail message sender (object)"
                      },
                      "draft": {
                        "type": "string",
                        "description": "If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`."
                      },
                      "snippet": {
                        "type": "string",
                        "description": "The snippet of mail message. Snippet length is up to 225 characters."
                      },
                      "subject": {
                        "type": "string",
                        "description": "The subject of mail message"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "ID of the user whom mail message will be assigned to"
                      },
                      "add_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The insertion into the database time of the mail message"
                      },
                      "body_url": {
                        "type": "string",
                        "description": "The mail message body URL"
                      },
                      "read_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is read or not by the user"
                      },
                      "sent_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent or not"
                      },
                      "account_id": {
                        "type": "string",
                        "description": "The connection account ID"
                      },
                      "draft_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is a draft or not"
                      },
                      "synced_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is synced with the provider or not"
                      },
                      "update_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The updating time in the database of the mail message"
                      },
                      "deleted_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message is deleted or not"
                      },
                      "message_time": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Creation or receival time of the mail message"
                      },
                      "has_body_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has a body or not"
                      },
                      "mail_thread_id": {
                        "type": "integer",
                        "description": "ID of the mail message thread"
                      },
                      "smart_bcc_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been created by Smart Email BCC feature or not"
                      },
                      "has_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment or not"
                      },
                      "mail_tracking_status": {
                        "enum": [
                          "opened",
                          "not opened"
                        ],
                        "type": "string",
                        "nullable": true,
                        "description": "The status of tracking mail message. Value is `null` if tracking is not enabled."
                      },
                      "sent_from_pipedrive_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has been sent from Pipedrive app or not"
                      },
                      "has_real_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an attachment (which is not inline) or not"
                      },
                      "has_inline_attachments_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the mail message has an inline attachment or not"
                      },
                      "mail_link_tracking_enabled_flag": {
                        "allOf": [
                          {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "number",
                            "title": "numberBooleanDefault0",
                            "default": 0
                          }
                        ],
                        "description": "Whether the link tracking in mail message body is enabled."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "nylas_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the sync provider"
                      },
                      "item_type": {
                        "type": "string",
                        "description": "The type of the data item"
                      },
                      "s3_bucket": {
                        "type": "string",
                        "description": "The name of the S3 bucket"
                      },
                      "timestamp": {
                        "type": "string",
                        "description": "The add date and time of the Mail Message"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company"
                      },
                      "template_id": {
                        "type": "integer",
                        "description": "The ID of the mail template"
                      },
                      "mua_message_id": {
                        "type": "string",
                        "description": "The Mail Message ID assigned by the mail user agent"
                      },
                      "s3_bucket_path": {
                        "type": "string",
                        "description": "The path of the S3 bucket"
                      },
                      "external_deleted_flag": {
                        "type": "boolean",
                        "description": "If the Mail Message has been deleted on the provider side or not"
                      }
                    }
                  }
                ],
                "title": "mailMessageItemForList"
              },
              "object": {
                "type": "string",
                "description": "The type of the data item"
              },
              "timestamp": {
                "type": "string",
                "description": "The date and time when the item was created"
              }
            }
          },
          "description": "The array of mail messages"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedMailMessagesResponse200"
}
object PersonsListPermittedUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "The list of permitted user IDs"
        }
      }
    }
  ],
  "title": "listPermittedUsersResponse200"
}
object PersonsListPersonFilesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the file"
              },
              "cid": {
                "type": "string",
                "description": "The ID of the inline attachment"
              },
              "url": {
                "type": "string",
                "description": "The URL of the download file"
              },
              "name": {
                "type": "string",
                "description": "The visible name of the file"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization to associate the file with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal to associate the file with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the lead to associate the file with"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user to associate the file with"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the file"
              },
              "deal_name": {
                "type": "string",
                "description": "The name of the deal associated with the dile"
              },
              "file_name": {
                "type": "string",
                "description": "The original name of the file"
              },
              "file_size": {
                "type": "integer",
                "description": "The size of the file"
              },
              "lead_name": {
                "type": "string",
                "description": "The name of the lead associated with the file"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person to associate the file with"
              },
              "remote_id": {
                "type": "string",
                "description": "The ID of the remote item"
              },
              "s3_bucket": {
                "type": "string",
                "description": "The location of the cloud storage"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product to associate the file with"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the user is active or not. false = Not activated, true = Activated"
              },
              "activity_id": {
                "type": "integer",
                "description": "The ID of the activity to associate the file with"
              },
              "description": {
                "type": "string",
                "description": "The description of the file"
              },
              "inline_flag": {
                "type": "boolean",
                "description": "Whether the file was uploaded as inline or not"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the file"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
              },
              "product_name": {
                "type": "string",
                "description": "The name of the product associated with the file"
              },
              "mail_message_id": {
                "type": "string",
                "description": "The ID of the mail message to associate the file with"
              },
              "remote_location": {
                "type": "string",
                "description": "The location type to send the file to. Only googledrive is supported at the moment."
              },
              "mail_template_id": {
                "type": "string",
                "description": "The ID of the mail template to associate the file with"
              }
            },
            "description": "The file data"
          },
          "description": "The array of files"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFilesResponse200"
}
object PersonsListProductsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "DEAL_ID": {
                "type": "object",
                "properties": {
                  "deal": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal"
                      },
                      "label": {
                        "type": "string",
                        "description": "The label or multiple labels assigned to the deal"
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the deal"
                      },
                      "value": {
                        "type": "number",
                        "description": "The value of the deal"
                      },
                      "active": {
                        "type": "boolean",
                        "description": "Whether the deal is active or not"
                      },
                      "org_id": {
                        "type": "integer",
                        "description": "The ID of the organization associated with the deal"
                      },
                      "status": {
                        "type": "string",
                        "description": "The status of the deal"
                      },
                      "deleted": {
                        "type": "boolean",
                        "description": "Whether the deal is deleted or not"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "The ID of the user"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The creation date and time of the deal"
                      },
                      "currency": {
                        "type": "string",
                        "description": "The currency associated with the deal"
                      },
                      "stage_id": {
                        "type": "integer",
                        "description": "The ID of the deal stage"
                      },
                      "won_time": {
                        "type": "string",
                        "description": "The date and time of changing the deal status as won"
                      },
                      "lost_time": {
                        "type": "string",
                        "description": "The date and time of changing the deal status as lost"
                      },
                      "person_id": {
                        "type": "integer",
                        "description": "The ID of the person associated with the deal"
                      },
                      "close_time": {
                        "type": "string",
                        "nullable": true,
                        "description": "The date and time of closing the deal"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company"
                      },
                      "visible_to": {
                        "type": "string",
                        "description": "The visibility of the deal"
                      },
                      "files_count": {
                        "type": "integer",
                        "description": "The number of files associated with the deal"
                      },
                      "lost_reason": {
                        "type": "string",
                        "nullable": true,
                        "description": "The reason for losing the deal"
                      },
                      "notes_count": {
                        "type": "integer",
                        "description": "The number of notes associated with the deal"
                      },
                      "pipeline_id": {
                        "type": "integer",
                        "description": "The ID of the pipeline associated with the deal"
                      },
                      "probability": {
                        "type": "number",
                        "nullable": true,
                        "description": "The success probability percentage of the deal"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last updated date and time of the deal"
                      },
                      "first_add_time": {
                        "type": "string",
                        "description": "The first creation date and time of the deal"
                      },
                      "first_won_time": {
                        "type": "string",
                        "description": "The date and time of the first time changing the deal status as won"
                      },
                      "products_count": {
                        "type": "integer",
                        "description": "The number of products associated with the deal"
                      },
                      "creator_user_id": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "followers_count": {
                        "type": "integer",
                        "description": "The number of followers associated with the deal"
                      },
                      "activities_count": {
                        "type": "integer",
                        "description": "The number of activities associated with the deal"
                      },
                      "last_activity_id": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The ID of the last activity associated with the deal"
                      },
                      "next_activity_id": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The ID of the next activity associated with the deal"
                      },
                      "stage_change_time": {
                        "type": "string",
                        "description": "The last updated date and time of the deal stage"
                      },
                      "last_activity_date": {
                        "type": "string",
                        "nullable": true,
                        "description": "The date of the last activity associated with the deal"
                      },
                      "next_activity_date": {
                        "type": "string",
                        "description": "The date of the next activity associated with the deal"
                      },
                      "next_activity_time": {
                        "type": "string",
                        "description": "The time of the next activity associated with the deal"
                      },
                      "participants_count": {
                        "type": "integer",
                        "description": "The number of participants associated with the deal"
                      },
                      "expected_close_date": {
                        "type": "string",
                        "format": "date",
                        "description": "The expected close date of the deal"
                      },
                      "email_messages_count": {
                        "type": "integer",
                        "description": "The number of emails associated with the deal"
                      },
                      "done_activities_count": {
                        "type": "integer",
                        "description": "The number of completed activities associated with the deal"
                      },
                      "last_incoming_mail_time": {
                        "type": "string",
                        "description": "The date and time of the last incoming email associated with the deal"
                      },
                      "last_outgoing_mail_time": {
                        "type": "string",
                        "description": "The date and time of the last outgoing email associated with the deal"
                      },
                      "undone_activities_count": {
                        "type": "integer",
                        "description": "The number of incomplete activities associated with the deal"
                      }
                    }
                  },
                  "product": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the product"
                      },
                      "tax": {
                        "type": "number",
                        "default": 0,
                        "description": "The tax percentage"
                      },
                      "code": {
                        "type": "string",
                        "description": "The product code"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the product"
                      },
                      "unit": {
                        "type": "string",
                        "description": "The unit in which this product is sold"
                      },
                      "deal_id": {
                        "type": "integer",
                        "description": "The ID of the deal"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The date and time when the product was added to the deal"
                      },
                      "category": {
                        "type": "string",
                        "description": "The category of the product"
                      },
                      "owner_id": {
                        "type": "integer",
                        "description": "The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used."
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company"
                      },
                      "first_char": {
                        "type": "string",
                        "description": "The first letter of the product name"
                      },
                      "selectable": {
                        "type": "boolean",
                        "default": true,
                        "description": "Whether this product can be selected in deals or not"
                      },
                      "visible_to": {
                        "allOf": [
                          {
                            "enum": [
                              "1",
                              "3",
                              "5",
                              "7"
                            ],
                            "type": "string"
                          }
                        ],
                        "description": "The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "default": true,
                        "description": "Whether this product will be made active or not"
                      },
                      "description": {
                        "type": "string",
                        "description": "The description of the product"
                      },
                      "files_count": {
                        "type": "integer",
                        "description": "The count of files"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The date and time when the product was updated to the deal"
                      }
                    }
                  }
                }
              }
            }
          },
          "description": "The array of deal products"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "getPersonProductsResponse200"
}
object PersonsListUpdatesAboutResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "description": "The data related to the update"
              },
              "object": {
                "type": "string",
                "description": "The type of the person update. (Possible object types - personChange, note, activity, file)"
              },
              "timestamp": {
                "type": "string",
                "description": "The creation date and time of the update"
              }
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "deal": {
              "type": "object",
              "properties": {
                "DEAL_ID": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the deal associated with the item"
                    },
                    "title": {
                      "type": "string",
                      "description": "The title of the deal associated with the item"
                    },
                    "value": {
                      "type": "number",
                      "description": "The value of the deal that is associated with the item"
                    },
                    "status": {
                      "type": "string",
                      "description": "The status of the deal associated with the item"
                    },
                    "currency": {
                      "type": "string",
                      "description": "The currency of the deal value"
                    },
                    "stage_id": {
                      "type": "integer",
                      "description": "The ID of the stage the deal is currently at"
                    },
                    "pipeline_id": {
                      "type": "integer",
                      "description": "The ID of the pipeline the deal is in"
                    }
                  },
                  "description": "The ID of the deal which is associated with the item"
                }
              }
            },
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the organization associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the organization associated with the item"
                        },
                        "address": {
                          "type": "string",
                          "description": "The address of the organization"
                        },
                        "cc_email": {
                          "type": "string",
                          "description": "The BCC email of the organization associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the organization that is associated with the item"
                        },
                        "people_count": {
                          "type": "integer",
                          "description": "The number of people connected with the organization that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getAssociatedPersonUpdatesResponse200"
}
object PersonsMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the deleted person"
            }
          }
        }
      }
    }
  ],
  "title": "deletePersonResponse200"
}
object PersonsMergeTwoRequest
{
  "type": "object",
  "title": "mergePersonsRequest",
  "required": [
    "merge_with_id"
  ],
  "properties": {
    "merge_with_id": {
      "type": "integer",
      "description": "The ID of the person that will not be overwritten. This person’s data will be prioritized in case of conflict with the other person."
    }
  }
}
object PersonsMergeTwoResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the person"
                },
                "email": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "Email"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if email is primary for the person or not"
                      }
                    }
                  },
                  "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the person"
                },
                "phone": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "The phone number"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if phone number is primary for the person or not"
                      }
                    }
                  },
                  "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the person"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the person"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the person"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first letter of the name of the person"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the owner associated with the person"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the person"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the person is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "type": "integer",
                          "description": "The ID of the organization related to the person"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner related to the person"
                        },
                        "merge_what_id": {
                          "type": "integer",
                          "description": "The ID of the person with what the main person was merged"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the person"
                            },
                            "last_name": {
                              "type": "string",
                              "description": "The last name of the person"
                            },
                            "first_name": {
                              "type": "string",
                              "description": "The first name of the person"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "files_count": {
                                  "type": "integer",
                                  "description": "The count of files related to the person"
                                },
                                "notes_count": {
                                  "type": "integer",
                                  "description": "The count of notes related to the person"
                                },
                                "followers_count": {
                                  "type": "integer",
                                  "description": "The count of followers related to the person"
                                },
                                "activities_count": {
                                  "type": "integer",
                                  "description": "The count of activities related to the person"
                                },
                                "email_messages_count": {
                                  "type": "integer",
                                  "description": "The count of email messages related to the person"
                                },
                                "done_activities_count": {
                                  "type": "integer",
                                  "description": "The count of done activities related to the person"
                                },
                                "undone_activities_count": {
                                  "type": "integer",
                                  "description": "The count of undone activities related to the person"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "last_incoming_mail_time": {
                                  "type": "string",
                                  "description": "The date and time of the last incoming email associated with the person"
                                },
                                "last_outgoing_mail_time": {
                                  "type": "string",
                                  "description": "The date and time of the last outgoing email associated with the person"
                                }
                              }
                            }
                          ],
                          "title": "personCountAndEmailInfo"
                        }
                      ],
                      "title": "personNameCountAndEmailInfo"
                    }
                  ],
                  "title": "personNameCountAndEmailInfoWithIds"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealCountAndActivityInfo"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "participant_open_deals_count": {
                          "type": "integer",
                          "description": "The count of open participant deals related with the item"
                        },
                        "participant_closed_deals_count": {
                          "type": "integer",
                          "description": "The count of closed participant deals related with the item"
                        }
                      }
                    }
                  ],
                  "title": "mergePersonDealRelatedInfo"
                }
              ],
              "title": "additionalMergePersonInfo"
            }
          ],
          "title": "mergePersonItem"
        }
      }
    }
  ],
  "title": "mergePersonsResponse200"
}
object PersonsSearchByCriteriaResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the person"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the person"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the item"
                      },
                      "notes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of notes"
                      },
                      "owner": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the owner of the person"
                          }
                        }
                      },
                      "emails": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of email addresses"
                      },
                      "phones": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An array of phone numbers"
                      },
                      "visible_to": {
                        "type": "integer",
                        "description": "The visibility of the person"
                      },
                      "organization": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the organization the person is associated with"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the organization the person is associated with"
                          }
                        }
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Custom fields"
                      }
                    }
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of found items"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchPersonsResponse200"
}
object PersonsUpdatePropertiesRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the person"
        }
      }
    },
    {
      "type": "object",
      "title": "basicPersonRequest",
      "properties": {
        "email": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
              },
              "value": {
                "type": "string",
                "description": "The email"
              },
              "primary": {
                "type": "boolean",
                "description": "Boolean that indicates if email is primary for the person or not"
              }
            }
          },
          "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required."
        },
        "label": {
          "type": "integer",
          "description": "The ID of the label."
        },
        "phone": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
              },
              "value": {
                "type": "string",
                "description": "The phone number"
              },
              "primary": {
                "type": "boolean",
                "description": "Boolean that indicates if phone number is primary for the person or not"
              }
            }
          },
          "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
        },
        "org_id": {
          "type": "integer",
          "description": "The ID of the organization this person will belong to"
        },
        "add_time": {
          "type": "string",
          "description": "The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS"
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used."
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the person. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "marketing_status": {
          "allOf": [
            {
              "enum": [
                "no_consent",
                "unsubscribed",
                "subscribed",
                "archived"
              ],
              "type": "string"
            }
          ],
          "description": "If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>"
        }
      }
    }
  ],
  "title": "updatePersonRequest"
}
object PersonsUpdatePropertiesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the person"
                },
                "email": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "Email"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if email is primary for the person or not"
                      }
                    }
                  },
                  "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                },
                "label": {
                  "type": "integer",
                  "description": "The label assigned to the person"
                },
                "phone": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                      },
                      "value": {
                        "type": "string",
                        "description": "The phone number"
                      },
                      "primary": {
                        "type": "boolean",
                        "description": "Boolean that indicates if phone number is primary for the person or not"
                      }
                    }
                  },
                  "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                },
                "add_time": {
                  "type": "string",
                  "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                },
                "cc_email": {
                  "type": "string",
                  "description": "The BCC email associated with the person"
                },
                "org_name": {
                  "type": "string",
                  "description": "The name of the organization associated with the person"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The ID of the company related to the person"
                },
                "first_char": {
                  "type": "string",
                  "description": "The first letter of the name of the person"
                },
                "owner_name": {
                  "type": "string",
                  "description": "The name of the owner associated with the person"
                },
                "picture_id": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the picture associated with the item"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "item_id": {
                          "type": "integer",
                          "description": "The ID of related item"
                        },
                        "add_time": {
                          "type": "string",
                          "description": "The add time of the picture"
                        },
                        "pictures": {
                          "type": "object",
                          "properties": {
                            "128": {
                              "type": "string",
                              "description": "The URL of the 128*128 picture"
                            },
                            "512": {
                              "type": "string",
                              "description": "The URL of the 512*512 picture"
                            }
                          }
                        },
                        "item_type": {
                          "type": "string",
                          "description": "The type of item the picture is related to"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated picture is active or not"
                        },
                        "update_time": {
                          "type": "string",
                          "description": "The update time of the picture"
                        },
                        "added_by_user_id": {
                          "type": "integer",
                          "description": "The ID of the user who added the picture"
                        }
                      }
                    }
                  ]
                },
                "visible_to": {
                  "type": "string",
                  "description": "The visibility group ID of who can see the person"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the person is active or not"
                },
                "update_time": {
                  "type": "string",
                  "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                }
              }
            },
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The name of the organization associated with the item"
                                    },
                                    "address": {
                                      "type": "string",
                                      "description": "The address of the organization"
                                    },
                                    "cc_email": {
                                      "type": "string",
                                      "description": "The BCC email of the organization associated with the item"
                                    },
                                    "owner_id": {
                                      "type": "integer",
                                      "description": "The ID of the owner of the organization that is associated with the item"
                                    },
                                    "people_count": {
                                      "type": "integer",
                                      "description": "The number of people connected with the organization that is associated with the item"
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "description": "The ID of the organization"
                                    }
                                  }
                                }
                              ],
                              "title": "relationshipOrganizationInfoItem"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the associated organization is active or not"
                                }
                              }
                            }
                          ],
                          "title": "relationshipOrganizationInfoItemWithActiveFlag"
                        },
                        "owner_id": {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "The ID of the user"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the user"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The email of the user"
                                },
                                "has_pic": {
                                  "type": "integer",
                                  "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                                },
                                "pic_hash": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "The user picture hash"
                                },
                                "active_flag": {
                                  "type": "boolean",
                                  "description": "Whether the user is active or not"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "description": "The ID of the owner"
                                }
                              }
                            }
                          ],
                          "title": "owner"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the person"
                        },
                        "last_name": {
                          "type": "string",
                          "description": "The last name of the person"
                        },
                        "first_name": {
                          "type": "string",
                          "description": "The first name of the person"
                        }
                      }
                    }
                  ],
                  "title": "personNameInfoWithOrgAndOwnerId"
                },
                {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "files_count": {
                              "type": "integer",
                              "description": "The count of files related to the person"
                            },
                            "notes_count": {
                              "type": "integer",
                              "description": "The count of notes related to the person"
                            },
                            "followers_count": {
                              "type": "integer",
                              "description": "The count of followers related to the person"
                            },
                            "activities_count": {
                              "type": "integer",
                              "description": "The count of activities related to the person"
                            },
                            "email_messages_count": {
                              "type": "integer",
                              "description": "The count of email messages related to the person"
                            },
                            "done_activities_count": {
                              "type": "integer",
                              "description": "The count of done activities related to the person"
                            },
                            "undone_activities_count": {
                              "type": "integer",
                              "description": "The count of undone activities related to the person"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_incoming_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last incoming email associated with the person"
                            },
                            "last_outgoing_mail_time": {
                              "type": "string",
                              "description": "The date and time of the last outgoing email associated with the person"
                            }
                          }
                        }
                      ],
                      "title": "personCountAndEmailInfo"
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "won_deals_count": {
                              "type": "integer",
                              "description": "The count of won deals related with the item"
                            },
                            "lost_deals_count": {
                              "type": "integer",
                              "description": "The count of lost deals related with the item"
                            },
                            "open_deals_count": {
                              "type": "integer",
                              "description": "The count of open deals related with the item"
                            },
                            "closed_deals_count": {
                              "type": "integer",
                              "description": "The count of closed deals related with the item"
                            },
                            "related_won_deals_count": {
                              "type": "integer",
                              "description": "The count of related won deals related with the item"
                            },
                            "related_lost_deals_count": {
                              "type": "integer",
                              "description": "The count of related lost deals related with the item"
                            },
                            "related_open_deals_count": {
                              "type": "integer",
                              "description": "The count of related open deals related with the item"
                            },
                            "related_closed_deals_count": {
                              "type": "integer",
                              "description": "The count of related closed deals related with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the last activity associated with the deal"
                            },
                            "next_activity_id": {
                              "type": "integer",
                              "nullable": true,
                              "description": "The ID of the next activity associated with the deal"
                            },
                            "last_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the last activity associated with the deal"
                            },
                            "next_activity_date": {
                              "type": "string",
                              "nullable": true,
                              "description": "The date of the next activity associated with the deal"
                            },
                            "next_activity_time": {
                              "type": "string",
                              "nullable": true,
                              "description": "The time of the next activity associated with the deal"
                            }
                          }
                        }
                      ],
                      "title": "dealCountAndActivityInfo"
                    }
                  ],
                  "title": "personCountEmailDealAndActivityInfo"
                }
              ],
              "title": "additionalPersonInfo"
            }
          ],
          "title": "personItem"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "updatePersonResponse200"
}
object PipelinesCreateNewPipelineRequest
{
  "type": "object",
  "title": "pipelineRequest",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the pipeline"
    },
    "active": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether this pipeline will be made inactive (hidden) or active"
    },
    "order_nr": {
      "type": "integer",
      "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
    },
    "deal_probability": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether deal probability is disabled or enabled for this pipeline"
    }
  }
}
object PipelinesCreateNewPipelineResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the pipeline"
            },
            "name": {
              "type": "string",
              "description": "The name of the pipeline"
            },
            "active": {
              "type": "boolean",
              "description": "Whether this pipeline will be made inactive (hidden) or active"
            },
            "add_time": {
              "type": "string",
              "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
            },
            "order_nr": {
              "type": "integer",
              "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
            },
            "url_title": {
              "type": "string",
              "description": "The pipeline title displayed in the URL"
            },
            "update_time": {
              "type": "string",
              "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
            },
            "deal_probability": {
              "type": "boolean",
              "description": "Whether deal probability is disabled or enabled for this pipeline"
            }
          },
          "description": "The pipeline object"
        }
      }
    }
  ],
  "title": "addPipelineResponse200"
}
object PipelinesDeletePipelineResponse
{
  "type": "object",
  "title": "deletePipelineResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Deleted Pipeline ID"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object PipelinesGetAllResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the pipeline"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the pipeline"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether this pipeline will be made inactive (hidden) or active"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "order_nr": {
                    "type": "integer",
                    "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                  },
                  "url_title": {
                    "type": "string",
                    "description": "The pipeline title displayed in the URL"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "deal_probability": {
                    "type": "boolean",
                    "description": "Whether deal probability is disabled or enabled for this pipeline"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "selected": {
                    "type": "boolean",
                    "description": "A boolean that shows if the pipeline is selected from a filter or not"
                  }
                }
              }
            ],
            "title": "basePipelineWithSelectedFlag"
          },
          "description": "Pipelines array"
        }
      }
    }
  ],
  "title": "getPipelinesResponse200"
}
object PipelinesGetConversionStatisticsResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "won_conversion": {
              "type": "integer",
              "description": "The won conversion"
            },
            "lost_conversion": {
              "type": "integer",
              "description": "The lost conversion"
            },
            "stage_conversions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "to_stage_id": {
                    "type": "integer",
                    "description": "The stage ID to where conversion ends"
                  },
                  "from_stage_id": {
                    "type": "integer",
                    "description": "The stage ID from where conversion starts"
                  },
                  "conversion_rate": {
                    "type": "integer",
                    "description": "The conversion rate"
                  }
                }
              },
              "description": "The stage conversions"
            }
          },
          "description": "The pipeline object"
        }
      }
    }
  ],
  "title": "getPipelineConversionStatisticsResponse200"
}
object PipelinesGetMovementStatisticsResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "new_deals": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "The count of the deals"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "integer",
                      "description": "The value of the deals"
                    }
                  },
                  "description": "The values of the deals"
                },
                "deals_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "The IDs of the deals that have been moved"
                },
                "formatted_values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "string",
                      "description": "The formatted values of the deals"
                    }
                  },
                  "description": "The formatted values of the deals"
                }
              },
              "description": "Deals summary"
            },
            "won_deals": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "The count of the deals"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "integer",
                      "description": "The value of the deals"
                    }
                  },
                  "description": "The values of the deals"
                },
                "deals_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "The IDs of the deals that have been moved"
                },
                "formatted_values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "string",
                      "description": "The formatted values of the deals"
                    }
                  },
                  "description": "The formatted values of the deals"
                }
              },
              "description": "Deals summary"
            },
            "lost_deals": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "The count of the deals"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "integer",
                      "description": "The value of the deals"
                    }
                  },
                  "description": "The values of the deals"
                },
                "deals_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "The IDs of the deals that have been moved"
                },
                "formatted_values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "string",
                      "description": "The formatted values of the deals"
                    }
                  },
                  "description": "The formatted values of the deals"
                }
              },
              "description": "Deals summary"
            },
            "deals_left_open": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "The count of the deals"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "integer",
                      "description": "The value of the deals"
                    }
                  },
                  "description": "The values of the deals"
                },
                "deals_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "The IDs of the deals that have been moved"
                },
                "formatted_values": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "string",
                      "description": "The formatted values of the deals"
                    }
                  },
                  "description": "The formatted values of the deals"
                }
              },
              "description": "Deals summary"
            },
            "average_age_in_days": {
              "type": "object",
              "properties": {
                "by_stages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "description": "The average deals age in specific stage"
                      },
                      "stage_id": {
                        "type": "integer",
                        "description": "The stage ID"
                      }
                    },
                    "description": "The moved deals average age by the stage"
                  },
                  "description": "The moved deals average age by stages"
                },
                "across_all_stages": {
                  "type": "integer",
                  "description": "The moved deals average age across all stages"
                }
              },
              "description": "The moved deals average age in days"
            },
            "movements_between_stages": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "The count of the deals that have been moved between stages"
                }
              },
              "description": "Movements between stages"
            }
          },
          "description": "The pipeline object"
        }
      }
    }
  ],
  "title": "getPipelineMovementStatisticsResponse200"
}
object PipelinesGetOnePipelineSummaryResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the pipeline"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the pipeline"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether this pipeline will be made inactive (hidden) or active"
                    },
                    "add_time": {
                      "type": "string",
                      "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                    },
                    "order_nr": {
                      "type": "integer",
                      "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                    },
                    "url_title": {
                      "type": "string",
                      "description": "The pipeline title displayed in the URL"
                    },
                    "update_time": {
                      "type": "string",
                      "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                    },
                    "deal_probability": {
                      "type": "boolean",
                      "description": "Whether deal probability is disabled or enabled for this pipeline"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "selected": {
                      "type": "boolean",
                      "description": "A boolean that shows if the pipeline is selected from a filter or not"
                    }
                  }
                }
              ],
              "title": "basePipelineWithSelectedFlag"
            },
            {
              "type": "object",
              "properties": {
                "deals_summary": {
                  "type": "object",
                  "properties": {
                    "per_stages": {
                      "type": "object",
                      "properties": {
                        "STAGE_ID": {
                          "type": "object",
                          "properties": {
                            "CURRENCY_ID": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "integer",
                                  "description": "Deals count per currency"
                                },
                                "value": {
                                  "type": "integer",
                                  "description": "Deals value per currency"
                                },
                                "weighted_value": {
                                  "type": "integer",
                                  "description": "Deals weighted value per currency"
                                },
                                "value_formatted": {
                                  "type": "string",
                                  "description": "Deals value formatted per currency"
                                },
                                "weighted_value_formatted": {
                                  "type": "string",
                                  "description": "Deals weighted value formatted per currency"
                                }
                              },
                              "description": "The currency summary. This parameter is dynamic and changes according to `currency_id` value."
                            }
                          },
                          "description": "The currency summaries per stage. This parameter is dynamic and changes according to `stage_id` value."
                        }
                      },
                      "description": "The stage objects containing deals currency information"
                    },
                    "total_count": {
                      "type": "integer",
                      "description": "Deals count"
                    },
                    "per_currency": {
                      "type": "object",
                      "properties": {
                        "CURRENCY_ID": {
                          "type": "integer",
                          "description": "Deals count per currency. This parameter is dynamic and changes according to `currency_id` value."
                        }
                      },
                      "description": "The currency count summary"
                    },
                    "per_currency_full": {
                      "type": "object",
                      "properties": {
                        "CURRENCY_ID": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "integer",
                              "description": "Deals count per currency"
                            },
                            "value": {
                              "type": "integer",
                              "description": "Deals value per currency"
                            }
                          },
                          "description": "The currency summary. This parameter is dynamic and changes according to `currency_id` value."
                        }
                      },
                      "description": "Full currency summaries"
                    }
                  },
                  "description": "Deals summary"
                }
              }
            }
          ],
          "title": "pipelineDetails",
          "description": "The pipeline object"
        }
      }
    }
  ],
  "title": "getPipelineResponse200"
}
object PipelinesListDealsResponse
{
  "type": "object",
  "title": "getStageDealsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization associated with the deal"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person associated with the deal"
              },
              "creator_user_id": {
                "type": "integer",
                "description": "The ID of the deal creator"
              }
            }
          },
          {
            "type": "object",
            "title": "baseDeal",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label or multiple labels assigned to the deal"
              },
              "title": {
                "type": "string",
                "description": "The title of the deal"
              },
              "value": {
                "type": "number",
                "description": "The value of the deal"
              },
              "active": {
                "type": "boolean",
                "description": "Whether the deal is active or not"
              },
              "status": {
                "type": "string",
                "description": "The status of the deal"
              },
              "deleted": {
                "type": "boolean",
                "description": "Whether the deal is deleted or not"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the deal"
              },
              "cc_email": {
                "type": "string",
                "description": "The BCC email of the deal"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the deal"
              },
              "stage_id": {
                "type": "integer",
                "description": "The ID of the deal stage"
              },
              "won_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as won"
              },
              "lost_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as lost"
              },
              "close_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of closing the deal"
              },
              "org_hidden": {
                "type": "boolean",
                "description": "If the organization that is associated with the deal is hidden or not"
              },
              "owner_name": {
                "type": "string",
                "description": "The name of the deal owner"
              },
              "visible_to": {
                "type": "string",
                "description": "The visibility of the deal"
              },
              "files_count": {
                "type": "integer",
                "description": "The number of files associated with the deal"
              },
              "lost_reason": {
                "type": "string",
                "nullable": true,
                "description": "The reason for losing the deal"
              },
              "notes_count": {
                "type": "integer",
                "description": "The number of notes associated with the deal"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the deal"
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline associated with the deal"
              },
              "probability": {
                "type": "number",
                "nullable": true,
                "description": "The success probability percentage of the deal"
              },
              "rotten_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of changing the deal status as rotten"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the deal"
              },
              "person_hidden": {
                "type": "boolean",
                "description": "If the person that is associated with the deal is hidden or not"
              },
              "first_won_time": {
                "type": "string",
                "description": "The date and time of the first time changing the deal status as won"
              },
              "products_count": {
                "type": "integer",
                "description": "The number of products associated with the deal"
              },
              "stage_order_nr": {
                "type": "integer",
                "description": "The order number of the deal stage associated with the deal"
              },
              "weighted_value": {
                "type": "number",
                "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
              },
              "followers_count": {
                "type": "integer",
                "description": "The number of followers associated with the deal"
              },
              "formatted_value": {
                "type": "string",
                "description": "The deal value formatted with selected currency. E.g. US$500"
              },
              "activities_count": {
                "type": "integer",
                "description": "The number of activities associated with the deal"
              },
              "last_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the last activity associated with the deal"
              },
              "next_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the next activity associated with the deal"
              },
              "stage_change_time": {
                "type": "string",
                "description": "The last updated date and time of the deal stage"
              },
              "last_activity_date": {
                "type": "string",
                "nullable": true,
                "description": "The date of the last activity associated with the deal"
              },
              "next_activity_date": {
                "type": "string",
                "description": "The date of the next activity associated with the deal"
              },
              "next_activity_note": {
                "type": "string",
                "description": "The note of the next activity associated with the deal"
              },
              "next_activity_time": {
                "type": "string",
                "description": "The time of the next activity associated with the deal"
              },
              "next_activity_type": {
                "type": "string",
                "description": "The type of the next activity associated with the deal"
              },
              "participants_count": {
                "type": "integer",
                "description": "The number of participants associated with the deal"
              },
              "expected_close_date": {
                "type": "string",
                "format": "date",
                "description": "The expected close date of the deal"
              },
              "email_messages_count": {
                "type": "integer",
                "description": "The number of emails associated with the deal"
              },
              "done_activities_count": {
                "type": "integer",
                "description": "The number of completed activities associated with the deal"
              },
              "next_activity_subject": {
                "type": "string",
                "description": "The subject of the next activity associated with the deal"
              },
              "next_activity_duration": {
                "type": "string",
                "description": "The duration of the next activity associated with the deal"
              },
              "last_incoming_mail_time": {
                "type": "string",
                "description": "The date and time of the last incoming email associated with the deal"
              },
              "last_outgoing_mail_time": {
                "type": "string",
                "description": "The date and time of the last outgoing email associated with the deal"
              },
              "undone_activities_count": {
                "type": "integer",
                "description": "The number of incomplete activities associated with the deal"
              },
              "weighted_value_currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "formatted_weighted_value": {
                "type": "string",
                "description": "The weighted_value formatted with selected currency. E.g. US$500"
              }
            }
          }
        ],
        "title": "dealStrict"
      },
      "description": "The array of deals"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object PipelinesUpdatePropertiesRequest
{
  "type": "object",
  "title": "pipelineRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the pipeline"
    },
    "active": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether this pipeline will be made inactive (hidden) or active"
    },
    "order_nr": {
      "type": "integer",
      "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
    },
    "deal_probability": {
      "allOf": [
        {
          "enum": [
            0,
            1
          ],
          "type": "number",
          "title": "numberBoolean"
        }
      ],
      "description": "Whether deal probability is disabled or enabled for this pipeline"
    }
  }
}
object PipelinesUpdatePropertiesResponse
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the pipeline"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the pipeline"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether this pipeline will be made inactive (hidden) or active"
                    },
                    "add_time": {
                      "type": "string",
                      "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                    },
                    "order_nr": {
                      "type": "integer",
                      "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                    },
                    "url_title": {
                      "type": "string",
                      "description": "The pipeline title displayed in the URL"
                    },
                    "update_time": {
                      "type": "string",
                      "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                    },
                    "deal_probability": {
                      "type": "boolean",
                      "description": "Whether deal probability is disabled or enabled for this pipeline"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "selected": {
                      "type": "boolean",
                      "description": "A boolean that shows if the pipeline is selected from a filter or not"
                    }
                  }
                }
              ],
              "title": "basePipelineWithSelectedFlag"
            }
          ],
          "description": "The pipeline object"
        }
      }
    }
  ],
  "title": "updatePipelineResponse200"
}
object ProductFieldsAddNewFieldRequest
{
  "type": "object",
  "required": [
    "name",
    "field_type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the field"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`"
    },
    "field_type": {
      "enum": [
        "varchar",
        "varchar_auto",
        "text",
        "double",
        "monetary",
        "date",
        "set",
        "enum",
        "user",
        "org",
        "people",
        "phone",
        "time",
        "timerange",
        "daterange",
        "address"
      ],
      "type": "string",
      "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>"
    }
  }
}
object ProductFieldsAddNewFieldResponse
{
  "type": "object",
  "title": "getProductFieldResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "required": [
                "name",
                "field_type"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the field"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "description": "When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`"
                },
                "field_type": {
                  "enum": [
                    "varchar",
                    "varchar_auto",
                    "text",
                    "double",
                    "monetary",
                    "date",
                    "set",
                    "enum",
                    "user",
                    "org",
                    "people",
                    "phone",
                    "time",
                    "timerange",
                    "daterange",
                    "address"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the product field"
                },
                "key": {
                  "type": "string",
                  "description": "The key of the product field"
                },
                "add_time": {
                  "type": "string",
                  "description": "The product field creation time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "order_nr": {
                  "type": "integer",
                  "description": "The position (index) of the product field in the detail view"
                },
                "edit_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field name and metadata is editable"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is currently active"
                },
                "update_time": {
                  "type": "string",
                  "description": "The product field last update time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "sortable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is sortable"
                },
                "important_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is marked as important"
                },
                "mandatory_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is mandatory when creating products"
                },
                "searchable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is searchable"
                },
                "add_visible_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is visible in the Add Product Modal"
                },
                "bulk_edit_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field data can be edited"
                },
                "filtering_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field value can be used when filtering searches"
                },
                "last_updated_by_user_id": {
                  "type": "integer",
                  "description": "The ID of the last user to update the product field"
                }
              }
            }
          ],
          "title": "productField"
        }
      ],
      "description": "All data for the product field"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsDeleteMultipleBulkResponse
{
  "type": "object",
  "title": "deleteProductFieldsResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Array of all the IDs of the deleted product fields"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsGetAllFieldsResponse
{
  "type": "object",
  "title": "getProductFieldsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "required": [
              "name",
              "field_type"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the field"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`"
              },
              "field_type": {
                "enum": [
                  "varchar",
                  "varchar_auto",
                  "text",
                  "double",
                  "monetary",
                  "date",
                  "set",
                  "enum",
                  "user",
                  "org",
                  "people",
                  "phone",
                  "time",
                  "timerange",
                  "daterange",
                  "address"
                ],
                "type": "string",
                "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the product field"
              },
              "key": {
                "type": "string",
                "description": "The key of the product field"
              },
              "add_time": {
                "type": "string",
                "description": "The product field creation time. Format: YYYY-MM-DD HH:MM:SS"
              },
              "order_nr": {
                "type": "integer",
                "description": "The position (index) of the product field in the detail view"
              },
              "edit_flag": {
                "type": "boolean",
                "description": "Whether or not the product field name and metadata is editable"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is currently active"
              },
              "update_time": {
                "type": "string",
                "description": "The product field last update time. Format: YYYY-MM-DD HH:MM:SS"
              },
              "sortable_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is sortable"
              },
              "important_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is marked as important"
              },
              "mandatory_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is mandatory when creating products"
              },
              "searchable_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is searchable"
              },
              "add_visible_flag": {
                "type": "boolean",
                "description": "Whether or not the product field is visible in the Add Product Modal"
              },
              "bulk_edit_allowed": {
                "type": "boolean",
                "description": "Whether or not the product field data can be edited"
              },
              "filtering_allowed": {
                "type": "boolean",
                "description": "Whether or not the product field value can be used when filtering searches"
              },
              "last_updated_by_user_id": {
                "type": "integer",
                "description": "The ID of the last user to update the product field"
              }
            }
          }
        ],
        "title": "productField"
      },
      "description": "Array containing data for all product fields"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "description": "Additional data for the product field, such as pagination"
    }
  }
}
object ProductFieldsGetOneField410Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsGetOneFieldResponse
{
  "type": "object",
  "title": "getProductFieldResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "required": [
                "name",
                "field_type"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the field"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "description": "When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`"
                },
                "field_type": {
                  "enum": [
                    "varchar",
                    "varchar_auto",
                    "text",
                    "double",
                    "monetary",
                    "date",
                    "set",
                    "enum",
                    "user",
                    "org",
                    "people",
                    "phone",
                    "time",
                    "timerange",
                    "daterange",
                    "address"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the product field"
                },
                "key": {
                  "type": "string",
                  "description": "The key of the product field"
                },
                "add_time": {
                  "type": "string",
                  "description": "The product field creation time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "order_nr": {
                  "type": "integer",
                  "description": "The position (index) of the product field in the detail view"
                },
                "edit_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field name and metadata is editable"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is currently active"
                },
                "update_time": {
                  "type": "string",
                  "description": "The product field last update time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "sortable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is sortable"
                },
                "important_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is marked as important"
                },
                "mandatory_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is mandatory when creating products"
                },
                "searchable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is searchable"
                },
                "add_visible_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is visible in the Add Product Modal"
                },
                "bulk_edit_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field data can be edited"
                },
                "filtering_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field value can be used when filtering searches"
                },
                "last_updated_by_user_id": {
                  "type": "integer",
                  "description": "The ID of the last user to update the product field"
                }
              }
            }
          ],
          "title": "productField"
        }
      ],
      "description": "All data for the product field"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsMarkAsDeleted410Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteProductFieldResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "allOf": [
            {
              "type": "integer"
            }
          ],
          "description": "The ID of the deleted product field"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductFieldsUpdateFieldRequest
{
  "type": "object",
  "title": "UpdateProductFieldResponse200",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the field"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "When `field_type` is either set or enum, possible options on update must be supplied as an array of objects each containing id and label, for example: [{\"id\":1, \"label\":\"red\"},{\"id\":2, \"label\":\"blue\"},{\"id\":3, \"label\":\"lilac\"}]"
    }
  }
}
object ProductFieldsUpdateFieldResponse
{
  "type": "object",
  "title": "getProductFieldResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "allOf": [
            {
              "type": "object",
              "required": [
                "name",
                "field_type"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the field"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "description": "When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`"
                },
                "field_type": {
                  "enum": [
                    "varchar",
                    "varchar_auto",
                    "text",
                    "double",
                    "monetary",
                    "date",
                    "set",
                    "enum",
                    "user",
                    "org",
                    "people",
                    "phone",
                    "time",
                    "timerange",
                    "daterange",
                    "address"
                  ],
                  "type": "string",
                  "description": "The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the product field"
                },
                "key": {
                  "type": "string",
                  "description": "The key of the product field"
                },
                "add_time": {
                  "type": "string",
                  "description": "The product field creation time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "order_nr": {
                  "type": "integer",
                  "description": "The position (index) of the product field in the detail view"
                },
                "edit_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field name and metadata is editable"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is currently active"
                },
                "update_time": {
                  "type": "string",
                  "description": "The product field last update time. Format: YYYY-MM-DD HH:MM:SS"
                },
                "sortable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is sortable"
                },
                "important_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is marked as important"
                },
                "mandatory_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is mandatory when creating products"
                },
                "searchable_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is searchable"
                },
                "add_visible_flag": {
                  "type": "boolean",
                  "description": "Whether or not the product field is visible in the Add Product Modal"
                },
                "bulk_edit_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field data can be edited"
                },
                "filtering_allowed": {
                  "type": "boolean",
                  "description": "Whether or not the product field value can be used when filtering searches"
                },
                "last_updated_by_user_id": {
                  "type": "integer",
                  "description": "The ID of the last user to update the product field"
                }
              }
            }
          ],
          "title": "productField"
        }
      ],
      "description": "All data for the product field"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductsAddFollowerRequest
{
  "type": "object",
  "title": "addProductFollowerRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object ProductsAddFollowerResponse
{
  "type": "object",
  "title": "newFollowerResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the follower"
        },
        "user_id": {
          "type": "integer",
          "description": "The ID of the user that was added as follower"
        },
        "add_time": {
          "type": "string",
          "description": "The follower creation time. Format: YYYY-MM-DD HH:MM:SS"
        },
        "product_id": {
          "type": "integer",
          "description": "The ID of the product"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductsCreateProductRequest
{
  "allOf": [
    {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the product"
        }
      }
    },
    {
      "type": "object",
      "title": "productRequest",
      "required": [
        "name"
      ],
      "properties": {
        "tax": {
          "type": "number",
          "default": 0,
          "description": "The tax percentage"
        },
        "code": {
          "type": "string",
          "description": "The product code"
        },
        "unit": {
          "type": "string",
          "description": "The unit in which this product is sold"
        },
        "prices": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company's currency will be assigned."
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used."
        },
        "selectable": {
          "type": "boolean",
          "default": true,
          "description": "Whether this product can be selected in deals or not"
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "active_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether this product will be made active or not"
        }
      }
    }
  ],
  "title": "addProductRequest"
}
object ProductsCreateProductResponse
{
  "type": "object",
  "title": "getproductResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "The ID of the product"
            },
            "tax": {
              "type": "number",
              "default": 0,
              "description": "The ax percentage"
            },
            "code": {
              "type": "string",
              "description": "The product code"
            },
            "name": {
              "type": "string",
              "description": "The name of the product"
            },
            "unit": {
              "type": "string",
              "description": "The unit in which this product is sold"
            },
            "owner_id": {
              "type": "object",
              "description": "Information about the Pipedrive user who owns the product"
            },
            "selectable": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is selected in deals or not"
            },
            "visible_to": {
              "allOf": [
                {
                  "enum": [
                    "1",
                    "3",
                    "5",
                    "7"
                  ],
                  "type": "string"
                }
              ],
              "description": "Visibility of the product"
            },
            "active_flag": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is active or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "prices": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)"
            }
          }
        }
      ]
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ProductsDeleteFollowerResponse
{
  "type": "object",
  "title": "deleteProductFollowerResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "allOf": [
            {
              "type": "integer"
            }
          ],
          "description": "The ID of the removed follower"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductsGetAllProductsResponse
{
  "type": "object",
  "title": "getProductsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "getproductResponse200",
        "properties": {
          "data": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "The ID of the product"
                  },
                  "tax": {
                    "type": "number",
                    "default": 0,
                    "description": "The ax percentage"
                  },
                  "code": {
                    "type": "string",
                    "description": "The product code"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the product"
                  },
                  "unit": {
                    "type": "string",
                    "description": "The unit in which this product is sold"
                  },
                  "owner_id": {
                    "type": "object",
                    "description": "Information about the Pipedrive user who owns the product"
                  },
                  "selectable": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether this product is selected in deals or not"
                  },
                  "visible_to": {
                    "allOf": [
                      {
                        "enum": [
                          "1",
                          "3",
                          "5",
                          "7"
                        ],
                        "type": "string"
                      }
                    ],
                    "description": "Visibility of the product"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether this product is active or not"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "prices": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)"
                  }
                }
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "If the response is successful or not"
          },
          "related_objects": {
            "type": "object",
            "properties": {
              "deal": {
                "type": "object",
                "properties": {
                  "DEAL_ID": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal associated with the item"
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the deal associated with the item"
                      },
                      "value": {
                        "type": "number",
                        "description": "The value of the deal that is associated with the item"
                      },
                      "status": {
                        "type": "string",
                        "description": "The status of the deal associated with the item"
                      },
                      "currency": {
                        "type": "string",
                        "description": "The currency of the deal value"
                      },
                      "stage_id": {
                        "type": "integer",
                        "description": "The ID of the stage the deal is currently at"
                      },
                      "pipeline_id": {
                        "type": "integer",
                        "description": "The ID of the pipeline the deal is in"
                      }
                    },
                    "description": "The ID of the deal which is associated with the item"
                  }
                }
              },
              "user": {
                "type": "object",
                "properties": {
                  "USER_ID": {
                    "type": "object",
                    "allOf": [
                      {
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the user"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user"
                          },
                          "email": {
                            "type": "string",
                            "description": "The email of the user"
                          },
                          "has_pic": {
                            "type": "integer",
                            "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                          },
                          "pic_hash": {
                            "type": "string",
                            "nullable": true,
                            "description": "The user picture hash"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the user is active or not"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "description": "The ID of the user"
                      }
                    ],
                    "title": "userDataWithId"
                  }
                }
              },
              "person": {
                "type": "object",
                "properties": {
                  "PERSON_ID": {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the person associated with the item"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the person associated with the item"
                          },
                          "email": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the email"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The email of the associated person"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "Whether this is the primary email or not"
                                }
                              }
                            },
                            "description": "The emails of the person associated with the item"
                          },
                          "phone": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the phone number"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The phone number of the person associated with the item"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "Whether this is the primary phone number or not"
                                }
                              }
                            },
                            "description": "The phone numbers of the person associated with the item"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the person that is associated with the item"
                          }
                        }
                      }
                    ],
                    "description": "The ID of the person associated with the item"
                  }
                }
              },
              "organization": {
                "type": "object",
                "properties": {
                  "ORGANIZATION_ID": {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the organization associated with the item"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the organization associated with the item"
                          },
                          "address": {
                            "type": "string",
                            "description": "The address of the organization"
                          },
                          "cc_email": {
                            "type": "string",
                            "description": "The BCC email of the organization associated with the item"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the organization that is associated with the item"
                          },
                          "people_count": {
                            "type": "integer",
                            "description": "The number of people connected with the organization that is associated with the item"
                          }
                        }
                      }
                    ],
                    "description": "The ID of the organization associated with the item"
                  }
                }
              }
            }
          }
        }
      },
      "description": "Array containing data for all products"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ProductsGetDealsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the deal"
                  },
                  "org_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the organization associated with the deal"
                          },
                          "address": {
                            "type": "string",
                            "description": "The address of the organization that is associated with the deal"
                          },
                          "cc_email": {
                            "type": "string",
                            "description": "The BCC email of the organization associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the organization that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated organization is active or not"
                          },
                          "people_count": {
                            "type": "integer",
                            "description": "The number of people connected with the organization that is associated with the deal"
                          }
                        },
                        "description": "The organization which is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the organization associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealOrganizationDataWithId"
                  },
                  "user_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the user"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user"
                          },
                          "email": {
                            "type": "string",
                            "description": "The email of the user"
                          },
                          "has_pic": {
                            "type": "boolean",
                            "description": "If the user has a picture or not"
                          },
                          "pic_hash": {
                            "type": "string",
                            "nullable": true,
                            "description": "The user picture hash"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the user is active or not"
                          }
                        },
                        "description": "The user who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the user"
                          }
                        }
                      }
                    ],
                    "title": "dealUserDataWithId"
                  },
                  "person_id": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the person associated with the deal"
                          },
                          "email": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the email"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The email of the associated person"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary email or not"
                                }
                              }
                            },
                            "description": "The emails of the person associated with the deal"
                          },
                          "phone": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "The type of the phone number"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "The phone number of the person associated with the deal"
                                },
                                "primary": {
                                  "type": "boolean",
                                  "description": "If this is the primary phone number or not"
                                }
                              }
                            },
                            "description": "The phone numbers of the person associated with the deal"
                          },
                          "owner_id": {
                            "type": "integer",
                            "description": "The ID of the owner of the person that is associated with the deal"
                          },
                          "active_flag": {
                            "type": "boolean",
                            "description": "Whether the associated person is active or not"
                          }
                        },
                        "description": "The person who is associated with the deal"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "integer",
                            "description": "The ID of the person associated with the deal"
                          }
                        }
                      }
                    ],
                    "title": "dealPersonDataWithId"
                  },
                  "creator_user_id": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the deal creator"
                      },
                      "email": {
                        "type": "string",
                        "description": "The email of the deal creator"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      },
                      "has_pic": {
                        "type": "boolean",
                        "description": "If the creator has a picture or not"
                      },
                      "pic_hash": {
                        "type": "string",
                        "nullable": true,
                        "description": "The creator picture hash"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the creator is active or not"
                      }
                    },
                    "description": "The creator of the deal"
                  }
                }
              },
              {
                "type": "object",
                "title": "baseDeal",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The label or multiple labels assigned to the deal"
                  },
                  "title": {
                    "type": "string",
                    "description": "The title of the deal"
                  },
                  "value": {
                    "type": "number",
                    "description": "The value of the deal"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the deal is active or not"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status of the deal"
                  },
                  "deleted": {
                    "type": "boolean",
                    "description": "Whether the deal is deleted or not"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the deal"
                  },
                  "cc_email": {
                    "type": "string",
                    "description": "The BCC email of the deal"
                  },
                  "currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the deal"
                  },
                  "stage_id": {
                    "type": "integer",
                    "description": "The ID of the deal stage"
                  },
                  "won_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as won"
                  },
                  "lost_time": {
                    "type": "string",
                    "description": "The date and time of changing the deal status as lost"
                  },
                  "close_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of closing the deal"
                  },
                  "org_hidden": {
                    "type": "boolean",
                    "description": "If the organization that is associated with the deal is hidden or not"
                  },
                  "owner_name": {
                    "type": "string",
                    "description": "The name of the deal owner"
                  },
                  "visible_to": {
                    "type": "string",
                    "description": "The visibility of the deal"
                  },
                  "files_count": {
                    "type": "integer",
                    "description": "The number of files associated with the deal"
                  },
                  "lost_reason": {
                    "type": "string",
                    "nullable": true,
                    "description": "The reason for losing the deal"
                  },
                  "notes_count": {
                    "type": "integer",
                    "description": "The number of notes associated with the deal"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person associated with the deal"
                  },
                  "pipeline_id": {
                    "type": "integer",
                    "description": "The ID of the pipeline associated with the deal"
                  },
                  "probability": {
                    "type": "number",
                    "nullable": true,
                    "description": "The success probability percentage of the deal"
                  },
                  "rotten_time": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date and time of changing the deal status as rotten"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal"
                  },
                  "person_hidden": {
                    "type": "boolean",
                    "description": "If the person that is associated with the deal is hidden or not"
                  },
                  "first_won_time": {
                    "type": "string",
                    "description": "The date and time of the first time changing the deal status as won"
                  },
                  "products_count": {
                    "type": "integer",
                    "description": "The number of products associated with the deal"
                  },
                  "stage_order_nr": {
                    "type": "integer",
                    "description": "The order number of the deal stage associated with the deal"
                  },
                  "weighted_value": {
                    "type": "number",
                    "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                  },
                  "followers_count": {
                    "type": "integer",
                    "description": "The number of followers associated with the deal"
                  },
                  "formatted_value": {
                    "type": "string",
                    "description": "The deal value formatted with selected currency. E.g. US$500"
                  },
                  "activities_count": {
                    "type": "integer",
                    "description": "The number of activities associated with the deal"
                  },
                  "last_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the last activity associated with the deal"
                  },
                  "next_activity_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "The ID of the next activity associated with the deal"
                  },
                  "stage_change_time": {
                    "type": "string",
                    "description": "The last updated date and time of the deal stage"
                  },
                  "last_activity_date": {
                    "type": "string",
                    "nullable": true,
                    "description": "The date of the last activity associated with the deal"
                  },
                  "next_activity_date": {
                    "type": "string",
                    "description": "The date of the next activity associated with the deal"
                  },
                  "next_activity_note": {
                    "type": "string",
                    "description": "The note of the next activity associated with the deal"
                  },
                  "next_activity_time": {
                    "type": "string",
                    "description": "The time of the next activity associated with the deal"
                  },
                  "next_activity_type": {
                    "type": "string",
                    "description": "The type of the next activity associated with the deal"
                  },
                  "participants_count": {
                    "type": "integer",
                    "description": "The number of participants associated with the deal"
                  },
                  "expected_close_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The expected close date of the deal"
                  },
                  "email_messages_count": {
                    "type": "integer",
                    "description": "The number of emails associated with the deal"
                  },
                  "done_activities_count": {
                    "type": "integer",
                    "description": "The number of completed activities associated with the deal"
                  },
                  "next_activity_subject": {
                    "type": "string",
                    "description": "The subject of the next activity associated with the deal"
                  },
                  "next_activity_duration": {
                    "type": "string",
                    "description": "The duration of the next activity associated with the deal"
                  },
                  "last_incoming_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last incoming email associated with the deal"
                  },
                  "last_outgoing_mail_time": {
                    "type": "string",
                    "description": "The date and time of the last outgoing email associated with the deal"
                  },
                  "undone_activities_count": {
                    "type": "integer",
                    "description": "The number of incomplete activities associated with the deal"
                  },
                  "weighted_value_currency": {
                    "type": "string",
                    "description": "The currency associated with the deal"
                  },
                  "formatted_weighted_value": {
                    "type": "string",
                    "description": "The weighted_value formatted with selected currency. E.g. US$500"
                  }
                }
              }
            ],
            "title": "dealNonStrict"
          },
          "description": "The array of deals"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "related_objects": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "USER_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the user"
                        },
                        "has_pic": {
                          "type": "integer",
                          "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                        },
                        "pic_hash": {
                          "type": "string",
                          "nullable": true,
                          "description": "The user picture hash"
                        },
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the user is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "The ID of the user"
                    }
                  ],
                  "title": "userDataWithId"
                }
              }
            },
            "stage": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the stage"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the stage"
                },
                "add_time": {
                  "type": "string",
                  "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of the stage"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the stage is active or deleted"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline to add the stage to"
                },
                "rotten_days": {
                  "type": "integer",
                  "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
                },
                "rotten_flag": {
                  "type": "boolean",
                  "description": "Whether deals in this stage can become rotten"
                },
                "update_time": {
                  "type": "string",
                  "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "integer",
                  "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
                }
              }
            },
            "person": {
              "type": "object",
              "properties": {
                "PERSON_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated person is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "The ID of the person associated with the item"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the person associated with the item"
                        },
                        "email": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the email"
                              },
                              "value": {
                                "type": "string",
                                "description": "The email of the associated person"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary email or not"
                              }
                            }
                          },
                          "description": "The emails of the person associated with the item"
                        },
                        "phone": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The type of the phone number"
                              },
                              "value": {
                                "type": "string",
                                "description": "The phone number of the person associated with the item"
                              },
                              "primary": {
                                "type": "boolean",
                                "description": "Whether this is the primary phone number or not"
                              }
                            }
                          },
                          "description": "The phone numbers of the person associated with the item"
                        },
                        "owner_id": {
                          "type": "integer",
                          "description": "The ID of the owner of the person that is associated with the item"
                        }
                      }
                    }
                  ],
                  "description": "The ID of the person associated with the item"
                }
              }
            },
            "pipeline": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the pipeline"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the pipeline"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether this pipeline will be made inactive (hidden) or active"
                },
                "add_time": {
                  "type": "string",
                  "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "order_nr": {
                  "type": "integer",
                  "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                },
                "url_title": {
                  "type": "string",
                  "description": "The pipeline title displayed in the URL"
                },
                "update_time": {
                  "type": "string",
                  "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                },
                "deal_probability": {
                  "type": "boolean",
                  "description": "Whether deal probability is disabled or enabled for this pipeline"
                }
              }
            },
            "organization": {
              "type": "object",
              "properties": {
                "ORGANIZATION_ID": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "active_flag": {
                          "type": "boolean",
                          "description": "Whether the associated organization is active or not"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "The ID of the organization associated with the item"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the organization associated with the item"
                            },
                            "address": {
                              "type": "string",
                              "description": "The address of the organization"
                            },
                            "cc_email": {
                              "type": "string",
                              "description": "The BCC email of the organization associated with the item"
                            },
                            "owner_id": {
                              "type": "integer",
                              "description": "The ID of the owner of the organization that is associated with the item"
                            },
                            "people_count": {
                              "type": "integer",
                              "description": "The number of people connected with the organization that is associated with the item"
                            }
                          }
                        }
                      ],
                      "description": "The ID of the organization associated with the item"
                    }
                  ],
                  "description": "The ID of the organization associated with the item"
                }
              }
            }
          }
        }
      }
    }
  ],
  "title": "getAssociatedDealsResponse200"
}
object ProductsGetDetailsResponse
{
  "type": "object",
  "title": "getproductResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "The ID of the product"
            },
            "tax": {
              "type": "number",
              "default": 0,
              "description": "The ax percentage"
            },
            "code": {
              "type": "string",
              "description": "The product code"
            },
            "name": {
              "type": "string",
              "description": "The name of the product"
            },
            "unit": {
              "type": "string",
              "description": "The unit in which this product is sold"
            },
            "owner_id": {
              "type": "object",
              "description": "Information about the Pipedrive user who owns the product"
            },
            "selectable": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is selected in deals or not"
            },
            "visible_to": {
              "allOf": [
                {
                  "enum": [
                    "1",
                    "3",
                    "5",
                    "7"
                  ],
                  "type": "string"
                }
              ],
              "description": "Visibility of the product"
            },
            "active_flag": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is active or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "prices": {
              "type": "array",
              "items": {
                "type": "object"
              },
              "description": "Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)"
            }
          }
        }
      ]
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ProductsListPermittedUsersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object ProductsListProductFilesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the file"
              },
              "url": {
                "type": "string",
                "description": "The URL to download the file"
              },
              "name": {
                "type": "string",
                "description": "The visible name of the file"
              },
              "add_time": {
                "type": "string",
                "description": "The UTC date time when the file was uploaded. Format: YYYY-MM-DD HH:MM:SS"
              },
              "file_name": {
                "type": "string",
                "description": "The original name of the file"
              },
              "file_size": {
                "type": "integer",
                "description": "The size of the file in bytes"
              },
              "remote_id": {
                "type": "string",
                "description": "The ID of the remote item"
              },
              "s3_bucket": {
                "type": "string",
                "description": "The location of the cloud storage"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product associated with the file"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the user is active or not."
              },
              "description": {
                "type": "string",
                "description": "The description of the file"
              },
              "inline_flag": {
                "type": "boolean",
                "description": "Whether the file was uploaded as inline or not"
              },
              "update_time": {
                "type": "string",
                "description": "The UTC date time when the file was last updated. Format: YYYY-MM-DD HH:MM:SS"
              },
              "product_name": {
                "type": "string",
                "description": "The name of the product associated with the file"
              },
              "remote_location": {
                "type": "string",
                "description": "The location type to send the file to. Only googledrive is supported at the moment."
              }
            },
            "description": "The file data"
          },
          "description": "The array of files"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getAssociatedFilesResponse200"
}
object ProductsListProductFollowersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the user follower"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the follower was added to the person"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product"
              }
            }
          },
          "description": "The list of followers"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        }
      }
    }
  ],
  "title": "getProductFollowersResponseSuccess"
}
object ProductsMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteProductResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "allOf": [
            {
              "type": "integer"
            }
          ],
          "description": "The ID of the removed product"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object ProductsSearchByFieldsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the product"
                      },
                      "code": {
                        "type": "integer",
                        "description": "The code of the product"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the product"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the item"
                      },
                      "owner": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "The ID of the owner of the product"
                          }
                        }
                      },
                      "visible_to": {
                        "type": "integer",
                        "description": "The visibility of the product"
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The custom fields"
                      }
                    }
                  },
                  "result_score": {
                    "type": "number",
                    "description": "Search result relevancy"
                  }
                }
              },
              "description": "The array of found items"
            }
          }
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "next_start": {
                  "type": "integer",
                  "description": "Next pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "Pagination details of the list"
            }
          }
        }
      }
    }
  ],
  "title": "searchProductsResponse200"
}
object ProductsUpdateProductDataRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the product"
        }
      }
    },
    {
      "type": "object",
      "title": "productRequest",
      "required": [
        "name"
      ],
      "properties": {
        "tax": {
          "type": "number",
          "default": 0,
          "description": "The tax percentage"
        },
        "code": {
          "type": "string",
          "description": "The product code"
        },
        "unit": {
          "type": "string",
          "description": "The unit in which this product is sold"
        },
        "prices": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company's currency will be assigned."
        },
        "owner_id": {
          "type": "integer",
          "description": "The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used."
        },
        "selectable": {
          "type": "boolean",
          "default": true,
          "description": "Whether this product can be selected in deals or not"
        },
        "visible_to": {
          "type": "string",
          "allOf": [
            {
              "enum": [
                "1",
                "3",
                "5",
                "7"
              ],
              "type": "string"
            }
          ],
          "description": "The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>"
        },
        "active_flag": {
          "type": "boolean",
          "default": true,
          "description": "Whether this product will be made active or not"
        }
      }
    }
  ],
  "title": "addProductRequest"
}
object ProductsUpdateProductDataResponse
{
  "type": "object",
  "title": "updateProductResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "The ID of the product"
            },
            "tax": {
              "type": "number",
              "default": 0,
              "description": "The ax percentage"
            },
            "code": {
              "type": "string",
              "description": "The product code"
            },
            "name": {
              "type": "string",
              "description": "The name of the product"
            },
            "unit": {
              "type": "string",
              "description": "The unit in which this product is sold"
            },
            "owner_id": {
              "type": "object",
              "description": "Information about the Pipedrive user who owns the product"
            },
            "selectable": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is selected in deals or not"
            },
            "visible_to": {
              "allOf": [
                {
                  "enum": [
                    "1",
                    "3",
                    "5",
                    "7"
                  ],
                  "type": "string"
                }
              ],
              "description": "Visibility of the product"
            },
            "active_flag": {
              "type": "boolean",
              "default": true,
              "description": "Whether this product is active or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "prices": {
              "type": "object",
              "description": "Object of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)"
            }
          }
        }
      ]
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "related_objects": {
      "type": "object",
      "properties": {
        "deal": {
          "type": "object",
          "properties": {
            "DEAL_ID": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the deal associated with the item"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the deal associated with the item"
                },
                "value": {
                  "type": "number",
                  "description": "The value of the deal that is associated with the item"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the deal associated with the item"
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the deal value"
                },
                "stage_id": {
                  "type": "integer",
                  "description": "The ID of the stage the deal is currently at"
                },
                "pipeline_id": {
                  "type": "integer",
                  "description": "The ID of the pipeline the deal is in"
                }
              },
              "description": "The ID of the deal which is associated with the item"
            }
          }
        },
        "user": {
          "type": "object",
          "properties": {
            "USER_ID": {
              "type": "object",
              "allOf": [
                {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the user"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the user"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email of the user"
                    },
                    "has_pic": {
                      "type": "integer",
                      "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                    },
                    "pic_hash": {
                      "type": "string",
                      "nullable": true,
                      "description": "The user picture hash"
                    },
                    "active_flag": {
                      "type": "boolean",
                      "description": "Whether the user is active or not"
                    }
                  }
                },
                {
                  "type": "object",
                  "description": "The ID of the user"
                }
              ],
              "title": "userDataWithId"
            }
          }
        },
        "person": {
          "type": "object",
          "properties": {
            "PERSON_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the person associated with the item"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the person associated with the item"
                    },
                    "email": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The email of the associated person"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary email or not"
                          }
                        }
                      },
                      "description": "The emails of the person associated with the item"
                    },
                    "phone": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The type of the phone number"
                          },
                          "value": {
                            "type": "string",
                            "description": "The phone number of the person associated with the item"
                          },
                          "primary": {
                            "type": "boolean",
                            "description": "Whether this is the primary phone number or not"
                          }
                        }
                      },
                      "description": "The phone numbers of the person associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the person that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the person associated with the item"
            }
          }
        },
        "organization": {
          "type": "object",
          "properties": {
            "ORGANIZATION_ID": {
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The ID of the organization associated with the item"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the organization associated with the item"
                    },
                    "address": {
                      "type": "string",
                      "description": "The address of the organization"
                    },
                    "cc_email": {
                      "type": "string",
                      "description": "The BCC email of the organization associated with the item"
                    },
                    "owner_id": {
                      "type": "integer",
                      "description": "The ID of the owner of the organization that is associated with the item"
                    },
                    "people_count": {
                      "type": "integer",
                      "description": "The number of people connected with the organization that is associated with the item"
                    }
                  }
                }
              ],
              "description": "The ID of the organization associated with the item"
            }
          }
        }
      }
    }
  }
}
object ProjectTemplatesGetAllTemplatesResponse
{
  "type": "object",
  "title": "getProjectTemplatesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of a template"
              },
              "title": {
                "type": "string",
                "description": "The title of a template"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "owner_id": {
                "type": "number",
                "description": "The ID of a template owner"
              },
              "description": {
                "type": "string",
                "description": "The description of a template"
              },
              "update_time": {
                "type": "string",
                "description": "The update date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "projects_board_id": {
                "type": "number",
                "description": "The ID of the project board this template is associated with"
              }
            }
          }
        ],
        "title": "templateResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object ProjectTemplatesGetBoardDetailsResponse
{
  "type": "object",
  "title": "getProjectBoardResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the project board"
        },
        "name": {
          "type": "string",
          "description": "Name of a project board"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
        },
        "order_nr": {
          "type": "number",
          "description": "The order of a board"
        },
        "update_time": {
          "type": "string",
          "description": "The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectTemplatesGetDetailsResponse
{
  "type": "object",
  "title": "getProjectTemplateResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "The ID of a template"
            },
            "title": {
              "type": "string",
              "description": "The title of a template"
            },
            "add_time": {
              "type": "string",
              "description": "The creation date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "owner_id": {
              "type": "number",
              "description": "The ID of a template owner"
            },
            "description": {
              "type": "string",
              "description": "The description of a template"
            },
            "update_time": {
              "type": "string",
              "description": "The update date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS."
            },
            "projects_board_id": {
              "type": "number",
              "description": "The ID of the project board this template is associated with"
            }
          }
        }
      ],
      "title": "templateResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectTemplatesGetPhaseDetailsResponse
{
  "type": "object",
  "title": "getProjectPhaseResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the project phase"
        },
        "name": {
          "type": "string",
          "description": "Name of a project phase"
        },
        "add_time": {
          "type": "string",
          "description": "The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
        },
        "board_id": {
          "type": "number",
          "description": "The ID of the project board this phase is linked to"
        },
        "order_nr": {
          "type": "number",
          "description": "The order of a phase"
        },
        "update_time": {
          "type": "string",
          "description": "The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsArchiveProjectResponse
{
  "type": "object",
  "title": "updateProjectResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the project, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the project"
                },
                "board_id": {
                  "type": "number",
                  "description": "The ID of the board this project is associated with"
                },
                "phase_id": {
                  "type": "number",
                  "description": "The ID of the phase this project is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the labels this project has"
                },
                "org_id": {
                  "type": "number",
                  "description": "The ID of the organization this project is associated with"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the project"
                },
                "deal_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the deals this project is associated with"
                },
                "end_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The end date of the project. Format: YYYY-MM-DD."
                },
                "owner_id": {
                  "type": "number",
                  "description": "The ID of a project owner"
                },
                "person_id": {
                  "type": "number",
                  "description": "The ID of the person this project is associated with"
                },
                "start_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The start date of the project. Format: YYYY-MM-DD."
                },
                "description": {
                  "type": "string",
                  "description": "The description of the project"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "archive_time": {
                  "type": "string",
                  "description": "The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then 'null'."
                },
                "status_change_time": {
                  "type": "string",
                  "description": "The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "fullProjectObject"
        }
      ],
      "title": "projectResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsCreateProjectRequest
{
  "allOf": [
    {
      "type": "object",
      "title": "requiredPostProjectParameters",
      "required": [
        "title",
        "board_id",
        "phase_id"
      ],
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the project"
        },
        "board_id": {
          "type": "number",
          "description": "The ID of a project board"
        },
        "phase_id": {
          "type": "number",
          "description": "The ID of a phase on a project board"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of IDs of the labels this project has"
        },
        "org_id": {
          "type": "number",
          "description": "The ID of the organization this project is associated with"
        },
        "status": {
          "type": "string",
          "description": "The status of the project"
        },
        "deal_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of IDs of the deals this project is associated with"
        },
        "end_date": {
          "type": "string",
          "format": "date",
          "description": "The end date of the project. Format: YYYY-MM-DD."
        },
        "owner_id": {
          "type": "number",
          "description": "The ID of a project owner"
        },
        "person_id": {
          "type": "number",
          "description": "The ID of the person this project is associated with"
        },
        "start_date": {
          "type": "string",
          "format": "date",
          "description": "The start date of the project. Format: YYYY-MM-DD."
        },
        "description": {
          "type": "string",
          "description": "The description of the project"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "template_id": {
          "type": "number",
          "description": "The ID of the template the project will be based on"
        }
      }
    }
  ],
  "title": "addProjectRequest"
}
object ProjectsCreateProjectResponse
{
  "type": "object",
  "title": "addProjectResponse201",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the project, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the project"
                },
                "board_id": {
                  "type": "number",
                  "description": "The ID of the board this project is associated with"
                },
                "phase_id": {
                  "type": "number",
                  "description": "The ID of the phase this project is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the labels this project has"
                },
                "org_id": {
                  "type": "number",
                  "description": "The ID of the organization this project is associated with"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the project"
                },
                "deal_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the deals this project is associated with"
                },
                "end_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The end date of the project. Format: YYYY-MM-DD."
                },
                "owner_id": {
                  "type": "number",
                  "description": "The ID of a project owner"
                },
                "person_id": {
                  "type": "number",
                  "description": "The ID of the person this project is associated with"
                },
                "start_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The start date of the project. Format: YYYY-MM-DD."
                },
                "description": {
                  "type": "string",
                  "description": "The description of the project"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "archive_time": {
                  "type": "string",
                  "description": "The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then 'null'."
                },
                "status_change_time": {
                  "type": "string",
                  "description": "The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "fullProjectObject"
        }
      ],
      "title": "projectResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetAllBoardsResponse
{
  "type": "object",
  "title": "getProjectBoardsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the project board"
          },
          "name": {
            "type": "string",
            "description": "Name of a project board"
          },
          "add_time": {
            "type": "string",
            "description": "The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "order_nr": {
            "type": "number",
            "description": "The order of a board"
          },
          "update_time": {
            "type": "string",
            "description": "The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetAllProjectsResponse
{
  "type": "object",
  "title": "getProjectsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the project, generated when the task was created"
              }
            }
          },
          {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title of the project"
                  },
                  "board_id": {
                    "type": "number",
                    "description": "The ID of the board this project is associated with"
                  },
                  "phase_id": {
                    "type": "number",
                    "description": "The ID of the phase this project is associated with"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "An array of IDs of the labels this project has"
                  },
                  "org_id": {
                    "type": "number",
                    "description": "The ID of the organization this project is associated with"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status of the project"
                  },
                  "deal_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "An array of IDs of the deals this project is associated with"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The end date of the project. Format: YYYY-MM-DD."
                  },
                  "owner_id": {
                    "type": "number",
                    "description": "The ID of a project owner"
                  },
                  "person_id": {
                    "type": "number",
                    "description": "The ID of the person this project is associated with"
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The start date of the project. Format: YYYY-MM-DD."
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the project"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "archive_time": {
                    "type": "string",
                    "description": "The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then 'null'."
                  },
                  "status_change_time": {
                    "type": "string",
                    "description": "The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  }
                }
              }
            ],
            "title": "fullProjectObject"
          }
        ],
        "title": "projectResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object ProjectsGetDetailsResponse
{
  "type": "object",
  "title": "getProjectResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the project, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the project"
                },
                "board_id": {
                  "type": "number",
                  "description": "The ID of the board this project is associated with"
                },
                "phase_id": {
                  "type": "number",
                  "description": "The ID of the phase this project is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the labels this project has"
                },
                "org_id": {
                  "type": "number",
                  "description": "The ID of the organization this project is associated with"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the project"
                },
                "deal_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the deals this project is associated with"
                },
                "end_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The end date of the project. Format: YYYY-MM-DD."
                },
                "owner_id": {
                  "type": "number",
                  "description": "The ID of a project owner"
                },
                "person_id": {
                  "type": "number",
                  "description": "The ID of the person this project is associated with"
                },
                "start_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The start date of the project. Format: YYYY-MM-DD."
                },
                "description": {
                  "type": "string",
                  "description": "The description of the project"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "archive_time": {
                  "type": "string",
                  "description": "The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then 'null'."
                },
                "status_change_time": {
                  "type": "string",
                  "description": "The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "fullProjectObject"
        }
      ],
      "title": "projectResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetGroupsResponse
{
  "type": "object",
  "title": "getProjectGroupsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of the group"
          },
          "name": {
            "type": "string",
            "description": "Name of the group"
          },
          "order_nr": {
            "type": "number",
            "description": "Order number of the group"
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetPhasesResponse
{
  "type": "object",
  "title": "getProjectPhasesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the project phase"
          },
          "name": {
            "type": "string",
            "description": "Name of a project phase"
          },
          "add_time": {
            "type": "string",
            "description": "The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
          },
          "board_id": {
            "type": "number",
            "description": "The ID of the project board this phase is linked to"
          },
          "order_nr": {
            "type": "number",
            "description": "The order of a phase"
          },
          "update_time": {
            "type": "string",
            "description": "The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS."
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetProjectActivitiesResponse
{
  "type": "object",
  "title": "getActivitiesCollectionResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization this activity is associated with"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal this activity is associated with"
              },
              "lead_id": {
                "type": "string",
                "format": "uuid",
                "nullable": true,
                "description": "The ID of the lead in the UUID format this activity is associated with"
              },
              "due_date": {
                "type": "string",
                "format": "date",
                "description": "The due date of the activity. Format: YYYY-MM-DD"
              },
              "due_time": {
                "type": "string",
                "description": "The due time of the activity in UTC. Format: HH:MM"
              },
              "duration": {
                "type": "string",
                "description": "The duration of the activity. Format: HH:MM"
              },
              "location": {
                "type": "string",
                "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person this activity is associated with"
              },
              "project_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the project this activity is associated with"
              },
              "public_description": {
                "type": "string",
                "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the activity, generated when the activity was created"
              },
              "done": {
                "type": "boolean",
                "description": "Whether the activity is done or not"
              },
              "type": {
                "type": "string",
                "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
              },
              "subject": {
                "type": "string",
                "description": "The subject of the activity"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user whom the activity is assigned to"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
              },
              "busy_flag": {
                "type": "boolean",
                "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
              },
              "company_id": {
                "type": "integer",
                "description": "The user's company ID"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the activity is active or not"
              },
              "update_time": {
                "type": "string",
                "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
              },
              "location_route": {
                "type": "string",
                "description": "A subfield of the location field. Indicates street name."
              },
              "update_user_id": {
                "type": "integer",
                "description": "The ID of the user who was the last to update this activity"
              },
              "source_timezone": {
                "type": "string",
                "description": "The timezone the activity was created in an external calendar"
              },
              "location_country": {
                "type": "string",
                "description": "A subfield of the location field. Indicates country."
              },
              "location_locality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates city/town/village/locality."
              },
              "location_subpremise": {
                "type": "string",
                "description": "A subfield of the location field. Indicates apartment/suite number."
              },
              "marked_as_done_time": {
                "type": "string",
                "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
              },
              "location_postal_code": {
                "type": "string",
                "description": "A subfield of the location field. Indicates ZIP/postal code."
              },
              "location_sublocality": {
                "type": "string",
                "description": "A subfield of the location field. Indicates district/sublocality."
              },
              "conference_meeting_id": {
                "type": "string",
                "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
              },
              "conference_meeting_url": {
                "type": "string",
                "description": "The link to join the meeting which is associated with this activity"
              },
              "location_street_number": {
                "type": "string",
                "description": "A subfield of the location field. Indicates house number."
              },
              "conference_meeting_client": {
                "type": "string",
                "description": "The ID of the Marketplace app, which is connected to this activity"
              },
              "location_formatted_address": {
                "type": "string",
                "description": "A subfield of the location field. Indicates full/combined address."
              },
              "location_admin_area_level_1": {
                "type": "string",
                "description": "A subfield of the location field. Indicates state/county."
              },
              "location_admin_area_level_2": {
                "type": "string",
                "description": "A subfield of the location field. Indicates region."
              }
            }
          }
        ],
        "title": "activityCollectionResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object ProjectsGetProjectPlanResponse
{
  "type": "object",
  "title": "getProjectPlanResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item_id": {
            "type": "number",
            "description": "ID of plan item (either activity or task ID)"
          },
          "group_id": {
            "type": "number",
            "description": "The ID of the board this project is associated with. If null then plan item is not in any group."
          },
          "phase_id": {
            "type": "number",
            "description": "The ID of the board this project is associated with. If null then plan item is not in any phase."
          },
          "item_type": {
            "type": "string",
            "description": "Type of a plan item (task / activity)"
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsGetProjectTasksResponse
{
  "type": "object",
  "title": "getTasksResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the task, generated when the task was created"
              }
            }
          },
          {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title of the task"
                  },
                  "project_id": {
                    "type": "number",
                    "description": "The ID of the project this task is associated with"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "done": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBoolean"
                      }
                    ],
                    "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The due date of the task. Format: YYYY-MM-DD."
                  },
                  "assignee_id": {
                    "type": "number",
                    "description": "The ID of the user who will be the assignee of the task"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the task"
                  },
                  "parent_task_id": {
                    "type": "number",
                    "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "creator_id": {
                    "type": "number",
                    "description": "The creator of a task"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "marked_as_done_time": {
                    "type": "string",
                    "description": "The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  }
                }
              }
            ],
            "title": "updateProjectRequest"
          }
        ],
        "title": "taskResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object ProjectsMarkAsDeletedResponse
{
  "type": "object",
  "title": "deleteProjectResponse200",
  "properties": {
    "data": {
      "type": "object",
      "title": "deleteProject",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the project that was deleted"
            }
          }
        },
        "success": {
          "type": "boolean",
          "description": "If the request was successful or not"
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsUpdatePlanTaskRequest
{
  "type": "object",
  "title": "projectPutPlanItemBodyObject",
  "properties": {
    "group_id": {
      "type": "number",
      "description": "The ID of a group on a project board"
    },
    "phase_id": {
      "type": "number",
      "description": "The ID of a phase on a project board"
    }
  }
}
object ProjectsUpdatePlanTaskResponse
{
  "type": "object",
  "title": "updatedTaskPlanItem_200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "number",
          "description": "ID of plan item (either activity or task ID)"
        },
        "group_id": {
          "type": "number",
          "description": "The ID of the board this project is associated with. If null then plan item is not in any group."
        },
        "phase_id": {
          "type": "number",
          "description": "The ID of the board this project is associated with. If null then plan item is not in any phase."
        },
        "item_type": {
          "type": "string",
          "description": "Type of a plan item (task / activity)"
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsUpdateProjectPlanActivityRequest
{
  "type": "object",
  "title": "projectPutPlanItemBodyObject",
  "properties": {
    "group_id": {
      "type": "number",
      "description": "The ID of a group on a project board"
    },
    "phase_id": {
      "type": "number",
      "description": "The ID of a phase on a project board"
    }
  }
}
object ProjectsUpdateProjectPlanActivityResponse
{
  "type": "object",
  "title": "updatedActivityPlanItem_200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "number",
          "description": "ID of plan item (either activity or task ID)"
        },
        "group_id": {
          "type": "number",
          "description": "The ID of the board this project is associated with. If null then plan item is not in any group."
        },
        "phase_id": {
          "type": "number",
          "description": "The ID of the board this project is associated with. If null then plan item is not in any phase."
        },
        "item_type": {
          "type": "string",
          "description": "Type of a plan item (task / activity)"
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object ProjectsUpdateProjectRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the project"
        },
        "board_id": {
          "type": "number",
          "description": "The ID of the board this project is associated with"
        },
        "phase_id": {
          "type": "number",
          "description": "The ID of the phase this project is associated with"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of IDs of the labels this project has"
        },
        "org_id": {
          "type": "number",
          "description": "The ID of the organization this project is associated with"
        },
        "status": {
          "type": "string",
          "description": "The status of the project"
        },
        "deal_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of IDs of the deals this project is associated with"
        },
        "end_date": {
          "type": "string",
          "format": "date",
          "description": "The end date of the project. Format: YYYY-MM-DD."
        },
        "owner_id": {
          "type": "number",
          "description": "The ID of a project owner"
        },
        "person_id": {
          "type": "number",
          "description": "The ID of the person this project is associated with"
        },
        "start_date": {
          "type": "string",
          "format": "date",
          "description": "The start date of the project. Format: YYYY-MM-DD."
        },
        "description": {
          "type": "string",
          "description": "The description of the project"
        }
      }
    }
  ],
  "title": "updateProjectRequest"
}
object ProjectsUpdateProjectResponse
{
  "type": "object",
  "title": "updateProjectResponse200",
  "properties": {
    "data": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the project, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the project"
                },
                "board_id": {
                  "type": "number",
                  "description": "The ID of the board this project is associated with"
                },
                "phase_id": {
                  "type": "number",
                  "description": "The ID of the phase this project is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the labels this project has"
                },
                "org_id": {
                  "type": "number",
                  "description": "The ID of the organization this project is associated with"
                },
                "status": {
                  "type": "string",
                  "description": "The status of the project"
                },
                "deal_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "An array of IDs of the deals this project is associated with"
                },
                "end_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The end date of the project. Format: YYYY-MM-DD."
                },
                "owner_id": {
                  "type": "number",
                  "description": "The ID of a project owner"
                },
                "person_id": {
                  "type": "number",
                  "description": "The ID of the person this project is associated with"
                },
                "start_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The start date of the project. Format: YYYY-MM-DD."
                },
                "description": {
                  "type": "string",
                  "description": "The description of the project"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "archive_time": {
                  "type": "string",
                  "description": "The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then 'null'."
                },
                "status_change_time": {
                  "type": "string",
                  "description": "The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "fullProjectObject"
        }
      ],
      "title": "projectResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object RecentsGetChangesAfterResponse
{
  "type": "object",
  "title": "getRecentsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "org_id": {
                        "type": "integer",
                        "description": "The ID of the organization this activity is associated with"
                      },
                      "deal_id": {
                        "type": "integer",
                        "description": "The ID of the deal this activity is associated with"
                      },
                      "lead_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true,
                        "description": "The ID of the lead in the UUID format this activity is associated with"
                      },
                      "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "The due date of the activity. Format: YYYY-MM-DD"
                      },
                      "due_time": {
                        "type": "string",
                        "description": "The due time of the activity in UTC. Format: HH:MM"
                      },
                      "duration": {
                        "type": "string",
                        "description": "The duration of the activity. Format: HH:MM"
                      },
                      "location": {
                        "type": "string",
                        "description": "The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps."
                      },
                      "person_id": {
                        "type": "integer",
                        "description": "The ID of the person this activity is associated with"
                      },
                      "project_id": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The ID of the project this activity is associated with"
                      },
                      "public_description": {
                        "type": "string",
                        "description": "Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the activity, generated when the activity was created"
                      },
                      "done": {
                        "type": "boolean",
                        "description": "Whether the activity is done or not"
                      },
                      "file": {
                        "type": "object",
                        "description": "The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app."
                      },
                      "note": {
                        "type": "string",
                        "description": "The note of the activity (HTML format)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes."
                      },
                      "series": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        },
                        "description": "The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`"
                      },
                      "subject": {
                        "type": "string",
                        "description": "The subject of the activity"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "The ID of the user whom the activity is assigned to"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS."
                      },
                      "org_name": {
                        "type": "string",
                        "description": "The name of the organization this activity is associated with"
                      },
                      "rec_rule": {
                        "type": "string",
                        "description": "The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\""
                      },
                      "attendees": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        },
                        "nullable": true,
                        "description": "The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address."
                      },
                      "busy_flag": {
                        "type": "boolean",
                        "description": "Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time."
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The user's company ID"
                      },
                      "deal_title": {
                        "type": "string",
                        "description": "The name of the deal this activity is associated with"
                      },
                      "owner_name": {
                        "type": "string",
                        "description": "The name of the user this activity is owned by"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the activity is active or not"
                      },
                      "person_name": {
                        "type": "string",
                        "description": "The name of the person this activity is associated with"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS."
                      },
                      "participants": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        },
                        "nullable": true,
                        "description": "List of multiple persons (participants) this activity is associated with"
                      },
                      "reference_id": {
                        "type": "integer",
                        "description": "Together with the `reference_type`, gives the ID of the other object"
                      },
                      "gcal_event_id": {
                        "type": "string",
                        "description": "For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon."
                      },
                      "location_route": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates street name."
                      },
                      "reference_type": {
                        "type": "string",
                        "description": "If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller."
                      },
                      "update_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who was the last to update this activity"
                      },
                      "source_timezone": {
                        "type": "string",
                        "description": "The timezone the activity was created in an external calendar"
                      },
                      "deal_dropbox_bcc": {
                        "type": "string",
                        "description": "The BCC email address of the deal"
                      },
                      "location_country": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates country."
                      },
                      "location_locality": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates city/town/village/locality."
                      },
                      "created_by_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who created the activity"
                      },
                      "google_calendar_id": {
                        "type": "string",
                        "description": "The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon."
                      },
                      "person_dropbox_bcc": {
                        "type": "string",
                        "description": "The BCC email address of the person"
                      },
                      "rec_rule_extension": {
                        "type": "string",
                        "description": "Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar."
                      },
                      "assigned_to_user_id": {
                        "type": "integer",
                        "description": "The ID of the user to whom the activity is assigned to. Equal to `user_id`."
                      },
                      "location_subpremise": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates apartment/suite number."
                      },
                      "marked_as_done_time": {
                        "type": "string",
                        "description": "The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS."
                      },
                      "google_calendar_etag": {
                        "type": "string",
                        "description": "The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon."
                      },
                      "location_postal_code": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates ZIP/postal code."
                      },
                      "location_sublocality": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates district/sublocality."
                      },
                      "conference_meeting_id": {
                        "type": "string",
                        "description": "The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity"
                      },
                      "conference_meeting_url": {
                        "type": "string",
                        "description": "The link to join the meeting which is associated with this activity"
                      },
                      "last_notification_time": {
                        "type": "string",
                        "description": "The date and time of latest notifications sent about this activity to the participants or the attendees of this activity"
                      },
                      "location_street_number": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates house number."
                      },
                      "rec_master_activity_id": {
                        "type": "integer",
                        "description": "The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules"
                      },
                      "notification_language_id": {
                        "type": "integer",
                        "description": "The ID of the language the notifications are sent in"
                      },
                      "conference_meeting_client": {
                        "type": "string",
                        "description": "The ID of the Marketplace app, which is connected to this activity"
                      },
                      "last_notification_user_id": {
                        "type": "integer",
                        "description": "The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity"
                      },
                      "location_formatted_address": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates full/combined address."
                      },
                      "location_admin_area_level_1": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates state/county."
                      },
                      "location_admin_area_level_2": {
                        "type": "string",
                        "description": "A subfield of the location field. Indicates region."
                      },
                      "calendar_sync_include_context": {
                        "type": "string",
                        "description": "For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)"
                      }
                    }
                  }
                ],
                "title": "activityResponseObject"
              },
              "item": {
                "enum": [
                  "activity"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the activity type"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the activity type"
                  },
                  "color": {
                    "type": "string",
                    "description": "A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)"
                  },
                  "add_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The creation time of the activity type"
                  },
                  "icon_key": {
                    "enum": [
                      "task",
                      "email",
                      "meeting",
                      "deadline",
                      "call",
                      "lunch",
                      "calendar",
                      "downarrow",
                      "document",
                      "smartphone",
                      "camera",
                      "scissors",
                      "cogs",
                      "bubble",
                      "uparrow",
                      "checkbox",
                      "signpost",
                      "shuffle",
                      "addressbook",
                      "linegraph",
                      "picture",
                      "car",
                      "world",
                      "search",
                      "clip",
                      "sound",
                      "brush",
                      "key",
                      "padlock",
                      "pricetag",
                      "suitcase",
                      "finish",
                      "plane",
                      "loop",
                      "wifi",
                      "truck",
                      "cart",
                      "bulb",
                      "bell",
                      "presentation"
                    ],
                    "type": "string",
                    "description": "Icon graphic to use for representing this activity type"
                  },
                  "order_nr": {
                    "type": "integer",
                    "description": "An order number for the activity type. Order numbers should be used to order the types in the activity type selections."
                  },
                  "key_string": {
                    "type": "string",
                    "description": "A string that is generated by the API based on the given name of the activity type upon creation"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "The active flag of the activity type"
                  },
                  "update_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The update time of the activity type"
                  },
                  "is_custom_flag": {
                    "type": "boolean",
                    "description": "Whether the activity type is a custom one or not"
                  }
                }
              },
              "item": {
                "enum": [
                  "activityType"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the deal"
                      },
                      "org_id": {
                        "type": "integer",
                        "description": "The ID of the organization associated with the deal"
                      },
                      "user_id": {
                        "type": "integer",
                        "description": "The ID of the user"
                      },
                      "person_id": {
                        "type": "integer",
                        "description": "The ID of the person associated with the deal"
                      },
                      "creator_user_id": {
                        "type": "integer",
                        "description": "The ID of the deal creator"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "title": "baseDeal",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label or multiple labels assigned to the deal"
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the deal"
                      },
                      "value": {
                        "type": "number",
                        "description": "The value of the deal"
                      },
                      "active": {
                        "type": "boolean",
                        "description": "Whether the deal is active or not"
                      },
                      "status": {
                        "type": "string",
                        "description": "The status of the deal"
                      },
                      "deleted": {
                        "type": "boolean",
                        "description": "Whether the deal is deleted or not"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The creation date and time of the deal"
                      },
                      "cc_email": {
                        "type": "string",
                        "description": "The BCC email of the deal"
                      },
                      "currency": {
                        "type": "string",
                        "description": "The currency associated with the deal"
                      },
                      "org_name": {
                        "type": "string",
                        "description": "The name of the organization associated with the deal"
                      },
                      "stage_id": {
                        "type": "integer",
                        "description": "The ID of the deal stage"
                      },
                      "won_time": {
                        "type": "string",
                        "description": "The date and time of changing the deal status as won"
                      },
                      "lost_time": {
                        "type": "string",
                        "description": "The date and time of changing the deal status as lost"
                      },
                      "close_time": {
                        "type": "string",
                        "nullable": true,
                        "description": "The date and time of closing the deal"
                      },
                      "org_hidden": {
                        "type": "boolean",
                        "description": "If the organization that is associated with the deal is hidden or not"
                      },
                      "owner_name": {
                        "type": "string",
                        "description": "The name of the deal owner"
                      },
                      "visible_to": {
                        "type": "string",
                        "description": "The visibility of the deal"
                      },
                      "files_count": {
                        "type": "integer",
                        "description": "The number of files associated with the deal"
                      },
                      "lost_reason": {
                        "type": "string",
                        "nullable": true,
                        "description": "The reason for losing the deal"
                      },
                      "notes_count": {
                        "type": "integer",
                        "description": "The number of notes associated with the deal"
                      },
                      "person_name": {
                        "type": "string",
                        "description": "The name of the person associated with the deal"
                      },
                      "pipeline_id": {
                        "type": "integer",
                        "description": "The ID of the pipeline associated with the deal"
                      },
                      "probability": {
                        "type": "number",
                        "nullable": true,
                        "description": "The success probability percentage of the deal"
                      },
                      "rotten_time": {
                        "type": "string",
                        "nullable": true,
                        "description": "The date and time of changing the deal status as rotten"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last updated date and time of the deal"
                      },
                      "person_hidden": {
                        "type": "boolean",
                        "description": "If the person that is associated with the deal is hidden or not"
                      },
                      "first_won_time": {
                        "type": "string",
                        "description": "The date and time of the first time changing the deal status as won"
                      },
                      "products_count": {
                        "type": "integer",
                        "description": "The number of products associated with the deal"
                      },
                      "stage_order_nr": {
                        "type": "integer",
                        "description": "The order number of the deal stage associated with the deal"
                      },
                      "weighted_value": {
                        "type": "number",
                        "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
                      },
                      "followers_count": {
                        "type": "integer",
                        "description": "The number of followers associated with the deal"
                      },
                      "formatted_value": {
                        "type": "string",
                        "description": "The deal value formatted with selected currency. E.g. US$500"
                      },
                      "activities_count": {
                        "type": "integer",
                        "description": "The number of activities associated with the deal"
                      },
                      "last_activity_id": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The ID of the last activity associated with the deal"
                      },
                      "next_activity_id": {
                        "type": "integer",
                        "nullable": true,
                        "description": "The ID of the next activity associated with the deal"
                      },
                      "stage_change_time": {
                        "type": "string",
                        "description": "The last updated date and time of the deal stage"
                      },
                      "last_activity_date": {
                        "type": "string",
                        "nullable": true,
                        "description": "The date of the last activity associated with the deal"
                      },
                      "next_activity_date": {
                        "type": "string",
                        "description": "The date of the next activity associated with the deal"
                      },
                      "next_activity_note": {
                        "type": "string",
                        "description": "The note of the next activity associated with the deal"
                      },
                      "next_activity_time": {
                        "type": "string",
                        "description": "The time of the next activity associated with the deal"
                      },
                      "next_activity_type": {
                        "type": "string",
                        "description": "The type of the next activity associated with the deal"
                      },
                      "participants_count": {
                        "type": "integer",
                        "description": "The number of participants associated with the deal"
                      },
                      "expected_close_date": {
                        "type": "string",
                        "format": "date",
                        "description": "The expected close date of the deal"
                      },
                      "email_messages_count": {
                        "type": "integer",
                        "description": "The number of emails associated with the deal"
                      },
                      "done_activities_count": {
                        "type": "integer",
                        "description": "The number of completed activities associated with the deal"
                      },
                      "next_activity_subject": {
                        "type": "string",
                        "description": "The subject of the next activity associated with the deal"
                      },
                      "next_activity_duration": {
                        "type": "string",
                        "description": "The duration of the next activity associated with the deal"
                      },
                      "last_incoming_mail_time": {
                        "type": "string",
                        "description": "The date and time of the last incoming email associated with the deal"
                      },
                      "last_outgoing_mail_time": {
                        "type": "string",
                        "description": "The date and time of the last outgoing email associated with the deal"
                      },
                      "undone_activities_count": {
                        "type": "integer",
                        "description": "The number of incomplete activities associated with the deal"
                      },
                      "weighted_value_currency": {
                        "type": "string",
                        "description": "The currency associated with the deal"
                      },
                      "formatted_weighted_value": {
                        "type": "string",
                        "description": "The weighted_value formatted with selected currency. E.g. US$500"
                      }
                    }
                  }
                ],
                "title": "dealStrict"
              },
              "item": {
                "enum": [
                  "deal"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the file"
                  },
                  "cid": {
                    "type": "string",
                    "description": "The ID of the inline attachment"
                  },
                  "url": {
                    "type": "string",
                    "description": "The URL of the download file"
                  },
                  "name": {
                    "type": "string",
                    "description": "The visible name of the file"
                  },
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization to associate the file with"
                  },
                  "deal_id": {
                    "type": "integer",
                    "description": "The ID of the deal to associate the file with"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the lead to associate the file with"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user to associate the file with"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "org_name": {
                    "type": "string",
                    "description": "The name of the organization associated with the file"
                  },
                  "deal_name": {
                    "type": "string",
                    "description": "The name of the deal associated with the dile"
                  },
                  "file_name": {
                    "type": "string",
                    "description": "The original name of the file"
                  },
                  "file_size": {
                    "type": "integer",
                    "description": "The size of the file"
                  },
                  "lead_name": {
                    "type": "string",
                    "description": "The name of the lead associated with the file"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person to associate the file with"
                  },
                  "remote_id": {
                    "type": "string",
                    "description": "The ID of the remote item"
                  },
                  "s3_bucket": {
                    "type": "string",
                    "description": "The location of the cloud storage"
                  },
                  "product_id": {
                    "type": "integer",
                    "description": "The ID of the product to associate the file with"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the user is active or not. false = Not activated, true = Activated"
                  },
                  "activity_id": {
                    "type": "integer",
                    "description": "The ID of the activity to associate the file with"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the file"
                  },
                  "inline_flag": {
                    "type": "boolean",
                    "description": "Whether the file was uploaded as inline or not"
                  },
                  "person_name": {
                    "type": "string",
                    "description": "The name of the person associated with the file"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "product_name": {
                    "type": "string",
                    "description": "The name of the product associated with the file"
                  },
                  "mail_message_id": {
                    "type": "string",
                    "description": "The ID of the mail message to associate the file with"
                  },
                  "remote_location": {
                    "type": "string",
                    "description": "The location type to send the file to. Only googledrive is supported at the moment."
                  },
                  "mail_template_id": {
                    "type": "string",
                    "description": "The ID of the mail template to associate the file with"
                  }
                },
                "description": "The file data"
              },
              "item": {
                "enum": [
                  "file"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the filter"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the filter"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the item"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The owner of the filter"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the filter was added"
                  },
                  "visible_to": {
                    "type": "integer",
                    "description": "The visibility group ID of who can see then filter"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "The active flag of the filter"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The date and time when the filter was updated"
                  },
                  "custom_view_id": {
                    "type": "integer",
                    "description": "Used by Pipedrive webapp"
                  }
                },
                "description": "The filter object"
              },
              "item": {
                "enum": [
                  "filter"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the note"
                  },
                  "deal": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "The title of the deal this note is attached to"
                      }
                    },
                    "description": "The deal this note is attached to"
                  },
                  "user": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the note creator"
                      },
                      "email": {
                        "type": "string",
                        "description": "The email of the note creator"
                      },
                      "is_you": {
                        "type": "boolean",
                        "description": "Whether the note is created by you or not"
                      },
                      "icon_url": {
                        "type": "string",
                        "description": "The URL of the note creator avatar picture"
                      }
                    },
                    "description": "The user who created the note"
                  },
                  "org_id": {
                    "type": "integer",
                    "description": "The ID of the organization the note is attached to"
                  },
                  "person": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the person the note is attached to"
                      }
                    },
                    "description": "The person the note is attached to"
                  },
                  "content": {
                    "type": "string",
                    "description": "The content of the note in HTML format. Subject to sanitization on the back-end."
                  },
                  "deal_id": {
                    "type": "integer",
                    "description": "The ID of the deal the note is attached to"
                  },
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the lead the note is attached to"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the note creator"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the note"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "The ID of the person the note is attached to"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the note is active or deleted"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The last updated date and time of the note"
                  },
                  "organization": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the organization the note is attached to"
                      }
                    },
                    "description": "The organization the note is attached to"
                  },
                  "last_update_user_id": {
                    "type": "integer",
                    "description": "The ID of the user who last updated the note"
                  },
                  "pinned_to_deal_flag": {
                    "type": "boolean",
                    "description": "If true, the results are filtered by note to deal pinning state"
                  },
                  "pinned_to_person_flag": {
                    "type": "boolean",
                    "description": "If true, the results are filtered by note to person pinning state"
                  },
                  "pinned_to_organization_flag": {
                    "type": "boolean",
                    "description": "If true, the results are filtered by note to organization pinning state"
                  }
                }
              },
              "item": {
                "enum": [
                  "note"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the person"
                      },
                      "email": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "The label that indicates the type of the email. (Possible values - work, home or other)"
                            },
                            "value": {
                              "type": "string",
                              "description": "Email"
                            },
                            "primary": {
                              "type": "boolean",
                              "description": "Boolean that indicates if email is primary for the person or not"
                            }
                          }
                        },
                        "description": "An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required."
                      },
                      "label": {
                        "type": "integer",
                        "description": "The label assigned to the person"
                      },
                      "phone": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "The label that indicates the type of the phone number. (Possible values - work, home, mobile or other)"
                            },
                            "value": {
                              "type": "string",
                              "description": "The phone number"
                            },
                            "primary": {
                              "type": "boolean",
                              "description": "Boolean that indicates if phone number is primary for the person or not"
                            }
                          }
                        },
                        "description": "A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required."
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS"
                      },
                      "cc_email": {
                        "type": "string",
                        "description": "The BCC email associated with the person"
                      },
                      "org_name": {
                        "type": "string",
                        "description": "The name of the organization associated with the person"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company related to the person"
                      },
                      "first_char": {
                        "type": "string",
                        "description": "The first letter of the name of the person"
                      },
                      "owner_name": {
                        "type": "string",
                        "description": "The name of the owner associated with the person"
                      },
                      "picture_id": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "The ID of the picture associated with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "item_id": {
                                "type": "integer",
                                "description": "The ID of related item"
                              },
                              "add_time": {
                                "type": "string",
                                "description": "The add time of the picture"
                              },
                              "pictures": {
                                "type": "object",
                                "properties": {
                                  "128": {
                                    "type": "string",
                                    "description": "The URL of the 128*128 picture"
                                  },
                                  "512": {
                                    "type": "string",
                                    "description": "The URL of the 512*512 picture"
                                  }
                                }
                              },
                              "item_type": {
                                "type": "string",
                                "description": "The type of item the picture is related to"
                              },
                              "active_flag": {
                                "type": "boolean",
                                "description": "Whether the associated picture is active or not"
                              },
                              "update_time": {
                                "type": "string",
                                "description": "The update time of the picture"
                              },
                              "added_by_user_id": {
                                "type": "integer",
                                "description": "The ID of the user who added the picture"
                              }
                            }
                          }
                        ]
                      },
                      "visible_to": {
                        "type": "string",
                        "description": "The visibility group ID of who can see the person"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the person is active or not"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "org_id": {
                                "type": "integer",
                                "description": "The ID of the organization related to the person"
                              },
                              "owner_id": {
                                "type": "integer",
                                "description": "The ID of the owner related to the person"
                              },
                              "merge_what_id": {
                                "type": "integer",
                                "description": "The ID of the person with what the main person was merged"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the person"
                                  },
                                  "last_name": {
                                    "type": "string",
                                    "description": "The last name of the person"
                                  },
                                  "first_name": {
                                    "type": "string",
                                    "description": "The first name of the person"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "files_count": {
                                        "type": "integer",
                                        "description": "The count of files related to the person"
                                      },
                                      "notes_count": {
                                        "type": "integer",
                                        "description": "The count of notes related to the person"
                                      },
                                      "followers_count": {
                                        "type": "integer",
                                        "description": "The count of followers related to the person"
                                      },
                                      "activities_count": {
                                        "type": "integer",
                                        "description": "The count of activities related to the person"
                                      },
                                      "email_messages_count": {
                                        "type": "integer",
                                        "description": "The count of email messages related to the person"
                                      },
                                      "done_activities_count": {
                                        "type": "integer",
                                        "description": "The count of done activities related to the person"
                                      },
                                      "undone_activities_count": {
                                        "type": "integer",
                                        "description": "The count of undone activities related to the person"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "last_incoming_mail_time": {
                                        "type": "string",
                                        "description": "The date and time of the last incoming email associated with the person"
                                      },
                                      "last_outgoing_mail_time": {
                                        "type": "string",
                                        "description": "The date and time of the last outgoing email associated with the person"
                                      }
                                    }
                                  }
                                ],
                                "title": "personCountAndEmailInfo"
                              }
                            ],
                            "title": "personNameCountAndEmailInfo"
                          }
                        ],
                        "title": "personNameCountAndEmailInfoWithIds"
                      },
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "won_deals_count": {
                                    "type": "integer",
                                    "description": "The count of won deals related with the item"
                                  },
                                  "lost_deals_count": {
                                    "type": "integer",
                                    "description": "The count of lost deals related with the item"
                                  },
                                  "open_deals_count": {
                                    "type": "integer",
                                    "description": "The count of open deals related with the item"
                                  },
                                  "closed_deals_count": {
                                    "type": "integer",
                                    "description": "The count of closed deals related with the item"
                                  },
                                  "related_won_deals_count": {
                                    "type": "integer",
                                    "description": "The count of related won deals related with the item"
                                  },
                                  "related_lost_deals_count": {
                                    "type": "integer",
                                    "description": "The count of related lost deals related with the item"
                                  },
                                  "related_open_deals_count": {
                                    "type": "integer",
                                    "description": "The count of related open deals related with the item"
                                  },
                                  "related_closed_deals_count": {
                                    "type": "integer",
                                    "description": "The count of related closed deals related with the item"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "last_activity_id": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "The ID of the last activity associated with the deal"
                                  },
                                  "next_activity_id": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "The ID of the next activity associated with the deal"
                                  },
                                  "last_activity_date": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The date of the last activity associated with the deal"
                                  },
                                  "next_activity_date": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The date of the next activity associated with the deal"
                                  },
                                  "next_activity_time": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The time of the next activity associated with the deal"
                                  }
                                }
                              }
                            ],
                            "title": "dealCountAndActivityInfo"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "participant_open_deals_count": {
                                "type": "integer",
                                "description": "The count of open participant deals related with the item"
                              },
                              "participant_closed_deals_count": {
                                "type": "integer",
                                "description": "The count of closed participant deals related with the item"
                              }
                            }
                          }
                        ],
                        "title": "mergePersonDealRelatedInfo"
                      }
                    ],
                    "title": "additionalMergePersonInfo"
                  }
                ],
                "title": "mergePersonItem"
              },
              "item": {
                "enum": [
                  "person"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the organization"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the organization"
                      },
                      "label": {
                        "type": "integer",
                        "description": "The label assigned to the organization"
                      },
                      "add_time": {
                        "type": "string",
                        "description": "The creation date and time of the organization"
                      },
                      "cc_email": {
                        "type": "string",
                        "description": "The BCC email associated with the organization"
                      },
                      "owner_id": {
                        "allOf": [
                          {
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "The ID of the user"
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the user"
                              },
                              "email": {
                                "type": "string",
                                "description": "The email of the user"
                              },
                              "has_pic": {
                                "type": "integer",
                                "description": "Whether the user has picture or not. 0 = No picture, 1 = Has picture."
                              },
                              "pic_hash": {
                                "type": "string",
                                "nullable": true,
                                "description": "The user picture hash"
                              },
                              "active_flag": {
                                "type": "boolean",
                                "description": "Whether the user is active or not"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "description": "The ID of the owner"
                              }
                            }
                          }
                        ],
                        "title": "owner"
                      },
                      "company_id": {
                        "type": "integer",
                        "description": "The ID of the company related to the organization"
                      },
                      "first_char": {
                        "type": "string",
                        "description": "The first character of the organization name"
                      },
                      "owner_name": {
                        "type": "string",
                        "description": "The name of the organization owner"
                      },
                      "picture_id": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "description": "The ID of the picture associated with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "item_id": {
                                "type": "integer",
                                "description": "The ID of related item"
                              },
                              "add_time": {
                                "type": "string",
                                "description": "The add time of the picture"
                              },
                              "pictures": {
                                "type": "object",
                                "properties": {
                                  "128": {
                                    "type": "string",
                                    "description": "The URL of the 128*128 picture"
                                  },
                                  "512": {
                                    "type": "string",
                                    "description": "The URL of the 512*512 picture"
                                  }
                                }
                              },
                              "item_type": {
                                "type": "string",
                                "description": "The type of item the picture is related to"
                              },
                              "active_flag": {
                                "type": "boolean",
                                "description": "Whether the associated picture is active or not"
                              },
                              "update_time": {
                                "type": "string",
                                "description": "The update time of the picture"
                              },
                              "added_by_user_id": {
                                "type": "integer",
                                "description": "The ID of the user who added the picture"
                              }
                            }
                          }
                        ]
                      },
                      "visible_to": {
                        "type": "string",
                        "description": "The visibility group ID of who can see the organization"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the organization is active or not"
                      },
                      "update_time": {
                        "type": "string",
                        "description": "The last updated date and time of the organization"
                      },
                      "country_code": {
                        "type": "string",
                        "nullable": true,
                        "description": "The country code of the organization"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "files_count": {
                                "type": "integer",
                                "description": "The count of files related to the organization"
                              },
                              "notes_count": {
                                "type": "integer",
                                "description": "The count of notes related to the organization"
                              },
                              "people_count": {
                                "type": "integer",
                                "description": "The count of persons related to the organization"
                              },
                              "followers_count": {
                                "type": "integer",
                                "description": "The count of followers related to the organization"
                              },
                              "activities_count": {
                                "type": "integer",
                                "description": "The count of activities related to the organization"
                              },
                              "email_messages_count": {
                                "type": "integer",
                                "description": "The count of email messages related to the organization"
                              },
                              "done_activities_count": {
                                "type": "integer",
                                "description": "The count of done activities related to the organization"
                              },
                              "undone_activities_count": {
                                "type": "integer",
                                "description": "The count of undone activities related to the organization"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string",
                                "description": "The full address of the organization"
                              },
                              "address_route": {
                                "type": "string",
                                "description": "The route of the organization location"
                              },
                              "address_country": {
                                "type": "string",
                                "description": "The country of the organization location"
                              },
                              "address_locality": {
                                "type": "string",
                                "description": "The locality of the organization location"
                              },
                              "address_subpremise": {
                                "type": "string",
                                "description": "The sub-premise of the organization location"
                              },
                              "address_postal_code": {
                                "type": "string",
                                "description": "The postal code of the organization location"
                              },
                              "address_sublocality": {
                                "type": "string",
                                "description": "The sub-locality of the organization location"
                              },
                              "address_street_number": {
                                "type": "string",
                                "description": "The street number of the organization location"
                              },
                              "address_formatted_address": {
                                "type": "string",
                                "description": "The formatted organization location"
                              },
                              "address_admin_area_level_1": {
                                "type": "string",
                                "description": "The level 1 admin area of the organization location"
                              },
                              "address_admin_area_level_2": {
                                "type": "string",
                                "description": "The level 2 admin area of the organization location"
                              }
                            }
                          }
                        ],
                        "title": "organizationCountAndAddressInfo"
                      },
                      {
                        "type": "object",
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "won_deals_count": {
                                "type": "integer",
                                "description": "The count of won deals related with the item"
                              },
                              "lost_deals_count": {
                                "type": "integer",
                                "description": "The count of lost deals related with the item"
                              },
                              "open_deals_count": {
                                "type": "integer",
                                "description": "The count of open deals related with the item"
                              },
                              "closed_deals_count": {
                                "type": "integer",
                                "description": "The count of closed deals related with the item"
                              },
                              "related_won_deals_count": {
                                "type": "integer",
                                "description": "The count of related won deals related with the item"
                              },
                              "related_lost_deals_count": {
                                "type": "integer",
                                "description": "The count of related lost deals related with the item"
                              },
                              "related_open_deals_count": {
                                "type": "integer",
                                "description": "The count of related open deals related with the item"
                              },
                              "related_closed_deals_count": {
                                "type": "integer",
                                "description": "The count of related closed deals related with the item"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "last_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the last activity associated with the deal"
                              },
                              "next_activity_id": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The ID of the next activity associated with the deal"
                              },
                              "last_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the last activity associated with the deal"
                              },
                              "next_activity_date": {
                                "type": "string",
                                "nullable": true,
                                "description": "The date of the next activity associated with the deal"
                              },
                              "next_activity_time": {
                                "type": "string",
                                "nullable": true,
                                "description": "The time of the next activity associated with the deal"
                              }
                            }
                          }
                        ],
                        "title": "dealsCountAndActivityInfo"
                      }
                    ],
                    "title": "additionalBaseOrganizationItemInfo"
                  }
                ],
                "title": "baseOrganizationItem"
              },
              "item": {
                "enum": [
                  "organization"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the pipeline"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the pipeline"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether this pipeline will be made inactive (hidden) or active"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "order_nr": {
                    "type": "integer",
                    "description": "Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline."
                  },
                  "url_title": {
                    "type": "string",
                    "description": "The pipeline title displayed in the URL"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The pipeline update time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "deal_probability": {
                    "type": "boolean",
                    "description": "Whether deal probability is disabled or enabled for this pipeline"
                  }
                }
              },
              "item": {
                "enum": [
                  "pipeline"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the product"
                  },
                  "tax": {
                    "type": "number",
                    "default": 0,
                    "description": "The tax percentage"
                  },
                  "code": {
                    "type": "string",
                    "description": "The product code"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the product"
                  },
                  "unit": {
                    "type": "string",
                    "description": "The unit in which this product is sold"
                  },
                  "prices": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company's currency will be assigned."
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The date and time when the product was added to the deal"
                  },
                  "category": {
                    "type": "string",
                    "description": "The category of the product"
                  },
                  "owner_id": {
                    "type": "integer",
                    "description": "The ID of the user who will be marked as the owner of this product. When omitted, authorized user ID will be used."
                  },
                  "first_char": {
                    "type": "string",
                    "description": "The first letter of the product name"
                  },
                  "selectable": {
                    "type": "boolean",
                    "description": "Whether this product can be selected in deals or not"
                  },
                  "visible_to": {
                    "type": "integer",
                    "description": "The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user."
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether this product will be made active or not"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the product"
                  },
                  "files_count": {
                    "type": "integer",
                    "description": "The count of files"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The date and time when the product was updated to the deal"
                  }
                }
              },
              "item": {
                "enum": [
                  "product"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The ID of the stage"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the stage"
                  },
                  "add_time": {
                    "type": "string",
                    "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "order_nr": {
                    "type": "integer",
                    "description": "Defines the order of the stage"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the stage is active or deleted"
                  },
                  "pipeline_id": {
                    "type": "integer",
                    "description": "The ID of the pipeline to add the stage to"
                  },
                  "rotten_days": {
                    "type": "integer",
                    "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
                  },
                  "rotten_flag": {
                    "type": "boolean",
                    "description": "Whether deals in this stage can become rotten"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "deal_probability": {
                    "type": "integer",
                    "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
                  }
                }
              },
              "item": {
                "enum": [
                  "stage"
                ],
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The user ID"
                  },
                  "lang": {
                    "type": "integer",
                    "description": "The user language ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "The user name"
                  },
                  "email": {
                    "type": "string",
                    "description": "The user email"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "description": "The user phone"
                  },
                  "access": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "app": {
                          "enum": [
                            "sales",
                            "projects",
                            "campaigns",
                            "global",
                            "account_settings"
                          ],
                          "type": "string"
                        },
                        "admin": {
                          "type": "boolean"
                        },
                        "permission_set_id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "is_you": {
                    "type": "boolean",
                    "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
                  },
                  "locale": {
                    "type": "string",
                    "description": "The user locale"
                  },
                  "created": {
                    "type": "string",
                    "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "role_id": {
                    "type": "integer",
                    "description": "The ID of the user role"
                  },
                  "icon_url": {
                    "type": "string",
                    "nullable": true,
                    "description": "The user icon URL"
                  },
                  "modified": {
                    "type": "string",
                    "nullable": true,
                    "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "activated": {
                    "type": "boolean",
                    "description": "Boolean that indicates whether the user is activated"
                  },
                  "last_login": {
                    "type": "string",
                    "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Boolean that indicates whether the user is activated"
                  },
                  "timezone_name": {
                    "type": "string",
                    "description": "The user timezone name"
                  },
                  "timezone_offset": {
                    "type": "string",
                    "description": "The user timezone offset"
                  },
                  "default_currency": {
                    "type": "string",
                    "description": "The user default currency"
                  },
                  "has_created_company": {
                    "type": "boolean",
                    "description": "Boolean that indicates whether the user has created a company"
                  }
                }
              },
              "item": {
                "enum": [
                  "user"
                ],
                "type": "string"
              }
            }
          }
        ]
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "pagination": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Items shown per page"
            },
            "start": {
              "type": "integer",
              "description": "Pagination start"
            },
            "more_items_in_collection": {
              "type": "boolean",
              "description": "If there are more list items in the collection than displayed or not"
            }
          },
          "description": "The additional data of the list"
        },
        "since_timestamp": {
          "type": "string",
          "description": "The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS"
        },
        "last_timestamp_on_page": {
          "type": "string",
          "description": "The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS"
        }
      }
    }
  }
}
object RolesAddOrUpdateSettingRequest
{
  "type": "object",
  "title": "addOrUpdateRoleSettingRequest",
  "required": [
    "setting_key",
    "value"
  ],
  "properties": {
    "value": {
      "enum": [
        1,
        3,
        5,
        7
      ],
      "type": "integer",
      "description": "Possible values for the `default_visibility` setting depending on the subscription plan:<br> <table class='role-setting'> <caption><b>Essential / Advanced plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner & Followers</td></tr> <tr><td>`3`</td><td>Entire company</td></tr> </table> <br> <table class='role-setting'> <caption><b>Professional / Enterprise plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner only</td></tr> <tr><td>`3`</td><td>Owner&#39;s visibility group</td></tr> <tr><td>`5`</td><td>Owner&#39;s visibility group and sub-groups</td></tr> <tr><td>`7`</td><td>Entire company</td></tr> </table> <br> Read more about visibility groups <a href='https://support.pipedrive.com/en/article/visibility-groups'>here</a>."
    },
    "setting_key": {
      "enum": [
        "deal_default_visibility",
        "lead_default_visibility",
        "org_default_visibility",
        "person_default_visibility",
        "product_default_visibility"
      ],
      "type": "string"
    }
  }
}
object RolesAddOrUpdateSettingResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the role"
            },
            "deal_default_visibility": {
              "enum": [
                1,
                3,
                5,
                7
              ],
              "type": "number",
              "description": "The setting"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "addOrUpdateRoleSettingResponse200"
}
object RolesAssignUserRequest
{
  "type": "object",
  "title": "addRoleAssignmentRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object RolesAssignUserResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "role_id": {
              "type": "integer",
              "description": "The ID of the role the user was added to"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user that was added to the role"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "addRoleAssignmentResponse200"
}
object RolesCreateRoleRequest
{
  "type": "object",
  "title": "addRoleRequest",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the role"
    },
    "parent_role_id": {
      "type": "integer",
      "description": "The ID of the parent role"
    }
  },
  "description": "The details of the role"
}
object RolesCreateRoleResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "allOf": [
                {
                  "type": "integer"
                }
              ],
              "description": "The ID of the created role"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "addRoleResponse200"
}
object RolesGetAllRolesResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "type": "object",
                    "title": "baseRoleRequest",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the role"
                      },
                      "parent_role_id": {
                        "type": "integer",
                        "description": "The ID of the parent role"
                      }
                    },
                    "description": "The details of the role"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "The ID of the role"
                      },
                      "active_flag": {
                        "type": "boolean",
                        "description": "Whether the role is active or not"
                      },
                      "sub_role_count": {
                        "type": "string",
                        "description": "The number of sub-roles"
                      },
                      "assignment_count": {
                        "type": "string",
                        "description": "The number of users assigned to this role"
                      }
                    }
                  }
                ],
                "title": "subRole",
                "description": "The details of the sub-role"
              },
              {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "integer",
                    "description": "The level of role in the role hierarchy"
                  }
                }
              }
            ],
            "title": "fullRole"
          },
          "description": "The array of roles"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "The pagination details in the role list"
            }
          },
          "description": "The additional data in the role list"
        }
      }
    }
  ],
  "title": "getRolesResponse200"
}
object RolesGetOneRoleResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "type": "object",
              "title": "baseRoleRequest",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the role"
                },
                "parent_role_id": {
                  "type": "integer",
                  "description": "The ID of the parent role"
                }
              },
              "description": "The details of the role"
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the role"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Whether the role is active or not"
                },
                "sub_role_count": {
                  "type": "string",
                  "description": "The number of sub-roles"
                },
                "assignment_count": {
                  "type": "string",
                  "description": "The number of users assigned to this role"
                }
              }
            }
          ],
          "title": "subRole",
          "description": "The details of the sub-role"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "settings": {
              "type": "object",
              "properties": {
                "org_access_level": {
                  "type": "number",
                  "description": "The access level of the organizations for the role (only for default role)"
                },
                "deal_access_level": {
                  "type": "number",
                  "description": "The access level of the deals for the role (only for default role)"
                },
                "person_access_level": {
                  "type": "number",
                  "description": "The access level of the people for the role (only for default role)"
                },
                "product_access_level": {
                  "type": "number",
                  "description": "The access level of the products for the role (only for default role)"
                },
                "org_default_visibility": {
                  "type": "number",
                  "description": "The default visibility level of the organizations for the role"
                },
                "deal_default_visibility": {
                  "type": "number",
                  "description": "The default visibility level of the deals for the role"
                },
                "lead_default_visibility": {
                  "type": "number",
                  "description": "The default visibility level of the leads for the role"
                },
                "person_default_visibility": {
                  "type": "number",
                  "description": "The default visibility level of the people for the role"
                },
                "product_default_visibility": {
                  "type": "number",
                  "description": "The default visibility level of the products for the role"
                }
              },
              "description": "The settings for the role"
            }
          },
          "description": "The additional data in the role"
        }
      }
    }
  ],
  "title": "getRoleResponse200"
}
object RolesGetRoleSettingsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "org_access_level": {
              "type": "number",
              "description": "The access level of the organizations for the role (only for default role)"
            },
            "deal_access_level": {
              "type": "number",
              "description": "The access level of the deals for the role (only for default role)"
            },
            "person_access_level": {
              "type": "number",
              "description": "The access level of the people for the role (only for default role)"
            },
            "product_access_level": {
              "type": "number",
              "description": "The access level of the products for the role (only for default role)"
            },
            "org_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the organizations for the role"
            },
            "deal_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the deals for the role"
            },
            "lead_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the leads for the role"
            },
            "person_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the people for the role"
            },
            "product_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the products for the role"
            }
          },
          "description": "The settings for the role"
        }
      }
    }
  ],
  "title": "getRoleSettingsResponse200"
}
object RolesListPipelineVisibilityResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "visible": {
              "type": "boolean",
              "description": "Whether visible or hidden pipeline ids were returned"
            },
            "pipeline_ids": {
              "type": "array",
              "items": {
                "type": "number",
                "description": "The ID of the pipeline"
              },
              "description": "Either visible or hidden pipeline ids"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "getRolePipelines200"
}
object RolesListRoleAssignmentsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "title": "baseRoleRequest",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the role"
                  },
                  "parent_role_id": {
                    "type": "integer",
                    "description": "The ID of the parent role"
                  }
                },
                "description": "The details of the role"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The assignment type"
                  },
                  "role_id": {
                    "type": "integer",
                    "description": "The role ID"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The user ID"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the role is active or not"
                  }
                }
              }
            ],
            "title": "roleAssignment",
            "description": "The assignment data of the role"
          },
          "description": "The role assignments"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "The pagination details in the role list"
            }
          },
          "description": "The additional data in the role list"
        }
      }
    }
  ],
  "title": "getUserRoleAssignmentsResponse200"
}
object RolesMarkAsDeletedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "allOf": [
                {
                  "type": "integer"
                }
              ],
              "description": "The ID of the deleted role"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "deleteRoleResponse200"
}
object RolesRemoveAssignmentRequest
{
  "type": "object",
  "title": "deleteRoleAssignmentRequest",
  "required": [
    "user_id"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user"
    }
  }
}
object RolesRemoveAssignmentResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "allOf": [
                {
                  "type": "integer"
                }
              ],
              "description": "The ID of the role the user was removed from"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "deleteRoleAssignmentResponse200"
}
object RolesUpdatePipelineVisibilityRequest
{
  "type": "object",
  "title": "putRolePipelinesBody",
  "required": [
    "visible_pipeline_ids"
  ],
  "properties": {
    "visible_pipeline_ids": {
      "type": "object",
      "description": "The pipeline IDs to make the pipelines visible (add) and/or hidden (remove) for the specified role. It requires the following JSON structure: `{ \"add\": \"[1]\", \"remove\": \"[3, 4]\" }`."
    }
  }
}
object RolesUpdatePipelineVisibilityResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "visible": {
              "type": "boolean",
              "description": "Whether visible or hidden pipeline ids were returned"
            },
            "pipeline_ids": {
              "type": "array",
              "items": {
                "type": "number",
                "description": "The ID of the pipeline"
              },
              "description": "Either visible or hidden pipeline ids"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "getRolePipelines200"
}
object RolesUpdateRoleDetailsRequest
{
  "type": "object",
  "title": "baseRoleRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the role"
    },
    "parent_role_id": {
      "type": "integer",
      "description": "The ID of the parent role"
    }
  },
  "description": "The details of the role"
}
object RolesUpdateRoleDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "allOf": [
                {
                  "type": "integer"
                }
              ],
              "description": "The ID of the updated role"
            }
          },
          "description": "The response data"
        }
      }
    }
  ],
  "title": "updateRoleResponse200"
}
object StagesCreateNewStageRequest
{
  "type": "object",
  "title": "addStageRequest",
  "required": [
    "name",
    "pipeline_id"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the stage"
    },
    "pipeline_id": {
      "type": "integer",
      "description": "The ID of the pipeline to add stage to"
    },
    "rotten_days": {
      "type": "integer",
      "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
    },
    "rotten_flag": {
      "type": "boolean",
      "description": "Whether deals in this stage can become rotten"
    },
    "deal_probability": {
      "type": "integer",
      "description": "The success probability percentage of the deal. Used/shown when deal weighted values are used."
    }
  }
}
object StagesCreateNewStageResponse
{
  "type": "object",
  "title": "stageResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the stage"
        },
        "name": {
          "type": "string",
          "description": "The name of the stage"
        },
        "add_time": {
          "type": "string",
          "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
        },
        "order_nr": {
          "type": "integer",
          "description": "Defines the order of the stage"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the stage is active or deleted"
        },
        "pipeline_id": {
          "type": "integer",
          "description": "The ID of the pipeline to add the stage to"
        },
        "rotten_days": {
          "type": "integer",
          "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
        },
        "rotten_flag": {
          "type": "boolean",
          "description": "Whether deals in this stage can become rotten"
        },
        "update_time": {
          "type": "string",
          "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
        },
        "deal_probability": {
          "type": "integer",
          "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
        }
      },
      "description": "Updated stage object"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object StagesDeleteBulkResponse
{
  "type": "object",
  "title": "deleteStagesResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of deleted stage IDs"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object StagesDeleteStageResponse
{
  "type": "object",
  "title": "deleteStageResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Deleted stage ID"
        }
      }
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object StagesGetAllResponse
{
  "type": "object",
  "title": "getStagesResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the stage"
              },
              "name": {
                "type": "string",
                "description": "The name of the stage"
              },
              "add_time": {
                "type": "string",
                "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
              },
              "order_nr": {
                "type": "integer",
                "description": "Defines the order of the stage"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Whether the stage is active or deleted"
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline to add the stage to"
              },
              "rotten_days": {
                "type": "integer",
                "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
              },
              "rotten_flag": {
                "type": "boolean",
                "description": "Whether deals in this stage can become rotten"
              },
              "update_time": {
                "type": "string",
                "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
              },
              "deal_probability": {
                "type": "integer",
                "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "pipeline_name": {
                "type": "string",
                "description": "The name of the pipeline"
              },
              "pipeline_deal_probability": {
                "type": "boolean",
                "description": "The pipeline deal probability. When `true`, overrides the stage probability."
              }
            }
          }
        ]
      },
      "description": "The array of stages"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object StagesGetOneStageResponse
{
  "type": "object",
  "title": "getStageResponse200",
  "properties": {
    "data": {
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the stage"
            },
            "name": {
              "type": "string",
              "description": "The name of the stage"
            },
            "add_time": {
              "type": "string",
              "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
            },
            "order_nr": {
              "type": "integer",
              "description": "Defines the order of the stage"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Whether the stage is active or deleted"
            },
            "pipeline_id": {
              "type": "integer",
              "description": "The ID of the pipeline to add the stage to"
            },
            "rotten_days": {
              "type": "integer",
              "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
            },
            "rotten_flag": {
              "type": "boolean",
              "description": "Whether deals in this stage can become rotten"
            },
            "update_time": {
              "type": "string",
              "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
            },
            "deal_probability": {
              "type": "integer",
              "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "deals_summary": {
              "type": "object",
              "properties": {
                "per_stages": {
                  "type": "object",
                  "properties": {
                    "STAGE_ID": {
                      "type": "object",
                      "properties": {
                        "CURRENCY_ID": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "integer",
                              "description": "Deals count per currency"
                            },
                            "value": {
                              "type": "integer",
                              "description": "Deals value per currency"
                            },
                            "weighted_value": {
                              "type": "integer",
                              "description": "Deals weighted value per currency"
                            },
                            "value_formatted": {
                              "type": "string",
                              "description": "Deals value formatted per currency"
                            },
                            "weighted_value_formatted": {
                              "type": "string",
                              "description": "Deals weighted value formatted per currency"
                            }
                          },
                          "description": "The currency summary. This parameter is dynamic and changes according to `currency_id` value."
                        }
                      },
                      "description": "The currency summaries per stage. This parameter is dynamic and changes according to `stage_id` value."
                    }
                  },
                  "description": "The stage objects containing deals currency information"
                },
                "total_count": {
                  "type": "integer",
                  "description": "Deals count"
                },
                "per_currency": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "integer",
                      "description": "Deals count per currency. This parameter is dynamic and changes according to `currency_id` value."
                    }
                  },
                  "description": "The currency count summary"
                },
                "per_currency_full": {
                  "type": "object",
                  "properties": {
                    "CURRENCY_ID": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "description": "Deals count per currency"
                        },
                        "value": {
                          "type": "integer",
                          "description": "Deals value per currency"
                        }
                      },
                      "description": "The currency summary. This parameter is dynamic and changes according to `currency_id` value."
                    }
                  },
                  "description": "Full currency summaries"
                }
              },
              "description": "Deals summary"
            }
          }
        }
      ],
      "description": "The stage object"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object StagesGetStageDealsResponse
{
  "type": "object",
  "title": "getStageDealsResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization associated with the deal"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person associated with the deal"
              },
              "creator_user_id": {
                "type": "integer",
                "description": "The ID of the deal creator"
              }
            }
          },
          {
            "type": "object",
            "title": "baseDeal",
            "properties": {
              "label": {
                "type": "string",
                "description": "The label or multiple labels assigned to the deal"
              },
              "title": {
                "type": "string",
                "description": "The title of the deal"
              },
              "value": {
                "type": "number",
                "description": "The value of the deal"
              },
              "active": {
                "type": "boolean",
                "description": "Whether the deal is active or not"
              },
              "status": {
                "type": "string",
                "description": "The status of the deal"
              },
              "deleted": {
                "type": "boolean",
                "description": "Whether the deal is deleted or not"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the deal"
              },
              "cc_email": {
                "type": "string",
                "description": "The BCC email of the deal"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "org_name": {
                "type": "string",
                "description": "The name of the organization associated with the deal"
              },
              "stage_id": {
                "type": "integer",
                "description": "The ID of the deal stage"
              },
              "won_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as won"
              },
              "lost_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as lost"
              },
              "close_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of closing the deal"
              },
              "org_hidden": {
                "type": "boolean",
                "description": "If the organization that is associated with the deal is hidden or not"
              },
              "owner_name": {
                "type": "string",
                "description": "The name of the deal owner"
              },
              "visible_to": {
                "type": "string",
                "description": "The visibility of the deal"
              },
              "files_count": {
                "type": "integer",
                "description": "The number of files associated with the deal"
              },
              "lost_reason": {
                "type": "string",
                "nullable": true,
                "description": "The reason for losing the deal"
              },
              "notes_count": {
                "type": "integer",
                "description": "The number of notes associated with the deal"
              },
              "person_name": {
                "type": "string",
                "description": "The name of the person associated with the deal"
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline associated with the deal"
              },
              "probability": {
                "type": "number",
                "nullable": true,
                "description": "The success probability percentage of the deal"
              },
              "rotten_time": {
                "type": "string",
                "nullable": true,
                "description": "The date and time of changing the deal status as rotten"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the deal"
              },
              "person_hidden": {
                "type": "boolean",
                "description": "If the person that is associated with the deal is hidden or not"
              },
              "first_won_time": {
                "type": "string",
                "description": "The date and time of the first time changing the deal status as won"
              },
              "products_count": {
                "type": "integer",
                "description": "The number of products associated with the deal"
              },
              "stage_order_nr": {
                "type": "integer",
                "description": "The order number of the deal stage associated with the deal"
              },
              "weighted_value": {
                "type": "number",
                "description": "Probability times deal value. Probability can either be deal probability or if not set, then stage probability."
              },
              "followers_count": {
                "type": "integer",
                "description": "The number of followers associated with the deal"
              },
              "formatted_value": {
                "type": "string",
                "description": "The deal value formatted with selected currency. E.g. US$500"
              },
              "activities_count": {
                "type": "integer",
                "description": "The number of activities associated with the deal"
              },
              "last_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the last activity associated with the deal"
              },
              "next_activity_id": {
                "type": "integer",
                "nullable": true,
                "description": "The ID of the next activity associated with the deal"
              },
              "stage_change_time": {
                "type": "string",
                "description": "The last updated date and time of the deal stage"
              },
              "last_activity_date": {
                "type": "string",
                "nullable": true,
                "description": "The date of the last activity associated with the deal"
              },
              "next_activity_date": {
                "type": "string",
                "description": "The date of the next activity associated with the deal"
              },
              "next_activity_note": {
                "type": "string",
                "description": "The note of the next activity associated with the deal"
              },
              "next_activity_time": {
                "type": "string",
                "description": "The time of the next activity associated with the deal"
              },
              "next_activity_type": {
                "type": "string",
                "description": "The type of the next activity associated with the deal"
              },
              "participants_count": {
                "type": "integer",
                "description": "The number of participants associated with the deal"
              },
              "expected_close_date": {
                "type": "string",
                "format": "date",
                "description": "The expected close date of the deal"
              },
              "email_messages_count": {
                "type": "integer",
                "description": "The number of emails associated with the deal"
              },
              "done_activities_count": {
                "type": "integer",
                "description": "The number of completed activities associated with the deal"
              },
              "next_activity_subject": {
                "type": "string",
                "description": "The subject of the next activity associated with the deal"
              },
              "next_activity_duration": {
                "type": "string",
                "description": "The duration of the next activity associated with the deal"
              },
              "last_incoming_mail_time": {
                "type": "string",
                "description": "The date and time of the last incoming email associated with the deal"
              },
              "last_outgoing_mail_time": {
                "type": "string",
                "description": "The date and time of the last outgoing email associated with the deal"
              },
              "undone_activities_count": {
                "type": "integer",
                "description": "The number of incomplete activities associated with the deal"
              },
              "weighted_value_currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "formatted_weighted_value": {
                "type": "string",
                "description": "The weighted_value formatted with selected currency. E.g. US$500"
              }
            }
          }
        ],
        "title": "dealStrict"
      },
      "description": "The array of deals"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Items shown per page"
        },
        "start": {
          "type": "integer",
          "description": "Pagination start"
        },
        "more_items_in_collection": {
          "type": "boolean",
          "description": "If there are more list items in the collection than displayed or not"
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object StagesUpdateDetailsRequest
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the stage"
        },
        "pipeline_id": {
          "type": "integer",
          "description": "The ID of the pipeline to add stage to"
        },
        "rotten_days": {
          "type": "integer",
          "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
        },
        "rotten_flag": {
          "type": "boolean",
          "description": "Whether deals in this stage can become rotten"
        },
        "deal_probability": {
          "type": "integer",
          "description": "The success probability percentage of the deal. Used/shown when deal weighted values are used."
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "order_nr": {
          "type": "integer",
          "description": "An order number for this stage. Order numbers should be used to order the stages in the pipeline."
        }
      }
    }
  ],
  "title": "updateStageRequest"
}
object StagesUpdateDetailsResponse
{
  "type": "object",
  "title": "stageResponse200",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the stage"
        },
        "name": {
          "type": "string",
          "description": "The name of the stage"
        },
        "add_time": {
          "type": "string",
          "description": "The stage creation time. Format: YYYY-MM-DD HH:MM:SS."
        },
        "order_nr": {
          "type": "integer",
          "description": "Defines the order of the stage"
        },
        "active_flag": {
          "type": "boolean",
          "description": "Whether the stage is active or deleted"
        },
        "pipeline_id": {
          "type": "integer",
          "description": "The ID of the pipeline to add the stage to"
        },
        "rotten_days": {
          "type": "integer",
          "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set."
        },
        "rotten_flag": {
          "type": "boolean",
          "description": "Whether deals in this stage can become rotten"
        },
        "update_time": {
          "type": "string",
          "description": "The stage update time. Format: YYYY-MM-DD HH:MM:SS."
        },
        "deal_probability": {
          "type": "integer",
          "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
        }
      },
      "description": "Updated stage object"
    },
    "success": {
      "type": "boolean",
      "description": "If the request was successful or not"
    }
  }
}
object SubscriptionsAddInstallmentSubscriptionRequest
{
  "type": "object",
  "title": "addSubscriptionInstallmentRequest",
  "required": [
    "deal_id",
    "currency",
    "payments"
  ],
  "properties": {
    "deal_id": {
      "type": "integer",
      "description": "The ID of the deal this installment subscription is associated with"
    },
    "currency": {
      "type": "string",
      "description": "The currency of the installment subscription. Accepts a 3-character currency code."
    },
    "payments": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Array of payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD)."
    },
    "update_deal_value": {
      "type": "boolean",
      "description": "Indicates that the deal value must be set to the installment subscription's total value"
    }
  }
}
object SubscriptionsAddInstallmentSubscriptionResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsAddRecurringRequest
{
  "type": "object",
  "title": "addRecurringSubscriptionRequest",
  "required": [
    "deal_id",
    "currency",
    "cadence_type",
    "start_date",
    "cycle_amount"
  ],
  "properties": {
    "deal_id": {
      "type": "integer",
      "description": "The ID of the deal this recurring subscription is associated with"
    },
    "currency": {
      "type": "string",
      "description": "The currency of the recurring subscription. Accepts a 3-character currency code."
    },
    "infinite": {
      "type": "boolean",
      "description": "This indicates that the recurring subscription will last until it's manually canceled or deleted. Note that only one field must be set: `cycles_count` or `infinite`."
    },
    "payments": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD)."
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "The start date of the recurring subscription. Format: YYYY-MM-DD"
    },
    "description": {
      "type": "string",
      "description": "The description of the recurring subscription"
    },
    "cadence_type": {
      "enum": [
        "weekly",
        "monthly",
        "quarterly",
        "yearly"
      ],
      "type": "string",
      "description": "The interval between payments"
    },
    "cycle_amount": {
      "type": "integer",
      "description": "The amount of each payment"
    },
    "cycles_count": {
      "type": "integer",
      "description": "Shows how many payments the subscription has. Note that one field must be set: `cycles_count` or `infinite`. If `cycles_count` is set, then `cycle_amount` and `start_date` are also required."
    },
    "update_deal_value": {
      "type": "boolean",
      "description": "Indicates that the deal value must be set to recurring subscription's MRR value"
    }
  }
}
object SubscriptionsAddRecurringResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsCancelRecurringSubscriptionRequest
{
  "type": "object",
  "title": "cancelRecurringSubscriptionRequest",
  "required": [
    "id"
  ],
  "properties": {
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "The subscription termination date. All payments after the specified date will be deleted. The end_date of the subscription will be set to the due date of the payment to follow the specified date. Default value is the current date."
    }
  }
}
object SubscriptionsCancelRecurringSubscriptionResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsDeleteMarkedResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsFindByDealIdResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsGetDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsGetPaymentsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the payment"
              },
              "amount": {
                "type": "number",
                "format": "double",
                "description": "The payment amount"
              },
              "due_at": {
                "type": "string",
                "format": "date",
                "description": "The date when payment occurs"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal this payment is associated with"
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The creation time of the payment"
              },
              "currency": {
                "type": "string",
                "description": "The currency of the payment"
              },
              "is_active": {
                "type": "boolean",
                "description": "The payment status"
              },
              "description": {
                "type": "string",
                "description": "The description of the payment"
              },
              "update_time": {
                "type": "string",
                "format": "date-time",
                "description": "The update time of the payment"
              },
              "payment_type": {
                "enum": [
                  "recurring",
                  "additional",
                  "installment"
                ],
                "type": "string",
                "description": "The type of the payment. Possible values are: `Recurring` - payments occur over fixed intervals of time, `Additional` - extra payment not the recurring payment of the recurring subscription, `Installment` - payment of the installment subscription."
              },
              "change_amount": {
                "type": "number",
                "format": "double",
                "description": "The difference between the amount of the current payment and the previous payment. The value can be either positive or negative."
              },
              "subscription_id": {
                "type": "integer",
                "description": "The ID of the subscription this payment is associated with"
              },
              "revenue_movement_type": {
                "enum": [
                  "new",
                  "recurring",
                  "expansion",
                  "contraction",
                  "none",
                  "churn"
                ],
                "type": "string",
                "description": "Represents the movement of revenue in comparison with the previous payment. Possible values are: `New` - first payment of the subscription. `Recurring` - no movement. `Expansion` - current payment amount > previous payment amount. `Contraction` - current payment amount < previous payment amount. `Churn` - last payment of the subscription."
              }
            }
          }
        }
      }
    }
  ],
  "title": "paymentResponse200"
}
object SubscriptionsUpdateInstallmentSubscriptionRequest
{
  "type": "object",
  "title": "updateSubscriptionInstallmentRequest",
  "required": [
    "id",
    "payments"
  ],
  "properties": {
    "payments": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Array of payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with a explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD)."
    },
    "update_deal_value": {
      "type": "boolean",
      "description": "Indicates that the deal value must be set to installment subscription's total value"
    }
  }
}
object SubscriptionsUpdateInstallmentSubscriptionResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object SubscriptionsUpdateRecurringRequest
{
  "type": "object",
  "title": "updateRecurringSubscriptionRequest",
  "required": [
    "id",
    "effective_date"
  ],
  "properties": {
    "payments": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD)."
    },
    "description": {
      "type": "string",
      "description": "The description of the recurring subscription"
    },
    "cycle_amount": {
      "type": "integer",
      "description": "The amount of each payment"
    },
    "effective_date": {
      "type": "string",
      "format": "date",
      "description": "All payments after that date will be affected. Format: YYYY-MM-DD"
    },
    "update_deal_value": {
      "type": "boolean",
      "description": "Indicates that the deal value must be set to recurring subscription's MRR value"
    }
  }
}
object SubscriptionsUpdateRecurringResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the subscription"
            },
            "deal_id": {
              "type": "integer",
              "description": "The ID of the deal this subscription is associated with"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user who created the subscription"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The creation time of the subscription"
            },
            "currency": {
              "type": "string",
              "description": "The currency of the subscription"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "The end date of the subscription"
            },
            "infinite": {
              "type": "boolean",
              "description": "Indicates that the recurring subscription will last until it is manually canceled or deleted"
            },
            "is_active": {
              "type": "boolean",
              "description": "The subscription status"
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "The start date of the recurring subscription"
            },
            "description": {
              "type": "string",
              "description": "The description of the recurring subscription"
            },
            "update_time": {
              "type": "string",
              "format": "date-time",
              "description": "The update time of the subscription"
            },
            "cadence_type": {
              "type": "string",
              "description": "The interval between payments"
            },
            "cycle_amount": {
              "type": "integer",
              "description": "The amount of each payment"
            },
            "cycles_count": {
              "type": "integer",
              "description": "Shows how many payments a recurring subscription has"
            },
            "final_status": {
              "type": "string",
              "nullable": true,
              "description": "The final status of the subscription"
            },
            "lifetime_value": {
              "type": "number",
              "format": "double",
              "description": "The total value of all payments"
            }
          }
        }
      }
    }
  ],
  "title": "subscriptionsIdResponse200"
}
object TasksCreateTaskRequest
{
  "allOf": [
    {
      "type": "object",
      "title": "requiedPostProjectParameters",
      "required": [
        "title",
        "project_id"
      ],
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the task"
        },
        "project_id": {
          "type": "number",
          "description": "The ID of a project"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "done": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The due date of the task. Format: YYYY-MM-DD."
        },
        "assignee_id": {
          "type": "number",
          "description": "The ID of the user who will be the assignee of the task"
        },
        "description": {
          "type": "string",
          "description": "The description of the task"
        },
        "parent_task_id": {
          "type": "number",
          "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
        }
      }
    }
  ],
  "title": "addTaskRequest"
}
object TasksCreateTaskResponse
{
  "type": "object",
  "title": "addTaskResponse201",
  "properties": {
    "data": {
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the task, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the task"
                },
                "project_id": {
                  "type": "number",
                  "description": "The ID of the project this task is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "done": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBoolean"
                    }
                  ],
                  "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
                },
                "due_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The due date of the task. Format: YYYY-MM-DD."
                },
                "assignee_id": {
                  "type": "number",
                  "description": "The ID of the user who will be the assignee of the task"
                },
                "description": {
                  "type": "string",
                  "description": "The description of the task"
                },
                "parent_task_id": {
                  "type": "number",
                  "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "creator_id": {
                  "type": "number",
                  "description": "The creator of a task"
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "marked_as_done_time": {
                  "type": "string",
                  "description": "The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "updateProjectRequest"
        }
      ],
      "title": "taskResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object TasksDeleteTaskResponse
{
  "type": "object",
  "title": "deleteTaskResponse200",
  "properties": {
    "data": {
      "type": "object",
      "title": "deleteTask",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the task that was deleted"
            }
          }
        },
        "success": {
          "type": "boolean",
          "description": "If the request was successful or not"
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object TasksGetDetailsResponse
{
  "type": "object",
  "title": "getTaskResponse200",
  "properties": {
    "data": {
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the task, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the task"
                },
                "project_id": {
                  "type": "number",
                  "description": "The ID of the project this task is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "done": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBoolean"
                    }
                  ],
                  "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
                },
                "due_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The due date of the task. Format: YYYY-MM-DD."
                },
                "assignee_id": {
                  "type": "number",
                  "description": "The ID of the user who will be the assignee of the task"
                },
                "description": {
                  "type": "string",
                  "description": "The description of the task"
                },
                "parent_task_id": {
                  "type": "number",
                  "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "creator_id": {
                  "type": "number",
                  "description": "The creator of a task"
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "marked_as_done_time": {
                  "type": "string",
                  "description": "The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "updateProjectRequest"
        }
      ],
      "title": "taskResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object TasksListAllTasksResponse
{
  "type": "object",
  "title": "getTasksResponse200",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the task, generated when the task was created"
              }
            }
          },
          {
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title of the task"
                  },
                  "project_id": {
                    "type": "number",
                    "description": "The ID of the project this task is associated with"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "done": {
                    "allOf": [
                      {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "number",
                        "title": "numberBoolean"
                      }
                    ],
                    "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The due date of the task. Format: YYYY-MM-DD."
                  },
                  "assignee_id": {
                    "type": "number",
                    "description": "The ID of the user who will be the assignee of the task"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the task"
                  },
                  "parent_task_id": {
                    "type": "number",
                    "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "add_time": {
                    "type": "string",
                    "description": "The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "creator_id": {
                    "type": "number",
                    "description": "The creator of a task"
                  },
                  "update_time": {
                    "type": "string",
                    "description": "The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  },
                  "marked_as_done_time": {
                    "type": "string",
                    "description": "The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                  }
                }
              }
            ],
            "title": "updateProjectRequest"
          }
        ],
        "title": "taskResponseObject"
      }
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
        }
      },
      "description": "The additional data of the list"
    }
  }
}
object TasksUpdateTaskRequest
{
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the task"
        },
        "project_id": {
          "type": "number",
          "description": "The ID of the project this task is associated with"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "done": {
          "allOf": [
            {
              "enum": [
                0,
                1
              ],
              "type": "number",
              "title": "numberBoolean"
            }
          ],
          "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The due date of the task. Format: YYYY-MM-DD."
        },
        "assignee_id": {
          "type": "number",
          "description": "The ID of the user who will be the assignee of the task"
        },
        "description": {
          "type": "string",
          "description": "The description of the task"
        },
        "parent_task_id": {
          "type": "number",
          "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
        }
      }
    }
  ],
  "title": "updateProjectRequest"
}
object TasksUpdateTaskResponse
{
  "type": "object",
  "title": "updateTaskResponse200",
  "properties": {
    "data": {
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the task, generated when the task was created"
            }
          }
        },
        {
          "type": "object",
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The title of the task"
                },
                "project_id": {
                  "type": "number",
                  "description": "The ID of the project this task is associated with"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "done": {
                  "allOf": [
                    {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "number",
                      "title": "numberBoolean"
                    }
                  ],
                  "description": "Whether the task is done or not. 0 = Not done, 1 = Done."
                },
                "due_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The due date of the task. Format: YYYY-MM-DD."
                },
                "assignee_id": {
                  "type": "number",
                  "description": "The ID of the user who will be the assignee of the task"
                },
                "description": {
                  "type": "string",
                  "description": "The description of the task"
                },
                "parent_task_id": {
                  "type": "number",
                  "description": "The ID of a parent task. Can not be ID of a task which is already a subtask."
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "add_time": {
                  "type": "string",
                  "description": "The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "creator_id": {
                  "type": "number",
                  "description": "The creator of a task"
                },
                "update_time": {
                  "type": "string",
                  "description": "The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                },
                "marked_as_done_time": {
                  "type": "string",
                  "description": "The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS."
                }
              }
            }
          ],
          "title": "updateProjectRequest"
        }
      ],
      "title": "taskResponseObject"
    },
    "success": {
      "type": "boolean"
    },
    "additional_data": {
      "type": "object",
      "example": null,
      "nullable": true
    }
  }
}
object UserConnectionsGetAllConnections401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object UserConnectionsGetAllConnectionsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "google": {
              "type": "string",
              "description": "The third party ID or false in case the ID is not found"
            }
          },
          "description": "The object of UserConnections"
        }
      }
    }
  ],
  "title": "userConnectionsResponse200"
}
object UserSettingsListAuthorizedSettings401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object UserSettingsListAuthorizedSettingsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "beta_app": {
              "type": "boolean",
              "description": "Whether beta app is enabled"
            },
            "list_limit": {
              "type": "number",
              "description": "The number of results shown in list by default"
            },
            "marketplace_team": {
              "type": "boolean",
              "description": "If the vendors are allowed to be part of the Marketplace team or not"
            },
            "callto_link_syntax": {
              "type": "string",
              "description": "The call to link syntax"
            },
            "file_upload_destination": {
              "type": "string",
              "description": "The destination of file upload"
            },
            "person_duplicate_condition": {
              "type": "string",
              "description": "Allow the vendors to duplicate a person"
            },
            "autofill_deal_expected_close_date": {
              "type": "boolean",
              "description": "Whether the expected close date of the deal is filled automatically or not"
            },
            "marketplace_app_extensions_vendor": {
              "type": "boolean",
              "description": "If the vendors are allowed to extend their Marketplace apps with functionality and content in the Pipedrive UI or not"
            },
            "prevent_salesphone_callto_override": {
              "type": "boolean",
              "description": "Prevent salesphone call to override"
            },
            "marketplace_allow_custom_install_url": {
              "type": "boolean",
              "description": "If the vendors are allowed to install custom Marketplace apps with functionality and content in the Pipedrive UI or not"
            }
          }
        }
      }
    }
  ],
  "title": "getUserSettingsResponse200"
}
object UsersAddNewUser403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object UsersAddNewUserRequest
{
  "type": "object",
  "title": "addUserRequest",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "description": "The email of the user"
    },
    "access": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "app"
        ],
        "properties": {
          "app": {
            "enum": [
              "sales",
              "projects",
              "campaigns",
              "global",
              "account_settings"
            ],
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          },
          "permission_set_id": {
            "type": "string"
          }
        }
      },
      "default": [
        {
          "app": "sales"
        }
      ],
      "description": "The access given to the user. Each item in the array represents access to a specific app. Optionally may include either admin flag or permission set ID to specify which access to give within the app. If both are omitted, the default access for the corresponding app will be used. It requires structure as follows: `[{ app: 'sales', permission_set_id: '62cc4d7f-4038-4352-abf3-a8c1c822b631' }, { app: 'global', admin: true }, { app: 'account_settings' }]`\n"
    },
    "active_flag": {
      "type": "boolean",
      "default": true,
      "description": "Whether the user is active or not. `false` = Not activated, `true` = Activated"
    }
  }
}
object UsersAddNewUserResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The user ID"
            },
            "lang": {
              "type": "integer",
              "description": "The user language ID"
            },
            "name": {
              "type": "string",
              "description": "The user name"
            },
            "email": {
              "type": "string",
              "description": "The user email"
            },
            "phone": {
              "type": "string",
              "nullable": true,
              "description": "The user phone"
            },
            "access": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app": {
                    "enum": [
                      "sales",
                      "projects",
                      "campaigns",
                      "global",
                      "account_settings"
                    ],
                    "type": "string"
                  },
                  "admin": {
                    "type": "boolean"
                  },
                  "permission_set_id": {
                    "type": "string"
                  }
                }
              }
            },
            "is_you": {
              "type": "boolean",
              "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
            },
            "locale": {
              "type": "string",
              "description": "The user locale"
            },
            "created": {
              "type": "string",
              "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "role_id": {
              "type": "integer",
              "description": "The ID of the user role"
            },
            "icon_url": {
              "type": "string",
              "nullable": true,
              "description": "The user icon URL"
            },
            "modified": {
              "type": "string",
              "nullable": true,
              "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "activated": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "last_login": {
              "type": "string",
              "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "timezone_name": {
              "type": "string",
              "description": "The user timezone name"
            },
            "timezone_offset": {
              "type": "string",
              "description": "The user timezone offset"
            },
            "default_currency": {
              "type": "string",
              "description": "The user default currency"
            },
            "has_created_company": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user has created a company"
            }
          }
        }
      }
    }
  ],
  "title": "userResponse200"
}
object UsersFindByNameResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The user ID"
              },
              "lang": {
                "type": "integer",
                "description": "The user language ID"
              },
              "name": {
                "type": "string",
                "description": "The user name"
              },
              "email": {
                "type": "string",
                "description": "The user email"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The user phone"
              },
              "access": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "app": {
                      "enum": [
                        "sales",
                        "projects",
                        "campaigns",
                        "global",
                        "account_settings"
                      ],
                      "type": "string"
                    },
                    "admin": {
                      "type": "boolean"
                    },
                    "permission_set_id": {
                      "type": "string"
                    }
                  }
                }
              },
              "is_you": {
                "type": "boolean",
                "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
              },
              "locale": {
                "type": "string",
                "description": "The user locale"
              },
              "created": {
                "type": "string",
                "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "role_id": {
                "type": "integer",
                "description": "The ID of the user role"
              },
              "icon_url": {
                "type": "string",
                "nullable": true,
                "description": "The user icon URL"
              },
              "modified": {
                "type": "string",
                "nullable": true,
                "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "activated": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user is activated"
              },
              "last_login": {
                "type": "string",
                "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user is activated"
              },
              "timezone_name": {
                "type": "string",
                "description": "The user timezone name"
              },
              "timezone_offset": {
                "type": "string",
                "description": "The user timezone offset"
              },
              "default_currency": {
                "type": "string",
                "description": "The user default currency"
              },
              "has_created_company": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user has created a company"
              }
            }
          }
        }
      }
    }
  ],
  "title": "usersResponse200"
}
object UsersGetAllResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The user ID"
              },
              "lang": {
                "type": "integer",
                "description": "The user language ID"
              },
              "name": {
                "type": "string",
                "description": "The user name"
              },
              "email": {
                "type": "string",
                "description": "The user email"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The user phone"
              },
              "access": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "app": {
                      "enum": [
                        "sales",
                        "projects",
                        "campaigns",
                        "global",
                        "account_settings"
                      ],
                      "type": "string"
                    },
                    "admin": {
                      "type": "boolean"
                    },
                    "permission_set_id": {
                      "type": "string"
                    }
                  }
                }
              },
              "is_you": {
                "type": "boolean",
                "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
              },
              "locale": {
                "type": "string",
                "description": "The user locale"
              },
              "created": {
                "type": "string",
                "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "role_id": {
                "type": "integer",
                "description": "The ID of the user role"
              },
              "icon_url": {
                "type": "string",
                "nullable": true,
                "description": "The user icon URL"
              },
              "modified": {
                "type": "string",
                "nullable": true,
                "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "activated": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user is activated"
              },
              "last_login": {
                "type": "string",
                "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
              },
              "active_flag": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user is activated"
              },
              "timezone_name": {
                "type": "string",
                "description": "The user timezone name"
              },
              "timezone_offset": {
                "type": "string",
                "description": "The user timezone offset"
              },
              "default_currency": {
                "type": "string",
                "description": "The user default currency"
              },
              "has_created_company": {
                "type": "boolean",
                "description": "Boolean that indicates whether the user has created a company"
              }
            }
          }
        }
      }
    }
  ],
  "title": "usersResponse200"
}
object UsersGetCurrentUserData401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object UsersGetCurrentUserDataResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The user ID"
                },
                "lang": {
                  "type": "integer",
                  "description": "The user language ID"
                },
                "name": {
                  "type": "string",
                  "description": "The user name"
                },
                "email": {
                  "type": "string",
                  "description": "The user email"
                },
                "phone": {
                  "type": "string",
                  "nullable": true,
                  "description": "The user phone"
                },
                "access": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "app": {
                        "enum": [
                          "sales",
                          "projects",
                          "campaigns",
                          "global",
                          "account_settings"
                        ],
                        "type": "string"
                      },
                      "admin": {
                        "type": "boolean"
                      },
                      "permission_set_id": {
                        "type": "string"
                      }
                    }
                  }
                },
                "is_you": {
                  "type": "boolean",
                  "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
                },
                "locale": {
                  "type": "string",
                  "description": "The user locale"
                },
                "created": {
                  "type": "string",
                  "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                },
                "role_id": {
                  "type": "integer",
                  "description": "The ID of the user role"
                },
                "icon_url": {
                  "type": "string",
                  "nullable": true,
                  "description": "The user icon URL"
                },
                "modified": {
                  "type": "string",
                  "nullable": true,
                  "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                },
                "activated": {
                  "type": "boolean",
                  "description": "Boolean that indicates whether the user is activated"
                },
                "last_login": {
                  "type": "string",
                  "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
                },
                "active_flag": {
                  "type": "boolean",
                  "description": "Boolean that indicates whether the user is activated"
                },
                "timezone_name": {
                  "type": "string",
                  "description": "The user timezone name"
                },
                "timezone_offset": {
                  "type": "string",
                  "description": "The user timezone offset"
                },
                "default_currency": {
                  "type": "string",
                  "description": "The user default currency"
                },
                "has_created_company": {
                  "type": "boolean",
                  "description": "Boolean that indicates whether the user has created a company"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "language": {
                  "type": "object",
                  "properties": {
                    "country_code": {
                      "type": "string",
                      "description": "The country code. E.g. US"
                    },
                    "language_code": {
                      "type": "string",
                      "description": "The language code. E.g. en"
                    }
                  },
                  "description": "The user language details"
                },
                "company_id": {
                  "type": "integer",
                  "description": "The user company ID"
                },
                "company_name": {
                  "type": "string",
                  "description": "The user company name"
                },
                "company_domain": {
                  "type": "string",
                  "description": "The user company domain"
                },
                "company_country": {
                  "type": "string",
                  "description": "The user company country"
                },
                "company_industry": {
                  "type": "string",
                  "description": "The user company industry"
                }
              }
            }
          ]
        }
      }
    }
  ],
  "title": "getCurrentUserResponse200"
}
object UsersGetUser404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object UsersGetUserResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The user ID"
            },
            "lang": {
              "type": "integer",
              "description": "The user language ID"
            },
            "name": {
              "type": "string",
              "description": "The user name"
            },
            "email": {
              "type": "string",
              "description": "The user email"
            },
            "phone": {
              "type": "string",
              "nullable": true,
              "description": "The user phone"
            },
            "access": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app": {
                    "enum": [
                      "sales",
                      "projects",
                      "campaigns",
                      "global",
                      "account_settings"
                    ],
                    "type": "string"
                  },
                  "admin": {
                    "type": "boolean"
                  },
                  "permission_set_id": {
                    "type": "string"
                  }
                }
              }
            },
            "is_you": {
              "type": "boolean",
              "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
            },
            "locale": {
              "type": "string",
              "description": "The user locale"
            },
            "created": {
              "type": "string",
              "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "role_id": {
              "type": "integer",
              "description": "The ID of the user role"
            },
            "icon_url": {
              "type": "string",
              "nullable": true,
              "description": "The user icon URL"
            },
            "modified": {
              "type": "string",
              "nullable": true,
              "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "activated": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "last_login": {
              "type": "string",
              "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "timezone_name": {
              "type": "string",
              "description": "The user timezone name"
            },
            "timezone_offset": {
              "type": "string",
              "description": "The user timezone offset"
            },
            "default_currency": {
              "type": "string",
              "description": "The user default currency"
            },
            "has_created_company": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user has created a company"
            }
          }
        }
      }
    }
  ],
  "title": "userResponse200"
}
object UsersListFollowers403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object UsersListFollowersResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The list of user IDs"
        }
      }
    }
  ],
  "title": "userIds"
}
object UsersListPermissionsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "can_use_api": {
              "type": "boolean",
              "description": "If the user can use API"
            },
            "can_use_import": {
              "type": "boolean",
              "description": "If the user can use import"
            },
            "can_merge_deals": {
              "type": "boolean",
              "description": "If the user can merge deals"
            },
            "can_add_products": {
              "type": "boolean",
              "description": "If the user can add products"
            },
            "can_delete_deals": {
              "type": "boolean",
              "description": "If the user can delete deals"
            },
            "can_merge_people": {
              "type": "boolean",
              "description": "If the user can merge people"
            },
            "can_edit_products": {
              "type": "boolean",
              "description": "If the user can edit products"
            },
            "can_modify_labels": {
              "type": "boolean",
              "description": "If the user can modify labels"
            },
            "can_share_filters": {
              "type": "boolean",
              "description": "If the user can share filters"
            },
            "can_share_insights": {
              "type": "boolean",
              "description": "If the user can share insights"
            },
            "can_bulk_edit_items": {
              "type": "boolean",
              "description": "If the user can bulk edit items"
            },
            "can_see_other_users": {
              "type": "boolean",
              "description": "If the user can see other users"
            },
            "can_add_custom_fields": {
              "type": "boolean",
              "description": "If the user can add custom fields"
            },
            "can_delete_activities": {
              "type": "boolean",
              "description": "If the user can delete activities"
            },
            "can_edit_custom_fields": {
              "type": "boolean",
              "description": "If the user can edit custom fields"
            },
            "can_follow_other_users": {
              "type": "boolean",
              "description": "If the user can follow other users"
            },
            "can_use_email_tracking": {
              "type": "boolean",
              "description": "If the user can use email tracking"
            },
            "can_create_own_workflow": {
              "type": "boolean",
              "description": "If the user can create workflows"
            },
            "can_edit_shared_filters": {
              "type": "boolean",
              "description": "If the user can edit shared filters"
            },
            "can_merge_organizations": {
              "type": "boolean",
              "description": "If the user can merge organizations"
            },
            "can_delete_custom_fields": {
              "type": "boolean",
              "description": "If the user can delete custom fields"
            },
            "can_add_prospects_as_leads": {
              "type": "boolean",
              "description": "If the user can add prospects as leads"
            },
            "can_convert_deals_to_leads": {
              "type": "boolean",
              "description": "If the user can convert deals to leads"
            },
            "can_edit_deals_closed_date": {
              "type": "boolean",
              "description": "If the user can edit deals' closed date"
            },
            "can_export_data_from_lists": {
              "type": "boolean",
              "description": "If the user can export data from item lists"
            },
            "can_see_deals_list_summary": {
              "type": "boolean",
              "description": "If the user can see the summary on the deals page"
            },
            "can_see_hidden_items_names": {
              "type": "boolean",
              "description": "If the user can see the names of hidden items"
            },
            "can_see_security_dashboard": {
              "type": "boolean",
              "description": "If the user can see security dashboard"
            },
            "can_change_visibility_of_items": {
              "type": "boolean",
              "description": "If the user can change visibility of items"
            },
            "can_see_other_users_statistics": {
              "type": "boolean",
              "description": "If the user can see other users' statistics"
            },
            "can_see_company_wide_statistics": {
              "type": "boolean",
              "description": "If the user can see company-wide statistics"
            }
          }
        }
      }
    }
  ],
  "title": "getUserPermissionsResponse200"
}
object UsersListRoleAssignmentsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "type": "object",
                "title": "baseRoleRequest",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the role"
                  },
                  "parent_role_id": {
                    "type": "integer",
                    "description": "The ID of the parent role"
                  }
                },
                "description": "The details of the role"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The assignment type"
                  },
                  "role_id": {
                    "type": "integer",
                    "description": "The role ID"
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "The user ID"
                  },
                  "active_flag": {
                    "type": "boolean",
                    "description": "Whether the role is active or not"
                  }
                }
              }
            ],
            "title": "roleAssignment",
            "description": "The assignment data of the role"
          },
          "description": "The role assignments"
        },
        "additional_data": {
          "type": "object",
          "properties": {
            "pagination": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "integer",
                  "description": "Items shown per page"
                },
                "start": {
                  "type": "integer",
                  "description": "Pagination start"
                },
                "more_items_in_collection": {
                  "type": "boolean",
                  "description": "Whether there are more list items in the collection than displayed"
                }
              },
              "description": "The pagination details in the role list"
            }
          },
          "description": "The additional data in the role list"
        }
      }
    }
  ],
  "title": "getUserRoleAssignmentsResponse200"
}
object UsersListRoleSettingsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "org_access_level": {
              "type": "number",
              "description": "The access level of the organizations for the role (only for default role)"
            },
            "deal_access_level": {
              "type": "number",
              "description": "The access level of the deals for the role (only for default role)"
            },
            "person_access_level": {
              "type": "number",
              "description": "The access level of the people for the role (only for default role)"
            },
            "product_access_level": {
              "type": "number",
              "description": "The access level of the products for the role (only for default role)"
            },
            "org_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the organizations for the role"
            },
            "deal_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the deals for the role"
            },
            "lead_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the leads for the role"
            },
            "person_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the people for the role"
            },
            "product_default_visibility": {
              "type": "number",
              "description": "The default visibility level of the products for the role"
            }
          },
          "description": "The settings for the role"
        }
      }
    }
  ],
  "title": "getRoleSettingsResponse200"
}
object UsersUpdateDetails403Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object UsersUpdateDetails404Response
{
  "type": "object",
  "title": "failResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    }
  }
}
object UsersUpdateDetailsRequest
{
  "type": "object",
  "title": "updateUserRequest",
  "required": [
    "active_flag"
  ],
  "properties": {
    "active_flag": {
      "type": "boolean",
      "description": "Whether the user is active or not. `false` = Not activated, `true` = Activated"
    }
  }
}
object UsersUpdateDetailsResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The user ID"
            },
            "lang": {
              "type": "integer",
              "description": "The user language ID"
            },
            "name": {
              "type": "string",
              "description": "The user name"
            },
            "email": {
              "type": "string",
              "description": "The user email"
            },
            "phone": {
              "type": "string",
              "nullable": true,
              "description": "The user phone"
            },
            "access": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app": {
                    "enum": [
                      "sales",
                      "projects",
                      "campaigns",
                      "global",
                      "account_settings"
                    ],
                    "type": "string"
                  },
                  "admin": {
                    "type": "boolean"
                  },
                  "permission_set_id": {
                    "type": "string"
                  }
                }
              }
            },
            "is_you": {
              "type": "boolean",
              "description": "Boolean that indicates if the requested user is the same which is logged in (in this case, always true)"
            },
            "locale": {
              "type": "string",
              "description": "The user locale"
            },
            "created": {
              "type": "string",
              "description": "The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "role_id": {
              "type": "integer",
              "description": "The ID of the user role"
            },
            "icon_url": {
              "type": "string",
              "nullable": true,
              "description": "The user icon URL"
            },
            "modified": {
              "type": "string",
              "nullable": true,
              "description": "The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "activated": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "last_login": {
              "type": "string",
              "description": "The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS"
            },
            "active_flag": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user is activated"
            },
            "timezone_name": {
              "type": "string",
              "description": "The user timezone name"
            },
            "timezone_offset": {
              "type": "string",
              "description": "The user timezone offset"
            },
            "default_currency": {
              "type": "string",
              "description": "The user default currency"
            },
            "has_created_company": {
              "type": "boolean",
              "description": "Boolean that indicates whether the user has created a company"
            }
          }
        }
      }
    }
  ],
  "title": "userResponse200"
}
object WebhooksCreateNewWebhook400Response
{
  "allOf": [
    {
      "allOf": [
        {
          "type": "object",
          "title": "baseResponse",
          "properties": {
            "success": {
              "type": "boolean",
              "description": "If the response is successful or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "description": "The status of the response"
            }
          }
        }
      ],
      "title": "baseResponse200"
    },
    {
      "type": "object",
      "properties": {
        "errors": {
          "type": "object",
          "description": "List of errors"
        }
      }
    }
  ],
  "title": "webhooksBadRequestResponse"
}
object WebhooksCreateNewWebhook401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object WebhooksCreateNewWebhookRequest
{
  "type": "object",
  "title": "addWebhookRequest",
  "required": [
    "subscription_url",
    "event_action",
    "event_object"
  ],
  "properties": {
    "user_id": {
      "type": "integer",
      "description": "The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user's permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`."
    },
    "version": {
      "enum": [
        "1.0",
        "2.0"
      ],
      "type": "string",
      "default": "1.0",
      "description": "The webhook's version"
    },
    "event_action": {
      "enum": [
        "added",
        "updated",
        "merged",
        "deleted",
        "*"
      ],
      "type": "string",
      "description": "The type of action to receive notifications about. Wildcard will match all supported actions."
    },
    "event_object": {
      "enum": [
        "activity",
        "activityType",
        "deal",
        "note",
        "organization",
        "person",
        "pipeline",
        "product",
        "stage",
        "user",
        "*"
      ],
      "type": "string",
      "description": "The type of object to receive notifications about. Wildcard will match all supported objects."
    },
    "http_auth_user": {
      "type": "string",
      "description": "The HTTP basic auth username of the subscription URL endpoint (if required)"
    },
    "subscription_url": {
      "type": "string",
      "description": "A full, valid, publicly accessible URL which determines where to send the notifications. Please note that you cannot use Pipedrive API endpoints as the `subscription_url` and the chosen URL must not redirect to another link."
    },
    "http_auth_password": {
      "type": "string",
      "description": "The HTTP basic auth password of the subscription URL endpoint (if required)"
    }
  }
}
object WebhooksCreateNewWebhookResponse
{
  "allOf": [
    {
      "allOf": [
        {
          "type": "object",
          "title": "baseResponse",
          "properties": {
            "success": {
              "type": "boolean",
              "description": "If the response is successful or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "description": "The status of the response"
            }
          }
        }
      ],
      "title": "baseResponse200"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The ID of the Webhook"
            },
            "type": {
              "enum": [
                "general",
                "app"
              ],
              "type": "string",
              "description": "The type of the Webhook"
            },
            "user_id": {
              "type": "integer",
              "description": "The ID of the user related to the Webhook"
            },
            "add_time": {
              "type": "string",
              "format": "date-time",
              "description": "The date when the Webhook was added"
            },
            "admin_id": {
              "type": "integer",
              "description": "The ID of the admin of the Webhook"
            },
            "owner_id": {
              "type": "integer",
              "description": "The ID of the user who owns the Webhook"
            },
            "is_active": {
              "allOf": [
                {
                  "enum": [
                    0,
                    1
                  ],
                  "type": "number",
                  "title": "numberBooleanDefault1",
                  "default": 1
                }
              ],
              "description": "The Webhook's status"
            },
            "company_id": {
              "type": "integer",
              "description": "The ID of the company related to the Webhook"
            },
            "remove_time": {
              "type": "string",
              "format": "date-time",
              "nullable": true,
              "description": "The date when the Webhook was removed (if removed)"
            },
            "event_action": {
              "type": "string",
              "description": "The Webhook action"
            },
            "event_object": {
              "type": "string",
              "description": "The Webhook object"
            },
            "remove_reason": {
              "type": "string",
              "nullable": true,
              "description": "The removal reason of the Webhook (if removed)"
            },
            "http_auth_user": {
              "type": "string",
              "nullable": true,
              "description": "The username of the `subscription_url` of the Webhook"
            },
            "additional_data": {
              "type": "object",
              "description": "Any additional data related to the Webhook"
            },
            "last_http_status": {
              "type": "integer",
              "nullable": true,
              "description": "The last delivery HTTP status of the Webhook"
            },
            "subscription_url": {
              "type": "string",
              "description": "The subscription URL of the Webhook"
            },
            "http_auth_password": {
              "type": "string",
              "nullable": true,
              "description": "The password of the `subscription_url` of the Webhook"
            },
            "last_delivery_time": {
              "type": "string",
              "format": "date-time",
              "nullable": true,
              "description": "The last delivery time of the Webhook"
            }
          }
        }
      }
    }
  ],
  "title": "webhookResponse200"
}
object WebhooksDeleteExistingWebhook401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object WebhooksDeleteExistingWebhook403Response
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "The error message"
        }
      }
    }
  ]
}
object WebhooksDeleteExistingWebhook404Response
{
  "allOf": [
    {
      "allOf": [
        {
          "type": "object",
          "title": "baseResponse",
          "properties": {
            "success": {
              "type": "boolean",
              "description": "If the response is successful or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "description": "The status of the response"
            }
          }
        }
      ],
      "title": "baseResponse200"
    },
    {
      "type": "object",
      "properties": {
        "errors": {
          "type": "object",
          "description": "List of errors"
        }
      }
    }
  ],
  "title": "webhooksBadRequestResponse"
}
object WebhooksDeleteExistingWebhookResponse
{
  "allOf": [
    {
      "type": "object",
      "title": "baseResponse",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "If the response is successful or not"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "description": "The status of the response"
        }
      }
    }
  ],
  "title": "baseResponse200"
}
object WebhooksGetAll401Response
{
  "type": "object",
  "title": "unathorizedResponse",
  "properties": {
    "error": {
      "type": "string",
      "description": "The error message"
    },
    "success": {
      "type": "boolean",
      "description": "If the response is successful or not"
    },
    "errorCode": {
      "type": "integer",
      "description": "The response error code"
    }
  }
}
object WebhooksGetAllResponse
{
  "allOf": [
    {
      "allOf": [
        {
          "type": "object",
          "title": "baseResponse",
          "properties": {
            "success": {
              "type": "boolean",
              "description": "If the response is successful or not"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "description": "The status of the response"
            }
          }
        }
      ],
      "title": "baseResponse200"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the Webhook"
              },
              "type": {
                "enum": [
                  "general",
                  "app"
                ],
                "type": "string",
                "description": "The type of the Webhook"
              },
              "user_id": {
                "type": "integer",
                "description": "The ID of the user related to the Webhook"
              },
              "add_time": {
                "type": "string",
                "format": "date-time",
                "description": "The date when the Webhook was added"
              },
              "admin_id": {
                "type": "integer",
                "description": "The ID of the admin of the Webhook"
              },
              "owner_id": {
                "type": "integer",
                "description": "The ID of the user who owns the Webhook"
              },
              "is_active": {
                "allOf": [
                  {
                    "enum": [
                      0,
                      1
                    ],
                    "type": "number",
                    "title": "numberBooleanDefault1",
                    "default": 1
                  }
                ],
                "description": "The Webhook's status"
              },
              "company_id": {
                "type": "integer",
                "description": "The ID of the company related to the Webhook"
              },
              "remove_time": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "The date when the Webhook was removed (if removed)"
              },
              "event_action": {
                "type": "string",
                "description": "The Webhook action"
              },
              "event_object": {
                "type": "string",
                "description": "The Webhook object"
              },
              "remove_reason": {
                "type": "string",
                "nullable": true,
                "description": "The removal reason of the Webhook (if removed)"
              },
              "http_auth_user": {
                "type": "string",
                "nullable": true,
                "description": "The username of the `subscription_url` of the Webhook"
              },
              "additional_data": {
                "type": "object",
                "description": "Any additional data related to the Webhook"
              },
              "last_http_status": {
                "type": "integer",
                "nullable": true,
                "description": "The last delivery HTTP status of the Webhook"
              },
              "subscription_url": {
                "type": "string",
                "description": "The subscription URL of the Webhook"
              },
              "http_auth_password": {
                "type": "string",
                "nullable": true,
                "description": "The password of the `subscription_url` of the Webhook"
              },
              "last_delivery_time": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "The last delivery time of the Webhook"
              }
            }
          },
          "description": "The array of Webhooks"
        }
      }
    }
  ],
  "title": "getWebhooksResponse200"
}