Update conversion goal
PATCH
/api/v1/conversions/goals/{id}
const url = 'https://example.com/api/v1/conversions/goals/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Purchase","key":"purchase","description":"User completed a purchase","isActive":true,"collectionId":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/conversions/goals/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Purchase", "key": "purchase", "description": "User completed a purchase", "isActive": true, "collectionId": {} }'Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»id
required
string
Goal UUID
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
object
name
string
Example
Purchasekey
URL-safe slug (3-50 chars, lowercase alphanumeric, hyphens, underscores)
string
Example
purchasedescription
string
Example
User completed a purchaseisActive
boolean
Example
truecollectionId
Set to a collection UUID to scope, or null to unscope
object
Responses
Заголовок раздела «Responses»Goal updated