Chat expiration
#
Method#
POST /send-chat-expirationPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-chat-expiration
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method is responsible for sending chat expiration.
#
Attributes#
RequiredAttribute | Type | Description |
---|---|---|
phone | integer | Phone number you want to set chat expiration for in YOUR chat |
chatExpiration | string | Attribute to send chat expiration |
#
Request BodyExample
Options of chatExpiration: "24_HOURS", "7_DAYS", "90_DAYS", "OFF"
#
Response#
200Attributes | Type | Description |
---|---|---|
value | boolean | Action confirmation attribute |
Example
#
405In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
#
415In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”