Skip to main content

In-app controls

Broker → cTrader endpoint for creating or updating in-app controls (ribbons). Authenticated with the Manager Token (see Authentication of API calls).

Create or update in-app controls

Sets up one or more ribbon controls displayed to a specific user in cTrader.

MethodURL
PUT/oauth2/ctid/inAppControls

Request body

KeyRequired?Data typeDescription
brokerCrmNameYesstringSee broker identification.
userIdYesintegerThe ID of the user to whom the ribbons will be displayed.
rulesYesobjectAn object containing the ribbon definitions. Send an empty object to clear all existing ribbons for this user.
rules.ribbonsYesarrayAn array of ribbon objects. Each object defines one ribbon.
rules.ribbons[].colorYesstringSix-digit HEX colour value ("#ff33ee", for instance).
rules.ribbons[].titleYesstringText displayed on the ribbon.
rules.ribbons[].enabledYesbooleanWhether the ribbon is shown to the user.
rules.ribbons[].closableYesbooleanWhether the user can dismiss the ribbon. Dismissed ribbons reappear on subsequent application launches.
rules.ribbons[].actionYesobjectAction triggered when the user interacts with the ribbon.
rules.ribbons[].action.urlExternalNostringExternal URL opened in a separate browser window on interaction.
rules.ribbons[].action.urlinAppNostringIn-app URL opened in an iframe on interaction.
rules.ribbons[].brokerNameNostringIf specified, the ribbon is only shown to sessions under this broker name.
rules.ribbons[].ctidTraderAccountIdNostringIf specified, the ribbon is only shown to sessions under this specific trading account.

Expected status code

201

Errors

See Error codes.