---
title: "Get NHS App Account details"
method: GET
path: "/channels/nhsapp/accounts"
---

# Get NHS App Account details

`GET /channels/nhsapp/accounts`

## Overview

Use this endpoint to get details of patients registered with the NHS App for a given GP surgery, and an indication of whether they have enabled push notifications on one or more devices. The response will only include patients who have had their identity verified to the high (P9) level.

This information can be used by client applications to determine whether it is appropriate to attempt to use the NHS App channel to send in-app messages and push notifications to patients, or if alternative communication channels should be used instead.

The information provided by this endpoint is generated by a daily batch process. Client applications should cache and refresh local copies of this data accordingly.

## Pagination

To avoid returning excessively large response bodies, the results may be split across multiple pages. On retrieving the response for the first page of results, the Response body will contain links to the current page, the next page and the last page. If there are further pages, these can be retrieved by making additional request(s) with the page parameter specified.

## Query parameters

- `ods-organisation-code` string, required
- `page` number

## Parameters

- `#/paths/~1v1~1messages/post/parameters/0` — unresolved $ref
- `#/paths/~1v1~1messages/post/parameters/1` — unresolved $ref

## Response `200`

Request successful.

- object
  - `data` object
    - `type` 'NhsAppAccounts', required
    - `id` Schema, required — unresolved $ref
    - `attributes` object, required
      - `accounts` object[], required
        - `nhsNumber` string, required — The patient's NHS number.
        - `notificationsEnabled` boolean, required — Indicates whether the patient has enabled native Android or Apple push notifications on at least one device.
  - `links` object — Contains links to related objects.
    - `last` string, uri, required — URI of the final page of data.
    - `next` string, uri — URI of the next page of data.
    - `self` string, uri, required — URI of this page of data.

## Other responses

- `400` — A validation error has occurred with the request sent. The following validation errors can occur: | Error code | Title | Description | | ---------- | ----- | ----------- | | `CM_INVALID_REQUEST` | Invalid Request | The ODS code is missing or invalid, detail provided in the `detail` field. | Within each error is a source object which details the location of the error within your request body. This is done using a pointer that uses the [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) as per the [JSON:API Error Specification](https://jsonapi.org/format/#errors).
- `401` — unresolved $ref
- `403` — unresolved $ref
- `404` — The requested page has not been found, check the ODS code and page boundaries for any errors and try again. ### Sandbox On sandbox it is possible to simulate a 404 not found error using the `Prefer` header with a value of `code=404`. Here is an example curl request to trigger a `404`: ``` curl -X GET \ --header "Accept: */*" \ --header "Content-type: application/vnd.api+json" \ --header "Prefer: code=404" \ https://sandbox.api.service.nhs.uk/comms ```
- `405` — unresolved $ref
- `406` — unresolved $ref
- `408` — unresolved $ref
- `429` — This endpoint is currently receiving a high volume of requests and is being rate limited. If you have a retry mechanism in your HTTP client you may want to look at implementing an [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff). ### Sandbox It is possible to trigger this on the sandbox by using the `Prefer` header with a value of `code=429`. Here is an example curl request to trigger a `429`: ``` curl -X GET --header "Prefer: code=429" https://sandbox.api.service.nhs.uk/comms/ ```
- `500` — An error has occured that is stopping your request from being processed. ### Sandbox It is possible to trigger the `CM_INTERNAL_SERVER_ERROR` on the sandbox by using the `Prefer` header with a value of `code=500`. Here is an example curl request to trigger a `500`: ``` curl -X GET --header "Prefer: code=500" https://sandbox.api.service.nhs.uk/comms ```
- `502` — NHS Notify is currently unable to communicate with a downstream API required to process your request. ### Sandbox It is possible to trigger the `CM_BAD_GATEWAY` on the sandbox by using the `Prefer` header with a value of `code=502`. Here is an example curl request to trigger a `502`: ``` curl -X GET --header "Prefer: code=502" https://sandbox.api.service.nhs.uk/comms ```
- `503` — unresolved $ref
- `504` — unresolved $ref

---

[API](https://skmtc.dev/nhs/apis/communications-manager-api.md) · [All operations](https://skmtc.dev/nhs/apis/communications-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nhs/communications-manager-api/revisions/286b22343680/schema)
