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"
}