Notifications
Function-calling namespace: notifications
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/notifications/create
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
recipientStackUserId | string | Yes |
recipientRole | string | Yes |
type | string | Yes |
title | string | Yes |
message | string | Yes |
priority | string | No |
relatedEntityType | string | No |
relatedEntityId | string | No |
actionUrl | string | No |
navigationTarget | string | No |
navigationParams | map[string]interface{} | No |
channels | []string | No |
deliveryState | string | No |
pushTicketIds | []string | No |
deliveryError | string | No |
dedupeKey | string | No |
expiresAt | *int64 | No |
isRead | bool | No |
readAt | *int64 | No |
openedAt | *int64 | No |
createdAt | *int64 | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "notifications",
"apiName": "create",
"data": {
"organizationId": "org_123",
"recipientStackUserId": "recipientstackuser_123",
"recipientRole": "value",
"type": "GENERAL",
"title": "value",
"message": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/notifications/delete
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "notifications",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/notifications/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "notifications",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/notifications/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "notifications",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/notifications/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
recipientStackUserId | *string | No |
recipientRole | *string | No |
type | *string | No |
title | *string | No |
message | *string | No |
priority | *string | No |
relatedEntityType | *string | No |
relatedEntityId | *string | No |
actionUrl | *string | No |
navigationTarget | *string | No |
navigationParams | *map[string]interface{} | No |
channels | *[]string | No |
deliveryState | *string | No |
pushTicketIds | *[]string | No |
deliveryError | *string | No |
dedupeKey | *string | No |
expiresAt | *int64 | No |
isRead | *bool | No |
readAt | *int64 | No |
openedAt | *int64 | No |
createdAt | *int64 | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "notifications",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }