Skip to main content

create_feature

Create a feature from a name and Gherkin source (Feature: + Scenario:s). It starts as draft — generate its tests afterwards with generate_feature.

Request​

POST /api/v1/ops/projects/{project}/features
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
namebodystringyesThe feature name.
gherkinbodystringno (REST)Gherkin source; REST accepts an empty draft. Required by the MCP tool and CLI file workflow.
groupbodystringnoExisting group name or public id.
curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Login Functionality", "gherkin": "Feature: Login Functionality\n Scenario: Valid user signs in\n ..."}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/features"

Response​

201 Created

{ "id": 12 }

Errors​

HTTPWhen
400 invalid_requestMissing name, or malformed JSON.
404 not_foundNo such project in this workspace.

Use testvibe features create "Login Functionality" --file login.feature --group "Authentication", or pass group to create_feature. Create the group first with testvibe groups create Authentication / create_group.