Admin
Create a custom role
Defines a merchant-scoped role from an explicit permission set. Every code is validated against the permission catalogue, and a creator can never grant a permission they do not hold themselves.
Authorization
HTTPBearer AuthorizationBearer <token>
JWT access token
In: header
Query Parameters
merchant_id?|
Optional merchant to act on. Must be one you are a member of.
Format
uuidHeader Parameters
X-Merchant-ID?string|null
Request Body
application/json
A merchant-defined role.
permissions is validated against the Permission enum server-side, and a
creator can never grant a permission they do not themselves hold.
description?string
Length
length <= 500Default
""name*string
Match
^[A-Za-z][A-Za-z0-9 _-]*$Length
2 <= length <= 32permissions*array<string>
Items
1 <= itemsResponse Body
application/json
application/json
curl -X POST "https://example.com/api/v1/roles" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "permissions": [ "string" ] }'{ "data": { "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_custom": false, "name": "string", "permissions": [ "string" ] }, "meta": {}, "success": true}