Overview
POST/notifications/preferencesnotifications

Create a notification preference for one category

Create a record in preferences.

Auth: bearerAuth — calls run as the authenticated user.

Request body

application/json · optional

  • category"account" | "community_reply" | "community_mention" | …
  • emailboolean
  • smsboolean
Example
{
  "category": "account",
  "email": true,
  "sms": true
}
Responses
201

Preference created; all preferences returned

  • preferencesNotificationPreference[]
Example
{
  "preferences": [
    {
      "category": "account",
      "email": true,
      "sms": true
    }
  ]
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
409

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/notifications/preferences" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "category": "account",
  "email": true,
  "sms": true
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/notifications/preferences", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"category\": \"account\",\n  \"email\": true,\n  \"sms\": true\n}",
});
const data = await res.json();