---
title: "Authorize a user"
method: POST
path: "/users/{userId}/authorize-user"
tags: ["Users"]
---

# Authorize a user

`POST /users/{userId}/authorize-user`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/users/{userId}/authorize-user`
- Auth: API key in header `clevergy-api-key`

Authorizes a user resource (a house) to another user

## Path parameters

- `userId` string, uuid, required

## Request body

- AuthorizeUserRequest
  - `cups` string, required: The ID of the supply point to authorize
  - `authorizedUserId` string, required: The ID of the user to authorize
  - `status` 'AUTHORIZED' | 'REVOKED', required: The authorization status

## Response `201`

Authorized successfully

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
