## Updates security.txt `client.SecurityTXT.Update(ctx, params) (*SecurityTXTUpdateResponse, error)` **put** `/zones/{zone_id}/security-center/securitytxt` Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information. ### Parameters - `params SecurityTXTUpdateParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Acknowledgments param.Field[[]string]` Body param - `Canonical param.Field[[]string]` Body param - `Contact param.Field[[]string]` Body param - `Enabled param.Field[bool]` Body param - `Encryption param.Field[[]string]` Body param - `Expires param.Field[Time]` Body param - `Hiring param.Field[[]string]` Body param - `Policy param.Field[[]string]` Body param - `PreferredLanguages param.Field[string]` Body param ### Returns - `type SecurityTXTUpdateResponse struct{…}` - `Errors []SecurityTXTUpdateResponseError` - `Code int64` - `Message string` - `DocumentationURL string` - `Source SecurityTXTUpdateResponseErrorsSource` - `Pointer string` - `Messages []SecurityTXTUpdateResponseMessage` - `Code int64` - `Message string` - `DocumentationURL string` - `Source SecurityTXTUpdateResponseMessagesSource` - `Pointer string` - `Success SecurityTXTUpdateResponseSuccess` Whether the API call was successful. - `const SecurityTXTUpdateResponseSuccessTrue SecurityTXTUpdateResponseSuccess = true` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/security_txt" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) securityTXT, err := client.SecurityTXT.Update(context.TODO(), security_txt.SecurityTXTUpdateParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", securityTXT.Errors) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true } ```