# Update webhook

## PUT /public/v1/notifications/webhooks/{id}

> Updates webhook.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5202-gabed2ddc"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/notifications/webhooks/{id}":{"put":{"tags":["Webhooks"],"summary":"Updates webhook.","parameters":[{"name":"id","in":"path","description":"Id of webhook to update","required":true,"schema":{"type":"string"}},{"name":"select","in":"query","description":"RQL select statements","schema":{"type":"string"}}],"requestBody":{"description":"Update details of webhook","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateWebhookRequest"}]}},"text/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateWebhookRequest"}]}},"application/*+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateWebhookRequest"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"UpdateWebhookRequest":{"type":"object","properties":{"webhookId":{"type":"string"},"description":{"allOf":[{"$ref":"#/components/schemas/StringJsonOptional"}]},"url":{"allOf":[{"$ref":"#/components/schemas/UriJsonOptional"}]},"criteria":{"allOf":[{"$ref":"#/components/schemas/StringStringDictionaryJsonOptional"}]},"secret":{"allOf":[{"$ref":"#/components/schemas/StringJsonOptional"}]},"lastCall":{"allOf":[{"$ref":"#/components/schemas/LastWebhookCallDetailsJsonOptional"}]}},"additionalProperties":false},"StringJsonOptional":{"type":"object","properties":{"hasValue":{"type":"boolean","readOnly":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"UriJsonOptional":{"type":"object","properties":{"hasValue":{"type":"boolean","readOnly":true},"value":{"type":"string","format":"uri","nullable":true}},"additionalProperties":false},"StringStringDictionaryJsonOptional":{"type":"object","properties":{"hasValue":{"type":"boolean","readOnly":true},"value":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false},"LastWebhookCallDetailsJsonOptional":{"type":"object","properties":{"hasValue":{"type":"boolean","readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/LastWebhookCallDetails"}],"nullable":true}},"additionalProperties":false},"LastWebhookCallDetails":{"type":"object","properties":{"callTime":{"type":"string","format":"date-time"},"responseTime":{"type":"string","format":"date-time"},"httpStatusCode":{"allOf":[{"$ref":"#/components/schemas/HttpStatusCode"}],"nullable":true},"reasonPhrase":{"type":"string","nullable":true},"success":{"type":"boolean"},"response":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false},"HttpStatusCode":{"enum":["Continue","SwitchingProtocols","Processing","EarlyHints","OK","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","IMUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","RequestEntityTooLarge","RequestUriTooLong","UnsupportedMediaType","RequestedRangeNotSatisfiable","ExpectationFailed","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired"],"type":"string"},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"name":{"type":"string"},"url":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/WebhookStatus"}]},"type":{"allOf":[{"$ref":"#/components/schemas/WebhookType"}]},"secret":{"type":"string","nullable":true},"statistics":{"allOf":[{"$ref":"#/components/schemas/WebhookStatistics"}]},"objectType":{"allOf":[{"$ref":"#/components/schemas/WebhookObjectType"}]},"account":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"object":{"allOf":[{"$ref":"#/components/schemas/WebhookObjectRef"}]},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/WebhookCriteria"}},"lastSuccess":{"allOf":[{"$ref":"#/components/schemas/WebhookCall"}],"nullable":true},"lastFailure":{"allOf":[{"$ref":"#/components/schemas/WebhookCall"}],"nullable":true},"lastCall":{"allOf":[{"$ref":"#/components/schemas/WebhookCall"}],"nullable":true}},"additionalProperties":false},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"WebhookStatus":{"enum":["Enabled","Disabled"],"type":"string"},"WebhookType":{"enum":["ValidatePurchaseOrderDraft","ValidatePurchaseOrderQuerying","ValidateChangeOrderDraft","ValidateTerminateOrder","SelectOrderLines","ValidateEnrollmentDraft","ValidateEnrollmentQuerying","ValidateReEnrollment","ValidateReEnrollmentQuerying","ValidateConfigurationOrderDraft","ValidateAnswer"],"type":"string"},"WebhookStatistics":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"successes":{"type":"integer","format":"int32"},"failures":{"type":"integer","format":"int32"},"failuresSinceLastSuccess":{"type":"integer","format":"int32"}},"additionalProperties":false},"WebhookObjectType":{"enum":["Order","Request","Account","Enrollment","Answer"],"type":"string"},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"WebhookObjectRef":{"required":["id","name"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true}},"additionalProperties":false},"WebhookCriteria":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false},"WebhookCall":{"type":"object","properties":{"success":{"type":"boolean"},"callTime":{"type":"string","format":"date-time"},"responseTime":{"type":"string","format":"date-time","nullable":true},"headers":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"response":{"type":"string","nullable":true},"reasonPhrase":{"type":"string","nullable":true},"httpStatusCode":{"allOf":[{"$ref":"#/components/schemas/HttpStatusCode"}],"nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```
