Reopen the conversation of a booking
/api/v1/bookings/{booking_id}/message-thread/reopenmessages.writeMarks every message of the booking as unread, like the reopen button of the ZenHost inbox: the conversation comes back in the unread conversations of the host, for instance to hand a case over. Reopening an open conversation changes nothing and answers the same. A booking without messages has no conversation to reopen: it answers is_closed: true and unread_count: 0.
No App Event is sent: the change comes back through updated_since on GET /message-threads. A booking outside the Connection Scope answers not_found, exactly like a missing one. Counts against the write rate limit.
Paramètres
Paramètres de chemin
booking_idstring (uuid)obligatoireBooking id.
Réponses
200The read state of the conversation.
application/jsonMessageThreadState
booking_idstring (uuid)obligatoireis_closedbooleanobligatoireWhether the conversation is out of the unread conversations of the host.
truefor a booking without messages: there is nothing for the host to read.unread_countintegerobligatoireMessages of the conversation not read in ZenHost.
min 0
401Error code: unauthorized, connection_revoked.
Codes d’erreur
unauthorizedLe jeton d’accès est absent, inconnu, expiré ou révoqué, ou a été émis avant que le compte ne reconnecte l’App. Rafraîchissez-le ; si le rafraîchissement échoue, demandez au propriétaire de reconnecter l’App.connection_revokedLe propriétaire a révoqué la connexion d’App (ou votre App a révoqué son propre jeton de rafraîchissement). Cessez les appels pour ce compte et supprimez ses jetons.
402Error code: subscription_blocked.
Codes d’erreur
subscription_blockedL’abonnement ZenHost du compte est bloqué (impayé, résilié…). La connexion est conservée : prévenez votre client, les appels refonctionnent dès que l’abonnement est rétabli.
403Error code: app_suspended, forbidden_permission.
Codes d’erreur
app_suspendedZenHost a suspendu votre App, ou ne l’autorise plus sur ce compte. Cessez les appels et contactez ZenHost.forbidden_permissionVotre App n’a pas reçu la permission que cet endpoint exige.
404Error code: not_found.
Codes d’erreur
not_foundLa ressource n’existe pas ou est hors du périmètre de connexion (les deux cas sont indiscernables), ou le chemin n’est pas un endpoint de/api/v1.
429Error code: rate_limited.
En-tête Retry-After — Seconds to wait before the next call is allowed. Limits per App Connection: 60 reads (GET), 10 writes (other POST) and 30 messages sent to guests per minute.
Codes d’erreur
rate_limitedTrop d’appels sur cette connexion d’App. Attendez le nombre de secondes indiqué dansRetry-After.
500Error code: internal_error.
Codes d’erreur
internal_errorZenHost n’a pas pu répondre. Réessayez plus tard avec un délai croissant.