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

TestRail API returned HTTP 403 ("You are not allowed to add test suites (insufficient permissions)



I’m trying to add test suite by means Python TestRail API but it returns 403 code. I have administration rights on TestRail so i’m a liitle bit confused.

Python script:

from testrail import *
import json

client = APIClient('')
client.user = 'domain\username'
client.password = 'password'

project = '1'

data = json.loads(json_data)

def add_testsuite(project_id):
    client.send_post('add_suite/' + project_id, data)



  "name": "This is a new test suite",
  "description": "Use the description to add additional context details"

I got an error after trying to add testsuite:

testrail.APIError: TestRail API returned HTTP 403 ("You are not allowed to add test suites (insufficient permissions).")

TestRail v3.1.1.3130



Hi Alex,

Thanks for your posting! The administrator status is independent of the permissions and you can remove add-suite permissions even for TestRail administrators if you like. You can configure the permissions and role for your user under Administration > Users & Roles and your user account either has a global role without add-user permissions, or the project permissions are overridden for this user:



I can create test suites from from Web interface though and I have a designer role on the project.


Hi Alex,

Thanks for the additional details! There was a small issue with the permission check with TestRail < 3.1.2 and the add_suite permission check was too strict. This is fixed with TestRail 3.1.2 and later and we recommend updating to a later TestRail version:

We are happy to help in case you have any questions about how to update TestRail.



Thank you for answer.


You are welcome, Alex, and please let us know in case any further questions come up!