New Version

Written By Team BugSmash

Last updated 6 days ago

METHOD: POST
URL: https://api.bugsmash.io/api/v2/version

HEADERS:
  X-API-Key: YOUR_API_KEY


----------------------------------------------------------------------
For Websites:
  Content-Type: application/json

REQUEST BODY:
{
  "websiteUrl": "https://example.com",
  "projectId": "a1732b1e-4b43-4217-a780-c521a98aaeea"
}

CURL:
curl --location 'https://api.bugsmash.io/api/v2/version' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "websiteUrl": "https://example.com",
  "projectId": "a1732b1e-4b43-4217-a780-c521a98aaeea"
}'

RESPONSE:
{
  "status": true,
  "message": "Version successfully added",
  "version": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "V2",
    "review_link": "https://app.bugsmash.io/review/AbCdE"
  }
}


----------------------------------------------------------------------
For Files (PDF / Image / Video / Audio):
  Content-Type: multipart/form-data

FORM DATA:
{
  "file": YOUR_FILE_HERE,
  "projectId": "a1732b1e-4b43-4217-a780-c521a98aaeea",
}
  
CURL:
curl --location 'https://api.bugsmash.io/api/v2/project/generate-review-link' \
--header 'X-API-Key: YOUR_API_KEY' \
--form 'file=@"/path/to/your/file.pdf"' \
--form 'projectId="a1732b1e-4b43-4217-a780-c521a98aaeea"'

RESPONSE:
{
  "status": true,
  "message": "Success",
  "version": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "V2",
    "review_link": "https://app.bugsmash.io/review/AbCdE"
  }
}


----------------------------------------------------------------------
For Multiple Images:
  Content-Type: multipart/form-data

FORM DATA:
{
  "files[]": YOUR_FILE_ARRAY_HERE,   // Accepts up to 25 images at once
  "projectId": "a1732b1e-4b43-4217-a780-c521a98aaeea",
}

CURL:
curl --location 'https://api.bugsmash.io/api/v2/project/generate-review-link' \
--header 'X-API-Key: YOUR_API_KEY' \
--form 'files[]=@"/path/to/thumbnail.png"' \
--form 'files[]=@"/path/to/poster.png"' \
--form 'files[]=@"/path/to/background.png"' \
--form 'projectId="a1732b1e-4b43-4217-a780-c521a98aaeea"' \

RESPONSE:
{
  "status": true,
  "message": "Success",
  "version": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "V2",
    "review_link": "https://app.bugsmash.io/review/AbCdE"
  }
}