Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Adding a new configuration with the API


Thanks for adding support for configurations to your API.

I do not see a way to add a new configuration with the API. We are pushing automated test results to TestRail, and it would be ideal for us if we could use the API to add a configuration that does not exist.


Hello Kurte,

Thanks for your feedback and great to hear that you are happy with the recent API improvements. Adding configurations via the API is currently not supported (only getting a list of configurations) and we currently recommend adding the configurations and groups via the UI as part of setting up your project. That said, I’ve added an add_config API method to our feature request list for now and we will make sure to look into this.



Hate to bring up a fairly old post, but this still doesn’t look like it’s implemented.

We have a way to programmatically determine a configuration; and would like to be able to add it if it is currently missing in the list. Obviously, can’t do that yet without the supported API; so hoping there is some movement on this?


Hi Jim,

Thanks for your feedback! Yes, it’s still planned to look into this and we would like to add this to one of the next versions. I’m happy to add another vote to this feature request.



Hi, New to testrail; using the latest 30-day trial version. Using the API and the call for adding a config
does not make sense. It asks for the config_group_id, which is defined as:

“The ID of the configuration group the configuration should be added to”,

but I would expect to use the project ID to add a “new config” to it?

Am I missing something or are your docs incorrect?

UPDATE. I think I understand now…I need to create a configuration group so I can add new configs to it. :wink:


Hi Chris,

Thank you for the post and thank you for updating your initial post. You are correct. You would need to create the configuration group before you would be able to add configurations to it. I will pass this information along to our documentation team and see if we can expand on this a bit to offer a better explanation of what is expected here.

Marty Lavender
Customer Success Team


Thanks. Have a follow up question. Once I create a new configuration in a configuration group, there does not seem to be a way to add the configuration to the test suite for the test plan outside of the UI. When I use the api to create a configuration and I want to associate it with a test plan/suite, I can do this in the UI under the test plan and can associate it with the test suite, but I would like to do this via the api.


Hi Chris,

Thanks for your reply! With the add_plan and add_plan_entry API methods of the TestRail API, you would be able to specify the config IDs that can be used to apply configurations to the plan/entry. Our documentation provides the request fields available for these methods as well as some examples when including configurations in a plan (just be sure to expand the request fields and example sections to see how this works):

Hope this helps!



I see what you are saying, but I still cannot see how to add a configuration to a call to add_results.

Here is what I am doing. I have some test results and am adding them to test rail using add_results:run_id:results. The add_results works fine, but I want to associate the test results with a configuration which was just created and added to a config_group, but I don’t see any way to integrate in the add_plan_entry api method here.

Basically, I have an existing testplan in a project and a configuration group to which I have added a configuration. I want to add the test results to this testplan and associate them with the suite in the test plan and the newly created configuration.


Hi Chris,

Thank you for the follow up post. I think the get_configs method would help you out here. You would be able to get the config IDs that you need and then with the method that Marco mentioned you would be able to add your tests to the specific configuration.