> 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-campaign.md).

# Update campaign

Partially updates a campaign. Omit fields to leave them unchanged; pass null for objective or goal to clear them.

```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":{"UpdateCampaignRequest":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionalOfString"}]},"objective":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionalOfString"}]},"goal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionalOfString"}]}},"additionalProperties":false},"OptionalOfString":{"type":["null","string"]},"ExternalCampaignItem":{"required":["id","name","objective","goal","status","createdAt","progress"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"objective":{"type":["null","string"]},"goal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NullableOfCampaignGoal"}]},"status":{"$ref":"#/components/schemas/CampaignStatus"},"createdAt":{"type":"string","format":"date-time"},"progress":{"$ref":"#/components/schemas/ExternalCampaignProgress"}}},"NullableOfCampaignGoal":{"enum":["aov","cvr","rpv","ctr","atc",null]},"CampaignStatus":{"enum":["active","completed"]},"ExternalCampaignProgress":{"required":["total","live","paused","draft","ended"],"type":"object","properties":{"total":{"type":"integer","format":"int32"},"live":{"type":"integer","format":"int32"},"paused":{"type":"integer","format":"int32"},"draft":{"type":"integer","format":"int32"},"ended":{"type":"integer","format":"int32"}}},"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/campaigns/{id}":{"patch":{"tags":["Public API"],"summary":"Update campaign","description":"Partially updates a campaign. Omit fields to leave them unchanged; pass null for objective or goal to clear them.","operationId":"updateCampaign","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalCampaignItem"}}}},"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"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```
