---
updatedAt: 2025-04-28T11:56:48.000Z
agentTools:
  projectIndex: https://developers.wingify.com/v2/llms.txt
---

# Update a campaign goal

Request URL for a Workspace

```
PATCH /accounts/40505/campaigns/7/goals/2
```

Request Format

```json
{  
   "goals": {  
      "name":"New name"
   }
}
```

Update a campaign goal

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api",
    "version": "4"
  },
  "servers": [
    {
      "url": "https://app.wingify.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "token"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/campaign/{campaign_id}/goals/{goal_id}": {
      "patch": {
        "summary": "Update a campaign goal",
        "description": "",
        "operationId": "update-a-campaign-goal",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Use 'current' keyword to refer to the Main Workspace or the Integer Workspace Id",
            "required": true,
            "schema": {
              "type": "string",
              "default": "current"
            }
          },
          {
            "name": "campaign_id",
            "in": "path",
            "description": "Campaign Id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "goal_id",
            "in": "path",
            "description": "Goal Id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"_data\": {\n        \"id\": 2,\n        \"isPrimary\": true,\n        \"name\": \"New name\",\n        \"urls\": [\n            {\n                \"type\": \"url\",\n                \"value\": \"http://wingify.com\"\n            }\n        ],\n        \"excludedUrls\": [],\n        \"cssSelectors\": [\n            null\n        ],\n        \"isCreatedInEditor\": false,\n        \"type\": \"visitPage\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        },
                        "isPrimary": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "name": {
                          "type": "string",
                          "example": "New name"
                        },
                        "urls": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "url"
                              },
                              "value": {
                                "type": "string",
                                "example": "http://wingify.com"
                              }
                            }
                          }
                        },
                        "excludedUrls": {
                          "type": "array"
                        },
                        "cssSelectors": {
                          "type": "array",
                          "items": {}
                        },
                        "isCreatedInEditor": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "type": {
                          "type": "string",
                          "example": "visitPage"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```