> ## Documentation Index
> Fetch the complete documentation index at: https://developers.nutshell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a list of leads

Get a list of all leads and associated data in your Nutshell Instance.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/leads": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get a list of leads",
        "description": "Get a list of all leads and associated data in your Nutshell Instance.",
        "operationId": "132e65861bebcb3781c3d37e66aff309",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Used to search all related info on an entity. Returns all entities that are similar to the query term.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort the returned list by a chosen field. Use a '-' before the field name to sort in descending order.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "-age",
                "-value",
                "-milestone",
                "-confidence",
                "-name",
                "-closedTime",
                "-owner",
                "-sources",
                "age",
                "value",
                "milestone",
                "confidence",
                "name",
                "closedTime",
                "owner",
                "sources"
              ]
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "explode": true,
            "schema": {
              "description": "Filter the returned leads based on various criteria. Use /rest/leads/list/fields to get a full list of valid filter keys.",
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/FilterInput"
              }
            }
          },
          {
            "name": "page[page]",
            "in": "query",
            "description": "The page of results to return. Indexing is 0-based.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page[limit]",
            "in": "query",
            "description": "How many results to return per page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Leads",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FilterInput": {
        "description": "The key-value pair for the filter, ex. filter[tags]=1-tags",
        "type": "string"
      },
      "LeadResponse": {
        "description": "A full response object for a lead-related endpoint.",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/meta"
          },
          "links": {
            "type": "object"
          },
          "leads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FullLead"
            }
          }
        },
        "type": "object"
      },
      "FullLead": {
        "description": "A fully-fleshed lead.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Lead"
          },
          {
            "$ref": "#/components/schemas/HtmlLinkable"
          },
          {
            "$ref": "#/components/schemas/Avatarable"
          }
        ]
      },
      "Lead": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/HtmlLinkable"
          },
          {
            "$ref": "#/components/schemas/Avatarable"
          },
          {
            "properties": {
              "id": {
                "description": "The API ID of this entity, formatted {integer}-{entityType}",
                "type": "string",
                "example": "3-contacts"
              },
              "deletedTime": {
                "type": "string"
              },
              "name": {
                "description": "The full name of the lead",
                "type": "string",
                "example": "John Doe"
              },
              "value": {
                "$ref": "#/components/schemas/value"
              },
              "number": {
                "type": "integer",
                "format": "int64",
                "example": "1234"
              },
              "description": {
                "type": "string",
                "example": "This is a description"
              },
              "createdTime": {
                "$ref": "#/components/schemas/createdTime"
              },
              "closedTime": {
                "type": "string"
              },
              "dueTime": {
                "type": "string"
              },
              "anticipatedClosedTime": {
                "type": "string"
              },
              "ownerType": {
                "type": "string",
                "example": "users"
              },
              "status": {
                "description": "The current status of the lead",
                "type": "string",
                "example": "open"
              },
              "lastContactedTime": {
                "description": "When the lead was last contacted.",
                "format": "string"
              },
              "pieState": {
                "type": "string"
              },
              "isOverdue": {
                "description": "Whether the lead is overdue to have a final outcome set",
                "type": "boolean",
                "example": "false"
              },
              "overdueTime": {
                "type": "string"
              },
              "href": {
                "type": "string"
              },
              "confidence": {
                "description": "How confident, as a percentage, that the lead will close",
                "type": "integer",
                "example": 25
              },
              "priority": {
                "description": "Whether a lead is marked as hot (1) or not (0)",
                "type": "integer",
                "example": 0
              },
              "isCurrentUserWatching": {
                "description": "Whether the current authenticated user is subscribed to receive notifications about this lead",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "value": {
        "properties": {
          "formatted": {
            "description": "The value formatted as a string",
            "type": "string",
            "example": "$100.00"
          },
          "amount": {
            "description": "The value as a number",
            "type": "string",
            "example": "100.00"
          },
          "currency": {
            "description": "The currency code",
            "type": "string",
            "example": "USD"
          }
        },
        "type": "object"
      },
      "createdTime": {
        "description": "When the lead was created.",
        "properties": {
          "absoluteLocalizedString": {
            "description": "The value formatted as a string",
            "type": "string",
            "example": "May 28, 2024"
          },
          "timestamp": {
            "type": "number",
            "example": "1234567890"
          },
          "value": {
            "description": "The value to be formatted",
            "type": "string",
            "example": "May 28, 2024"
          }
        },
        "type": "object"
      },
      "Avatarable": {
        "properties": {
          "avatarUrl": {
            "description": "The URL of the entity's avatar image.",
            "type": "string",
            "example": "https://app.nutshell.com/avatars/contacts/1006/{path}"
          },
          "initials": {
            "description": "The initials of the entity, used as a fallback for the avatar image.",
            "type": "string",
            "example": "AF"
          }
        },
        "type": "object"
      },
      "HtmlLinkable": {
        "description": "Adds an htmlUrl string attribute that represents a URL of an HTML representation of the\nresponse model.",
        "properties": {
          "htmlUrl": {
            "description": "The link to the entity within the app.",
            "type": "string",
            "example": "https://app.nutshell.com/lead/1006"
          },
          "htmlUrlPath": {
            "description": "The path to the entity within the app.",
            "type": "string",
            "example": "/lead/1006"
          }
        },
        "type": "object"
      },
      "meta": {
        "description": "Information about the Nutshell instance making the request",
        "properties": {
          "instanceId": {
            "description": "The Nutshell instance ID",
            "type": "string",
            "example": "12345"
          },
          "siteId": {
            "description": "Site ID for WebFX customers",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Leads",
      "description": "Leads"
    }
  ]
}
```