POST
/
v1
/
authorize
Validate User Permission
curl --request POST \
  --url https://auth.sandbox.midaz.io/v1/authorize \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": "post",
  "resource": "ledger",
  "sub": "admin"
}'
{
"authorized": true,
"timestamp": "1744052319"
}

Headers

Authorization
string
required

Authorization Token.

Body

application/json

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

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

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.