Skip to main content
POST
/
releases
/
{id}
/
revert-status
Revert Release Status (Admin Only)
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/releases/{id}/revert-status \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "targetStatus": "submitted",
  "reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}'
{
  "success": true,
  "message": "Release status reverted to \"submitted\" successfully",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "submitted",
    "previousStatus": "approved",
    "reason": "Auto-creation failed due to missing artist metadata"
  }
}

POST /releases//revert-status

This endpoint allows admins to revert a release status. Primarily used to revert failed auto-creation releases back to submitted status or completed releases back to draft. Allowed Status Reversions:
  • Approved (with failed auto-creation) → Submitted
  • Completed → Draft
Note: This action clears all auto-creation artifacts and creates an audit trail.

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Path Parameters

ParameterTypeInRequiredDescription
idstringpathRelease ID

Request Body

Example Request

{
  "targetStatus": "submitted",
  "reason": "Auto-creation failed due to missing artist metadata. Reverting for re-review after corrections."
}

Request Schema

FieldTypeRequiredDescription
targetStatusstringTarget status to revert to
reasonstringReason for status reversion (required for audit trail)

Responses

✅ 200 - Success

⚠️ 400 - Bad Request - Invalid target status or missing reason

⚠️ 403 - Forbidden - Admin access required

⚠️ 404 - Not Found

❌ 500 - Internal Server Error

Tags

Release

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string<uuid>
required

Release ID

Body

application/json
targetStatus
enum<string>
required

Target status to revert to

Available options:
submitted,
draft
reason
string
required

Reason for status reversion (required for audit trail)

Minimum length: 1

Response

Success

success
boolean
Example:

true

message
string
Example:

"Release status reverted to \"submitted\" successfully"

data
object
I