Delete a message
- Path
/inbox/messages/{messageId}- Auth
- Access token · browser or app
const url = 'https://releva.ai/api/v0/inbox/messages/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"DEMO-CUSTOMER-1001"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://releva.ai/api/v0/inbox/messages/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "DEMO-CUSTOMER-1001" }'Removes the message from the shopper’s inbox and records an inboxMessageDelete event. The message cannot be
restored. The request needs a JSON body with userId.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The message id from the list response (a delivery id, not inboxMessageId).
Request Bodyrequired
Section titled “Request Bodyrequired”Send as application/json. Without that content type the body is not read and the call answers 400.
object
Example
{ "userId": "DEMO-CUSTOMER-1001"}Responses
Section titled “Responses”Deleted. No body.
Authentication error, or userId missing or longer than 96 characters.
object
Human-readable error. Several validation errors are joined with a space.
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.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "Domain is disabled. Please reach out to support@releva.ai to enable it."}No message with this id for this userId in this shop.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "Message not found."}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.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An internal error occurred."}