Chat and User Attributes


Norby allows gathering specific information for your users and chats via attributes. Below are examples of API requests you can use to manage attributes and values through your code.

Firstly, you need to get an API Secret from a manager:

Project Settings.png

User Attributes

Get the Attributes List for a User

curl -X GET "<https://api.norby.io/api/user/attribute>" -H "accept: application/json" -H "X-Api-Secret: {api secret}"
fetch('<https://api.norby.io/api/user/attribute>', {
    headers: {
        'Content-Type': 'application/json',
        'X-Api-Secret': 'api-secret-from-settings'
    }
});

Create a New User Attribute

curl -X POST "<https://api.norby.io/api/user/attribute>" -H "accept: application/json" -H "X-Api-Secret: {api secret}" -H "Content-Type: application/json" -d '{"dataType":"string","name":"string","description":"string","userUuid":"string","value":"string"}'
fetch('<https://api.norby.io/api/user/attribute>', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'X-Api-Secret': 'api-secret-from-settings'
    },
    body: JSON.stringify({
        dataType:"string",
        name:"string",
        description:"string",
        userUuid:"string",
        value:"string"
    })
});

dataType is a type of data you will gather under a particular attribute. Possible types: