---
title: "Get Leaderboard By Church"
method: GET
path: "/api/leaderboard/by-church/{church_id}"
tags: ["leaderboard"]
---

# Get Leaderboard By Church

`GET /api/leaderboard/by-church/{church_id}`

Get the streak leaderboard for a specific church id.
Returns all users in that church, ranked by streak count.
Used by the church map detail view, and by the church-admin dashboard
(authenticated with the church-admin session cookie for its own church).

## Path parameters

- `church_id` integer, required

## Cookies

- `ca_session` string, nullable

## Response `200`

Successful Response

- LeaderboardResponse
  - `success` boolean, required
  - `entries` LeaderboardEntry[], required
    - `rank` integer, required
    - `user_id` string, required
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `profile_picture` string, nullable
    - `streak_count` integer
    - `church_id` integer, nullable
    - `church_name` string, nullable
  - `total_count` integer, required
  - `user_rank` integer, nullable
  - `user_entry` LeaderboardEntry
    - `rank` integer, required
    - `user_id` string, required
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `profile_picture` string, nullable
    - `streak_count` integer
    - `church_id` integer, nullable
    - `church_name` string, nullable
  - `context_name` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/revisions/39e293adecd1/schema)
