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

# New users

> Returns info on new users over a given time period.

<br>
<strong>Note:</strong> The aggregation and grouping of the returned values is controlled by the optional time period given in `params`:
- one day will return values per hour
- up to 30 days returns values per day
- greater than 30 days returns values per month
- greater than a year returns values per year

## OpenAPI

````json POST /analytics/new_users
{
  "openapi": "3.1.0",
  "info": {
    "title": "external-api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.eu.xtremepush.com/api/external"
    }
  ],
  "paths": {
    "/analytics/new_users": {
      "post": {
        "summary": "New users",
        "description": "Returns info on new users over a given time period.\n\n<br>\n<strong>Note:</strong> The aggregation and grouping of the returned values is controlled by the optional time period given in `params`:\n- one day will return values per hour\n- up to 30 days returns values per day\n- greater than 30 days returns values per month\n- greater than a year returns values per year",
        "operationId": "analytics-new-users",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apptoken",
                  "from",
                  "to"
                ],
                "properties": {
                  "apptoken": {
                    "type": "string",
                    "description": "Your App token"
                  },
                  "from": {
                    "type": "string",
                    "description": "Start date for the analytics query (YYYY-MM-DD)"
                  },
                  "to": {
                    "type": "string",
                    "description": "End date for the analytics query (YYYY-MM-DD)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Grouped",
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": "200",
                          "default": "0"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "periods": {
                              "type": "object"
                            }
                          }
                        },
                        "message": {
                          "type": "string",
                          "example": ""
                        },
                        "success": {
                          "type": "boolean",
                          "example": "true",
                          "default": "true"
                        }
                      }
                    },
                    {
                      "title": "Totals",
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": "200",
                          "default": "0"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "totals": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string",
                                  "example": "1015"
                                }
                              }
                            }
                          }
                        },
                        "message": {
                          "type": "string",
                          "example": ""
                        },
                        "success": {
                          "type": "boolean",
                          "example": "true",
                          "default": "true"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Grouped": {
                    "value": {
                      "code": "200",
                      "data": {
                        "periods": {
                          "01-Feb": {
                            "amount": "10"
                          },
                          "02-Feb": {
                            "amount": "11"
                          },
                          "03-Feb": {
                            "amount": "56"
                          },
                          "04-Feb": {
                            "amount": "44"
                          },
                          "05-Feb": {
                            "amount": "38"
                          },
                          "06-Feb": {
                            "amount": "77"
                          },
                          "07-Feb": {
                            "amount": "68"
                          },
                          "08-Feb": {
                            "amount": "99"
                          },
                          "09-Feb": {
                            "amount": "45"
                          },
                          "10-Feb": {
                            "amount": "63"
                          },
                          "11-Feb": {
                            "amount": "23"
                          },
                          "12-Feb": {
                            "amount": "75"
                          },
                          "13-Feb": {
                            "amount": "44"
                          },
                          "14-Feb": {
                            "amount": "56"
                          },
                          "15-Feb": {
                            "amount": "78"
                          },
                          "16-Feb": {
                            "amount": "45"
                          },
                          "17-Feb": {
                            "amount": "54"
                          },
                          "18-Feb": {
                            "amount": "37"
                          },
                          "19-Feb": {
                            "amount": "41"
                          },
                          "20-Feb": {
                            "amount": "38"
                          },
                          "21-Feb": {
                            "amount": "42"
                          },
                          "22-Feb": {
                            "amount": "65"
                          },
                          "23-Feb": {
                            "amount": "83"
                          },
                          "24-Feb": {
                            "amount": "23"
                          },
                          "25-Feb": {
                            "amount": "88"
                          },
                          "26-Feb": {
                            "amount": "97"
                          },
                          "27-Feb": {
                            "amount": "104"
                          },
                          "28-Feb": {
                            "amount": "121"
                          }
                        }
                      },
                      "success": "true"
                    }
                  },
                  "Totals": {
                    "value": {
                      "code": "200",
                      "data": {
                        "totals": {
                          "amount": "1015"
                        }
                      },
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": "false",
                      "default": "true"
                    },
                    "code": {
                      "type": "integer",
                      "example": "400",
                      "default": "0"
                    },
                    "message": {
                      "type": "string",
                      "example": "General error information"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "success": "false",
                      "code": "400",
                      "message": "General error information",
                      "errors": [
                        {
                          "text": [
                            "Detailed information about the specific error"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Analytics Methods"
        ]
      }
    }
  }
}
````

