> For the complete documentation index, see [llms.txt](https://docs.shoplift.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shoplift.ai/api-reference/public-api/update-test.md).

# Update test

Partial update of test metadata. After launch, title, hypothesisDescription, controlTitle, variantTitle, priority, surfaceArea, impact, effort, and tagIds remain mutable; implemented becomes mutable once the test has ended. All other fields (goal, device, visitorOption, controlTraffic, audiences, campaignId, variant, scheduling) are locked.

```json
{"openapi":"3.1.1","info":{"title":"Shoplift Public API","version":"1.0.0"},"tags":[{"name":"Public API"}],"servers":[{"url":"https://app.shoplift.ai"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"http","description":"All requests require `Authorization: Bearer sl_live_<your_api_key>`. Generate a key from the Shoplift admin's API Keys settings page.","scheme":"bearer"}},"schemas":{"UpdateTestRequest":{"type":"object","properties":{"title":{"type":["null","string"]},"hypothesisDescription":{"type":["null","string"]},"controlTitle":{"type":["null","string"]},"variantTitle":{"type":["null","string"]},"goal":{"type":["null","string"]},"device":{"type":["null","string"]},"visitorOption":{"type":["null","string"]},"controlTraffic":{"type":["null","integer"],"format":"int32"},"defaultAudiences":{"type":["null","array"],"items":{"type":"string"}},"customAudienceIds":{"type":["null","array"],"items":{"type":"string","format":"uuid"}},"campaignId":{"type":["null","string"],"format":"uuid"},"variant":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateTestVariantRequest"}]},"automaticallyStartAt":{"type":["null","string"],"format":"date-time"},"automaticallyEndAt":{"type":["null","string"],"format":"date-time"},"endWhenSignificant":{"type":["null","boolean"]},"priority":{"type":["null","string"]},"surfaceArea":{"type":["null","string"]},"impact":{"type":["null","integer"],"format":"int32"},"effort":{"type":["null","integer"],"format":"int32"},"implemented":{"type":["null","boolean"]},"tagIds":{"type":["null","array"],"items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"UpdateTestVariantRequest":{"type":"object","properties":{"mode":{"type":["null","string"]},"source":{"type":["null","string"]},"type":{"type":["null","string"]},"themeId":{"type":["null","integer"],"format":"int64"},"redirectUrl":{"type":["null","string"]},"granular":{"type":["null","boolean"]}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}},"paths":{"/api/public/v1/tests/{id}":{"patch":{"tags":["Public API"],"summary":"Update test","description":"Partial update of test metadata. After launch, title, hypothesisDescription, controlTitle, variantTitle, priority, surfaceArea, impact, effort, and tagIds remain mutable; implemented becomes mutable once the test has ended. All other fields (goal, device, visitorOption, controlTraffic, audiences, campaignId, variant, scheduling) are locked.","operationId":"updateTest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTestRequest"}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```
