TestRail Sections API

Folder-like grouping of test cases inside a suite.

Operations 4

GET /get_sections/{project_id} Get sections #
POST /add_section/{project_id} Add section #
POST /update_section/{section_id} Update section #
POST /delete_section/{section_id} Delete section #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/testrail-sections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

testrail-sections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TestRail API (v2) Sections API
  description: TestRail is a web-based test case management and QA platform.
  version: '2.0'
  contact:
    name: TestRail (IDERA)
    url: https://www.testrail.com
  x-transport-note: The real request URL embeds the API version in a query string via index.php, e.g. https://example.testrail.io/index.php?/api/v2/get_run/1 - this is intentional and specific to TestRail, not a normal REST path.
servers:
- url: https://{instance}.testrail.io/index.php?/api/v2
  description: TestRail Cloud (per-instance host; replace {instance} with your subdomain)
  variables:
    instance:
      default: example
      description: Your TestRail Cloud subdomain.
- url: https://{host}/index.php?/api/v2
  description: TestRail Server / Enterprise (self-hosted; replace {host} with your install host)
  variables:
    host:
      default: testrail.example.com
      description: Hostname of your self-hosted TestRail installation.
security:
- basicAuth: []
tags:
- name: Sections
  description: Folder-like grouping of test cases inside a suite.
paths:
  /get_sections/{project_id}:
    get:
      operationId: getSections
      tags:
      - Sections
      summary: Get sections
      description: Returns a list of sections for a project and optional suite.
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - name: suite_id
        in: query
        required: false
        description: The ID of the test suite (optional if the project is single-suite).
        schema:
          type: integer
      responses:
        '200':
          description: A list of sections.
  /add_section/{project_id}:
    post:
      operationId: addSection
      tags:
      - Sections
      summary: Add section
      description: Creates a new section in a project's suite.
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      requestBody:
        $ref: '#/components/requestBodies/GenericJson'
      responses:
        '200':
          description: The created section.
  /update_section/{section_id}:
    post:
      operationId: updateSection
      tags:
      - Sections
      summary: Update section
      description: Updates an existing section.
      parameters:
      - name: section_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        $ref: '#/components/requestBodies/GenericJson'
      responses:
        '200':
          description: The updated section.
  /delete_section/{section_id}:
    post:
      operationId: deleteSection
      tags:
      - Sections
      summary: Delete section
      description: Deletes an existing section and all contained cases.
      parameters:
      - name: section_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Deletion confirmation.
components:
  requestBodies:
    GenericJson:
      required: true
      description: JSON request body. Field names follow the TestRail API reference for the specific method (see the method's support.testrail.com article).
      content:
        application/json:
          schema:
            type: object
            additionalProperties: true
  parameters:
    ProjectId:
      name: project_id
      in: path
      required: true
      description: The ID of the project.
      schema:
        type: integer
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication. Username is your TestRail email; password is your account password or an API key generated under My Settings. The API must be enabled by an admin under Administration > Site Settings > API.