---
title: "Update a single connection"
method: PATCH
path: "/users/{userId}/connections/{connectionId}"
tags: ["user connections"]
---

# Update a single connection

`PATCH /users/{userId}/connections/{connectionId}`

## Request

- Base URL: `https://identity.moneyhub.co.uk`
- URL: `https://identity.moneyhub.co.uk/users/{userId}/connections/{connectionId}`
- Auth: API key in header `Authorization`

Requires **user:update** scope and for the API client to user their own consent screens i.e. not have Enforce user consent enabled. This endpoint can only currently be used to update the expiresAt field which is the date which the user has consented to.

## Path parameters

- `userId` string, required
- `connectionId` string, required

## Request body

- ConnectionPatch
  - `expiresAt` string, date-time, required: The date to set the connection consent to expire.

## Response `204`

Successful Response

## Other responses

- `400`: Unsuccessful Response - Bad Request - Invalid value
- `401`: Unsuccessful Response - Not authorised - Missing authorization header - Invalid access Token
- `403`: Unsuccessful Response - Forbidden - Invalid scopes, Insufficient client permissions
- `404`: Unsuccessful Response - Resource Not found

## Changes

- **2026-11-03** `e004d9ee1fdb`: 8 warning
  - removed the optional property `id` from the response with the `400` status
  - removed the optional property `id` from the response with the `401` status
  - removed the optional property `id` from the response with the `403` status
  - removed the optional property `id` from the response with the `404` status
  - …4 more

[Operation history](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/changes/users/:userId/connections/:connectionId/patch.md)

---

[API](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service.md) - [All operations](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/llms.txt) - [OpenAPI document](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/revisions/e004d9ee1fdb?raw)
