Menu/bookings/{booking_id}/message-thread/reopen

Reopen the conversation of a booking

POST/api/v1/bookings/{booking_id}/message-thread/reopen
Requires messages.write

Marks 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.

Parameters

Path parameters

  • booking_idstring (uuid)required

    Booking id.

Responses

200The read state of the conversation.

application/jsonMessageThreadState

  • booking_idstring (uuid)required
  • is_closedbooleanrequired

    Whether the conversation is out of the unread conversations of the host. true for a booking without messages: there is nothing for the host to read.

  • unread_countintegerrequired

    Messages of the conversation not read in ZenHost.

    min 0

401Error code: unauthorized, connection_revoked.

Error codes

  • unauthorized The access token is missing, unknown, expired or revoked, or was issued before the account connected the App again. Refresh it; if refreshing fails, ask the owner to connect again.
  • connection_revoked The owner revoked the App Connection (or your App revoked its own refresh token). Stop calling for this account and drop its tokens.
402Error code: subscription_blocked.

Error codes

  • subscription_blocked The ZenHost subscription of the account is blocked (unpaid, cancelled…). The connection is kept: tell your customer, calls work again once the subscription is restored.
403Error code: app_suspended, forbidden_permission.

Error codes

  • app_suspended ZenHost suspended your App, or no longer allows it on this account. Stop calling and contact ZenHost.
  • forbidden_permission Your App was not granted the Permission this endpoint requires.
404Error code: not_found.

Error codes

  • not_found The resource does not exist or is outside the Connection Scope (both look the same), or the path is not an endpoint of /api/v1.
429Error code: rate_limited.

Header 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.

Error codes

  • rate_limited Too many calls on this App Connection. Wait for the number of seconds in Retry-After.
500Error code: internal_error.

Error codes

  • internal_error ZenHost failed to answer. Retry later with a back-off.

Every error code and what to do