In order to start using our Capital.com you should first of all generate an API key in the Settings > API integrations section on the platform.
Upon doing so you will be able to use this key and your account credentials to authorise for the API usage with the POST /session method.
To find out more about Capital.com API please review our API documentation: https://open-api.capital.com/