---
title: "Get campaign leaderboard"
method: GET
path: "/vocalize/2/campaigns/{campaignId}/leaderboard"
tags: ["customer-engagement", "vocalize", "campaign"]
---

# Get campaign leaderboard

`GET /vocalize/2/campaigns/{campaignId}/leaderboard`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/vocalize/2/campaigns/{campaignId}/leaderboard`
- Auth: API key in header `Authorization`

Get leaderboard for a campaign, sorted by score. Additional query parameters can be used to filter and paginate the results. Filter by fromTime and toTime to get scores within a specific time range. Filter by day to get scores for a specific day of the campaign. You cannot use both fromTime/toTime and day together. If no filters are provided, the leaderboard will show all scores for the campaign, paginated. Users who have not provided their name will not be included in the leaderboard.

## Path parameters

- `campaignId` string, uuid, required: The UUID of the campaign to retrieve the leaderboard for.

## Query parameters

- `page` integer: Page number.
- `size` integer: Number of records per page.
- `fromTime` string, date-time: Start time for filtering scores (datetime, ISO string, or Unix timestamp). Example value: 2023-10-01T00:00:00Z.
- `toTime` string, date-time: End time for filtering scores (datetime, ISO string, or Unix timestamp). Example value: 2023-10-31T23:59:59Z.
- `day` integer: Retrieves scores for a specific day. Can't be used with fromTime/toTime. Days count starts at 0, which means that the API will return scores for the first day of the campaign.

## Response `200`

Leaderboard retrieved successfully

- 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719LeaderboardResponse
  - `scores` 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719LeaderboardEntry[], required: List of scores for the leaderboard.
    - `name` string: Name of the participant, if available.
    - `userId` string, required: Unique identifier of the participant, usually in the format of a phone number, e.g., 00387123456.
    - `score` integer, required: Score of the participant in the leaderboard, ranging from 0 to 1000.
    - `date` string, date-time, required: Date and time when the score was recorded, in ISO 8601 format (e.g., 2023-10-01T00:00:00Z).
  - `paging` 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719PagingInfo, required
    - `page` integer: Page number.
    - `size` integer: Number of records per page.
    - `totalPages` integer, required: Total number of pages available based on the total number of records and page size.
    - `totalResults` integer, required: Total number of records available across all pages.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
