---
title: "Get the next scheduled state change for a list of users"
method: GET
path: "/api/v2/bulk/userstates/eventlist/next"
tags: ["Bulk Job Requests"]
---

# Get the next scheduled state change for a list of users

`GET /api/v2/bulk/userstates/eventlist/next`

## Request

- Base URL: `https://console.jumpcloud.com`
- URL: `https://console.jumpcloud.com/api/v2/bulk/userstates/eventlist/next`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/docs/api/v2/bulk/userstates/eventlist/next/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint is used to lookup the next upcoming scheduled state change for each user in the
given list. The users parameter is limited to 100 items per request. The results are also limited
to 100 items. This endpoint returns a max of 1 event per state per user. For example, if a user
has 3 ACTIVATED events scheduled it will return the next upcoming activation event. However, if a
user also has a SUSPENDED event scheduled along with the ACTIVATED events it will return the next
upcoming activation event _and_ the next upcoming suspension event.

## Query parameters

- `users` string[], required
- `limit` integer
- `skip` integer

## Response `200`

OK

- object
  - `events_count` integer: The total number of ACTIVATED and SUSPENDED events to a max depth of 1 for all of the users in the query. A value larger than the limit specified on the query indicates that additional calls are needed, using a skip greater than 0, to retrieve the full set of results.
  - `results` ScheduledUserstateResult[]
    - `scheduledJobId` string: The id of the scheduled job that scheduled the state change.
    - `scheduledDate` string: The UTC date and time when the scheduled job will execute.
    - `state` string: The state that the user will be in once the scheduled job executes.
    - `systemUserId` string: The id of the user that the scheduled job will update.

## Other responses

- `400`: Bad Request
- `401`: Unauthenticated
- `403`: Unauthorized
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/revisions/f396d9271b46?raw)
