Create a requirement
Create a requirement, optionally with tags (by name) and linked tests. Requires requirement:create. Unknown body fields are rejected with 400. Linked tests are checked before anything is written, so a failed request leaves nothing behind.
bearerAuthAuthorizationBearer <token>Project-scoped CLI token (sck_live_* or sck_test_*) for documented API operations that accept bearer authentication. Interactive browser operations may require a session cookie. Trigger keys (sck_trigger_* / legacy job_*) are accepted only by job trigger endpoints.
application/json- body
title*string1 <= length <= 500description?stringlength <= 10000priority?string"low""medium""high"tags?array<>Tag names. Matched case-insensitively; missing tags are created. Duplicates (ignoring case) are collapsed. On update, replaces the whole tag set.
items <= 10externalId?stringlength <= 255externalUrl?stringhttp or https URL. An empty string is treated as no URL.
length <= 2048testIds?array<>Tests to link. Must belong to the current project. On update, replaces the whole set of linked tests.
items <= 100Created requirement
application/json- response
requirement?Requirement as returned by the detail, create, update and test-link endpoints.
curl -X POST 'https://demo.supercheck.dev/api/requirements' \ -H 'Content-Type: application/json' \ -d '{ "title": "string"}'{ "requirement": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "description": "string", "priority": "low", "tags": [ "string" ], "externalId": "string", "externalUrl": "string", "testIds": [ "59250cde-f034-4b67-8215-4abdcfc601c8" ], "coverage": { "status": "covered", "linkedTestCount": 0, "passedTestCount": 0, "failedTestCount": 0, "lastEvaluatedAt": "2019-08-24T14:15:22Z" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}