---
title: Security TXT
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Security TXT

##### [Retrieves security.txt](https://developers.cloudflare.com/api/typescript/resources/security_txt/methods/get)

client.securityTXT.get(SecurityTXTGetParams {zone\_id } params, RequestOptionsoptions?): [SecurityTXTGetResponse](<https://developers.cloudflare.com/api/typescript/resources/security_txt#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)>) {acknowledgments, canonical, contact, 6 more }

GET/zones/{zone\_id}/security-center/securitytxt

##### [Updates security.txt](https://developers.cloudflare.com/api/typescript/resources/security_txt/methods/update)

client.securityTXT.update(SecurityTXTUpdateParams {zone\_id, acknowledgments, canonical, 7 more } params, RequestOptionsoptions?): [SecurityTXTUpdateResponse](<https://developers.cloudflare.com/api/typescript/resources/security_txt#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)>) {errors, messages, success }

PUT/zones/{zone\_id}/security-center/securitytxt

##### [Deletes security.txt](https://developers.cloudflare.com/api/typescript/resources/security_txt/methods/delete)

client.securityTXT.delete(SecurityTXTDeleteParams {zone\_id } params, RequestOptionsoptions?): [SecurityTXTDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/security_txt#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)>) {errors, messages, success }

DELETE/zones/{zone\_id}/security-center/securitytxt

##### ModelsExpand Collapse

<details>

<summary>

SecurityTXTGetResponse {acknowledgments, canonical, contact, 6 more }

</summary>

acknowledgments?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20acknowledgments">Link to this property</a>

canonical?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20canonical">Link to this property</a>

contact?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20contact">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

encryption?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20encryption">Link to this property</a>

expires?: string

formatdate-time

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20expires">Link to this property</a>

hiring?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20hiring">Link to this property</a>

policy?: Array&lt;string&gt;

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20policy">Link to this property</a>

preferred\_languages?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)%20%3E%20(property)%20preferred_languages">Link to this property</a>

</details>

[Link to this property](<#(resource)%20security_txt%20%3E%20(model)%20security_txt_get_response%20%3E%20(schema)>)

<details>

<summary>

SecurityTXTUpdateResponse {errors, messages, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: true

Whether the API call was successful.

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20security_txt%20%3E%20(model)%20security_txt_update_response%20%3E%20(schema)>)

<details>

<summary>

SecurityTXTDeleteResponse {errors, messages, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: true

Whether the API call was successful.

<a href="#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20security_txt%20%3E%20(model)%20security_txt_delete_response%20%3E%20(schema)>)