# Analytics site import run

`POST /analytics/site/import` · Rivier · analytics

Bring in daily page-view totals from another tool for days before today that have nothing counted here.

- Scope: analytics:write
- Graphql: Mutation.analyticsSiteImportRun
- Sdk: analytics.siteImport.run
- Cli: analytics site import run

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "maxLength": 80
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "views": {
            "type": "integer",
            "minimum": 0
          },
          "visitors": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "day",
          "views"
        ],
        "additionalProperties": false
      },
      "maxItems": 1100
    }
  },
  "required": [
    "rows"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/analytics/site/import' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "rows": [
    {
      "day": "string",
      "views": 0
    }
  ]
}'
```
