Hello 👋🏼 How can we help?

Snooze/unsnooze chat

Postpone chat for a specific day and time
Written by Konstantine
Updated 7 months ago

You can snooze a chat for later. The chat will be marked as unread on the specified day and time. You can unsnooze the postponed chat at any time.

➡️ Request

URL https://api.helpcrunch.com/v1/chats/snooze
Method PUT
Headers Authorization: Bearer <your_api_key>

Read more about authorization header here.

You should specify chat id (required) and snoozed until date (required) in the body of your PUT request.

{
    "id": 5215752,
    "snoozedUntil": 1603864800
}

id is the identifier for the chat as given by HelpCrunch.
snoozedUntil
parameter should be specified in the UNIX timestamp format.

In order to unsnooze the chat, just use a null value for the snoozedUntil parameter in your PUT request.

✅ Successful Response

If your request has succeeded, you'll get a 200 OK success status code together with the chat information in the response body.

{
    "id": 1568834,
    "closedBy": null,
    "lastCustomerMessageAt": 1601477718,
    "status": "opened",
    "closedAt": null,
    "rating": null,
    "createdAt": 1594322706,
    "lastMessageAt": 1601477718,
    "snoozedUntil": "1603864800.000",
    "lastMessageText": "Hello World",
    "lastMessageId": 8793611,
    "lastCommunicatedAgentId": 4188,
    "agents": [],
    "customer": {
        "id": 6930456,
        "name": "Mike",
        "email": "mike@example.com",
        "userId": "company_4180"
    },
    "assignee": null
    "department": null
}

You can get details on every Chat Object field in the Chat model article.

🛑 Error Responses

You may get one of the following error status codes and responses. More info on the errors is available here.

401 Unauthorized

{
    "errors": [
        {
            "code": "invalid_token",
            "message": "Invalid token"
        }
    ]
}

404 Not Found

{
    "errors": [
        {
            "code": "chat_not_found",
            "message": "Chat is missing"
        }
    ]
}

429 Too Many Requests

{
    "errors": [
        {
            "code": "too_many_requests",
            "message": "You have exceeded your requests limit"
        }
    ]
}

If you have any questions regarding the REST API, feel free to chat us any time.

👩‍💻 Happy Coding! 👨‍💻

Did this answer your question?