---
title: "REST API: Update Event View Count"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2011-03-29T05:40:42Z
updated: 2026-09-28T01:21:05Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/497/rest-api-update-event-view-count"
---

# REST API: Update Event View Count

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=497)
PUT/api/events/viewcount

Set an event's view count to a specific number. Only site administrators can call it, unless the AllowAPICallToSetEventViewCount system property is on. To add one view, use Increase View Count instead. ResponseData is true.

## Request

### Request Header
| Header | Required | Value | Description |
| :--- | :--- | :--- | :--- |
| `Authorization` | YES | `Bearer YOUR_TOKEN` | Bearer token for the authenticated user. [Learn how to create Bearer tokens](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens). |
| `Content-Type` | YES | `application/json` | Must be set to `application/json` |
### Required Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `EventID` | Integer | YES | Query | Unique ID for a particular event |
| `EventCount` | String | YES | Body | The number to set as the event's view count. Send it on its own as the whole request body, as a number or a numeric string. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
```

### Request URL

`https://your-site.com/api/events/viewcount?EventID=222`

### Request Body

```
10
```

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": true
}
```

### Error Response

```
{
  "Message": "The request is invalid."
}
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | EventID is not an integer. | Send a numeric EventID in the query string. |
| 401 Unauthorized | Missing or invalid Bearer token. | Check token validity. [Learn how to create Bearer tokens →](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens) |
| 403 Forbidden | The caller is not a site administrator and the AllowAPICallToSetEventViewCount system property is off \(its default\). | Call as a site administrator, or have the property switched on. |
| 500 Server Error | The body is missing or is not a whole number, or another internal failure. | Send the count as a whole number in the body, then retry later. |

## Rate Limits

While Axero does not enforce hard rate limits by default, we recommend the following best practices to ensure optimal performance:

- **Sustained Request Rate:** Do not exceed 5 API calls per second
- **Sequential Processing:** Wait for each request to complete before sending the next in automated workflows
- **Concurrent Connections:** If parallel processing is required, limit to 3 or fewer simultaneous requests
- **Response Timeout:** Ensure API responses complete within 15 seconds during testing

Axero may implement temporary rate restrictions if excessive API usage affects overall site performance. For high-volume integrations, contact Axero to discuss your requirements.
