---
title: "Close a poll, optionally writing its result into an Entry"
method: POST
path: "/groups/{groupId}/polls/{pollId}/close"
tags: ["Group features"]
---

# Close a poll, optionally writing its result into an Entry

`POST /groups/{groupId}/polls/{pollId}/close`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/groups/{groupId}/polls/{pollId}/close`
- Auth: HTTP bearer

The group's owner or an admin, or whoever opened the poll.

## Path parameters

- `groupId` string, uuid, required
- `pollId` string, uuid, required

## Request body

- CloseGroupPollRequest
  - `entryId` string, uuid, nullable

## Response `200`

OK

- object
  - `data` GroupPoll, required
    - `id` string, uuid, required
    - `groupId` string, uuid, required
    - `createdBy` string, uuid, required
    - `creator` DiaryMember, required
      - `id` string, uuid, required
      - `username` string, nullable, required
      - `displayName` string, nullable, required
      - `avatarUrl` string, nullable, required
    - `status` 'open' | 'closed', required
    - `createdAt` string, required
    - `closedAt` string, nullable, required
    - `expiresAt` string, nullable, required
    - `anonymous` boolean, required
    - `questions` GroupPollQuestion[], required
      - `id` string, uuid, required
      - `prompt` string, required
      - `options` GroupPollOption[], required
        - `id` string, uuid, required
        - `label` string, required
        - `voteCount` integer, required
        - `voters` DiaryMember[]
          - `id` string, uuid, required
          - `username` string, nullable, required
          - `displayName` string, nullable, required
          - `avatarUrl` string, nullable, required
      - `totalVotes` integer, required
      - `myOptionId` string, uuid, nullable, required
    - `decisionEntryId` string, uuid, nullable, required
    - `decisionCommitId` string, uuid, nullable, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `403`: Not the poll's creator, nor an owner or admin
- `404`: Not found
- `422`: The poll is already closed

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
