Update user networks configuration

A user should be able to update his networks configuration so that he could add or remove networks to receive alerts on.

Note

The user should be logged in.

PUT https://api.tradingpartners.ai/api/v1/users/networks

PUT users/networks request object

Attributes


telegram - object
Telegram configuration

enabled - boolean
Do you want to send alerts to Telegram.

apiKey - string max:255
API Key used for sending alerts to Telegram.

chatID - string max:255
ID of the chat you want to push the alert to.


instagram - object
Instagram configuration

enabled - boolean
Do you want to send alerts to Telegram.

accessToken - string max:255
Access-token to consume Instagram APIs


onesignal - object
OneSignal configuration

enabled - boolean
Do you want to send alerts to OneSignal.

apiKey - string max:255
API Key to consume OneSignal's APIs

appID - string max:255
The application App ID you want to send notification to.

Authorization header

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJmb3IiOiJ1c2VyIiwid2l0aCI6ImdyYWRlIiwiZnVsbCI6dHJ1ZX0.sWNz-Z0oGGWoSwaVlOGyzCQdYCWJQmKSSFvZIJzchZw

PUT users/networks request object

{
    "telegram": {
        "enabled": true,
        "apiKey": "1234567890",
        "chatID": "1234567890"
    },
    "instagram": {
        "enabled": false,
        "accessToken": "1234567890"
    },
    "onesignal": {
        "enabled": true,
        "apiKey": "1234567890",
        "appID": "1234567890"
    }
}

Response

A valid update of the user networks is answered with a 204 status code.

StatusCode: 204