API reference › Notifications › Role event trigger notifications
Store or update role event trigger notification
POST /v1/settings/role-event-trigger-notifications
- Scope
settings_notifications_preferences:edit- Roles
- admin, scheduler
Creates new notification or updates existing one based on role_id. Supports partial updates - only provided fields will be updated.
Parameters
None of its own.
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Request body required
Single notification object - supports partial updates
| Field | Type | Description |
|---|---|---|
roleId | integer | Role ID (required) Example |
inApp | boolean | Enable in-app notifications (optional) Example |
email | boolean | Enable email notifications (optional) Example |
sms | boolean | Enable SMS notifications (optional) Example |
canOverride | boolean | Whether the role can override (optional) Example |
Example
{
"roleId": 2,
"inApp": true,
"email": false,
"sms": true,
"canOverride": false
}Example request
curl -X POST "https://api.fetchfido.ai/v1/settings/role-event-trigger-notifications" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"roleId":2,"inApp":true,"email":false,"sms":true,"canOverride":false}'Try it
Responses
200 Successful creation/update
Successful creation/update
{
"success": true,
"message": "Role event trigger notification updated successfully"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'settings_notifications_preferences:edit' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation error
{
"success": false,
"message": "The given data was invalid.",
"errors": {
"roleId": [
"The selected roleId is invalid."
],
"inApp": [
"The inApp field must be true or false."
],
"email": [
"The email field must be true or false."
],
"sms": [
"The sms field must be true or false."
],
"canOverride": [
"The canOverride field must be true or false."
]
}
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | object |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |