POST
/
v1
/
apps
/
:id
/
commits
/
:commit_id
/
revert
Revert Commit for Application
curl --request POST \
  --url https://api.vertracloud.app/v1/apps/:id/commits/:commit_id/revert \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "response": {
    "id": "v111d4af8cd74272a284831fbae14a8v",
    "owner_id": "user_123456",
    "owner_plan_id": "pro",
    "name": "MyApp",
    "description": "Reverted application to previous commit",
    "cluster": 1,
    "status": "running",
    "ram": 512,
    "type": 2,
    "language": "nodejs",
    "subdomain": "myapp.vertraweb.app",
    "custom_domain": null,
    "created_at": "2025-08-10T12:00:00.000Z",
    "updated_at": "2025-08-14T21:00:00.000Z",
    "last_commit": "2025-08-14T20:30:00.000Z",
    "last_backup": "2025-08-14T20:30:00.000Z"
  }
}
id
string
The ID of the application to revert the commit for.
commit_id
string
The ID of the commit to revert to.

Response

status
string
Indicates whether the operation was successful. success if successful, error if not.
response
object
Contains details about the application after the commit revert.
{
  "status": "success",
  "response": {
    "id": "v111d4af8cd74272a284831fbae14a8v",
    "owner_id": "user_123456",
    "owner_plan_id": "pro",
    "name": "MyApp",
    "description": "Reverted application to previous commit",
    "cluster": 1,
    "status": "running",
    "ram": 512,
    "type": 2,
    "language": "nodejs",
    "subdomain": "myapp.vertraweb.app",
    "custom_domain": null,
    "created_at": "2025-08-10T12:00:00.000Z",
    "updated_at": "2025-08-14T21:00:00.000Z",
    "last_commit": "2025-08-14T20:30:00.000Z",
    "last_backup": "2025-08-14T20:30:00.000Z"
  }
}

Error Responses

status
string
Indicates whether the operation was successful. error if not successful.
code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.
  • FORBIDDEN: The user does not have access to the application.
  • APP_NOT_FOUND: The specified application does not exist.
  • COMMIT_NOT_FOUND: The specified commit does not exist.
  • BACKUP_DATA_NOT_FOUND: Required backup data could not be found.
  • INVALID_LANGUAGE: The application language could not be detected or is invalid.
  • NO_CONFIG_FILE: No configuration file was found in the commit.
  • FAILED_TO_REVERT_COMMIT: The revert operation failed.
  • FAILED_TO_REBUILD_APP: The rebuild after revert failed.
  • USER_NOT_FOUND: The owner of the application was not found.
{
  "status": "error",
  "code": "UNAUTHORIZED"
}