Delete multiple messages.

URL Parameters

None.

Body Parameters

NameDescriptionJSON typeRequiredDefault Value
Array of messageId strings (Max: 100).array of stringsYes

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

OAuthAuthorizer and PERM_MESSAGE_DELETE

Example Request

URL

POST https://spacesapis.zang.io/api/messages/deletemessages

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Body

[
    "58e3d0cb9dbbbd1b0e1c9f53",
    "5942f21cad73d2815b272a95",
    "5942edd99db385796bdcc4d6",
    "5942f4e0c7b53d85bf75da13"
]

Example Response

/*** status is 200 and the response data***/ 
{
    "notFoundMmessages": [
        "5942edd99db385796bdcc4d6"
    ],
    "notDeletedMessages": [
        {
            "messageId": "58e3d0cb9dbbbd1b0e1c9f53",
            "reason": {
                "code": "topic.invalid_acesss_to_archived_topic",
                "message": "Accessing archived topic is not valid."
            }
        }
    ],
    "deletedMessages": [
        "5942f4e0c7b53d85bf75da13"
    ],
    "noPermittedMessages": [
        {
            "messageId": "5942f21cad73d2815b272a95",
            "reason": {
                "code": "authorize_error.permission",
                "message": "Authorise permission failed"
            }
        }
    ]
}


/*** status is 400 and the response data***/ 
{
    "error": {
        "code": "api_bad_request_input",
        "message": "Api Bad Request Check Input"
    },
    "reason": "input data length is 200, cannot delete messages more than 100",
    "data": [...]
}
/*** status is 401 and the response data***/ 
{
    "code": "authen_error.anonymouse_jwt_auth_failed",
    "message": "Authenticate anonymouse jwt failed"
}