GET
Count unread inbox messages
- Path
/inbox/unread-count- Auth
- Access token · browser or app
GET
/inbox/unread-count
const url = 'https://releva.ai/api/v0/inbox/unread-count?userId=DEMO-CUSTOMER-1001';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://releva.ai/api/v0/inbox/unread-count?userId=DEMO-CUSTOMER-1001' \ --header 'Authorization: Bearer <token>'Number of the shopper’s active, unexpired, unread messages.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”userId
required
string
The shopper’s profile id (the value the app passed to setProfileId).
Responses
Section titled “Responses”Unread count.
Media typeapplication/json
object
count
required
integer
Example
{ "count": 2}Authentication error, or userId missing or longer than 96 characters.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Examples
{ "message": "Authorization header is missing", "and accessToken url parameters is also missing. At least one of them is required.": null}{ "message": "Authorization header is malformed. It should look like `Bearer <string>`."}{ "message": "The access token you provided is invalid."}{ "message": "Domain with the provided access token cannot be found."}{ "message": "A valid userId is required."}The domain is disabled.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Example
{ "message": "Domain is disabled. Please reach out to support@releva.ai to enable it."}Unexpected error. Currently also returned for malformed input: a messageId that is not a UUID, a userId
that is not a string, userId only in the query string of a POST or DELETE, or a negative limit.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Example
{ "message": "An internal error occurred."}