---
title: "Validate User Permission"
method: POST
path: "/v1/authorize"
tags: ["Authorization API"]
---

# Validate User Permission

`POST /v1/authorize`

Use this endpoint to check if a user is allowed to perform a specific action on a resource. Typically used in M2M authentication with Midaz.

## Headers

- `Authorization` string

## Request body

- EnforcePermissionInput — Information used to validate whether a user has permission to perform a specific action on a given resource.
  - `action` string, required — The operation being performed on the resource.
  - `resource` string, required — The resource the action applies to, typically a service or domain within the system.
  - `sub` string — Subject requesting access. Usually a `midaz_role` or a `user_id`. If not provided, it's extracted from the token.

## Response `200`

Indicates that the resource was successfully created and the operation was completed as expected.

- EnforcePermissionResult — Information given as the successful response for the Enfore User Permission endpoint.
  - `authorized` boolean — If `true`, it indicates that the user is authorized to perform the action.
  - `timestamp` string, date-time — The time when the permission was verified.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `500`

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
