List behavior categories
GET /api/PreferenceProfiles/behavior-categoriesAuthentication
Section titled “Authentication”Send your private API key in the X-Api-Key header. Keep it on your server.
Request example
Section titled “Request example”Examples use illustrative values. Set FERRETLY_API_KEY in your server environment for JavaScript, Python, and C#. Replace sample IDs, URLs, and profile values before use.
curl --fail -sS -X GET "https://api.ferretly.com/api/PreferenceProfiles/behavior-categories" \ -H "X-Api-Key: YOUR_API_KEY" \ -H "Accept: application/json"const response = await fetch("https://api.ferretly.com/api/PreferenceProfiles/behavior-categories", { "method": "GET", "headers": { "X-Api-Key": process.env.FERRETLY_API_KEY, "Accept": "application/json" }});if (!response.ok) throw new Error("HTTP " + response.status);console.log(await response.json());import osimport requests
response = requests.request( "GET", "https://api.ferretly.com/api/PreferenceProfiles/behavior-categories", headers={"X-Api-Key":os.environ["FERRETLY_API_KEY"],"Accept":"application/json"}, timeout=30,)response.raise_for_status()print(response.json())using System;using System.IO;using System.Net.Http;using System.Text;
using var http = new HttpClient();using var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.ferretly.com/api/PreferenceProfiles/behavior-categories");request.Headers.Add("X-Api-Key", Environment.GetEnvironmentVariable("FERRETLY_API_KEY"));request.Headers.Accept.ParseAdd("application/json");using var response = await http.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Responses
Section titled “Responses”Success
text/plain: array of PreferenceProfileBehaviorCategoryapplication/json: array of PreferenceProfileBehaviorCategorytext/json: array of PreferenceProfileBehaviorCategory
Response example
Section titled “Response example”Illustrative, shortened HTTP 200 response. Optional fields can be absent or null.
[ { "id": 1, "name": "Example category", "active": true, "behaviorType": "Post" }]Response properties
| Property | Type | Description |
|---|---|---|
id | integer (int32) | Gets or sets the identifier for the behavior category in the preference profile. This property uniquely represents a behavior category within the context of the preference profile functionality. |
name | string | Gets or sets the name of the behavior category associated with the preference profile. This property represents a descriptive label or title for the behavior category, enabling better context and readability in the preference profile configuration. Nullable. |
active | boolean | Gets or sets a value indicating whether the behavior category is active. This property determines if the behavior category is considered enabled within the context of the preference profile functionality. |
behaviorType | RiskType |