Aller au contenu
Livstick Développeurs

Delete a message by mrid

Méthode DELETE https://<client-api-host>/api/v3.1/containers/{crid}/messages/{mrid}

Remove a message (refund, withdrawal). The deletion is shared with the other deletion paths and emits the message.deleted webhook; the author receives no e-mail. The primary message of a gallery that holds other messages cannot be deleted (409 GALLERY_NOT_EMPTY), and a message rejected by moderation is kept (409 MESSAGE_REJECTED).

Autorisation

Scope requis messages:publish

Use Authorization: Bearer liv_<prefix>_<secret>. The key must belong to a platform served by the V3 pipeline; otherwise every route answers 403 PLATFORM_NOT_V3.

Paramètres

Nom Emplacement Type Requis Contraintes Description
crid Chemin string Requis Your business reference of the container.
mrid Chemin string Requis pattern ^[A-Za-z0-9:_-]{1,64}$ Your own reference of the message.

Réponses

204

Message deleted.

401 application/json Schéma V31ErrorEnvelope

Authentication failed or missing bearer token.

403 application/json Schéma V31ErrorEnvelope

Authenticated but not allowed: missing scope (FORBIDDEN), invalid platform constraints (INVALID_PLATFORM_CONSTRAINTS) or a platform not served by API v3.1 (PLATFORM_NOT_V3).

json 403
{
  "error": {
    "code": "PLATFORM_NOT_V3",
    "message": "Platform is not served by API v3.1"
  }
}

404 application/json Schéma V31ErrorEnvelope

Container or message not found (NOT_FOUND, MESSAGE_NOT_FOUND).

json 404
{
  "error": {
    "code": "MESSAGE_NOT_FOUND",
    "message": "Message not found"
  }
}

409 application/json Schéma V31ErrorEnvelope

The request conflicts with the state of the container or message: CRID_IN_USE, MODE_MISMATCH, GALLERY_CLOSED, GALLERY_NOT_EMPTY, MESSAGE_REJECTED, MESSAGE_MISSING.

json 409
{
  "error": {
    "code": "GALLERY_CLOSED",
    "message": "Gallery is closed"
  }
}

429 application/json Schéma V31ErrorEnvelope

Rate limit exceeded.

json 429
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests"
  }
}

500 application/json Schéma V31ErrorEnvelope

Unexpected server error.

json 500
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal error"
  }
}