Publish a New Release with Myket APIs
The Developer Panel APIs let you automate release-bundle creation, APK upload, and submission for review. The workflow is:
- Create or update the release bundle's information.
- Upload the APK file.
- Submit the bundle for review and approval.
Call every API in this section only from your server. Do not put the X-Access-Token in a client app or disclose it to others.
Authentication
Obtain the app access token from the Developer Panel and send it in the X-Access-Token header for every request. In the paths below, {PACKAGE_NAME} is your app's package name.
List release bundles
- cURL
- Python
curl --get \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle' \
--header 'X-Access-Token: {ACCESS_TOKEN}' \
--data-urlencode 'status={STATUS}' \
--data-urlencode 'offset={OFFSET}' \
--data-urlencode 'limit={LIMIT}'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
params = {"status": "JustCreated", "offset": 1, "limit": 20}
response = requests.get(url, headers=headers, params=params)
print(response.status_code, response.json())
The status parameter is optional. Supported values are:
JustCreated: The bundle was created but has not been submitted for review.WaitingForApproval: The bundle is under review.Rejected: The bundle was rejected.Approved: The bundle was approved.RolledBack: The bundle release was rolled back.
Use an offset greater than zero for pagination. limit must be between 1 and 20.
The response contains eol to indicate the end of the list and a releases array. Each bundle can include its title, status, creation time, and release details such as version code, approval status, CPU architecture, minimum SDK, and file size.
Create or update a bundle
If the app already has a bundle, this request updates its information; otherwise, it creates one:
- cURL
- Python
curl --request PUT \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle' \
--header 'X-Access-Token: {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"title": "Release title",
"stagedRolloutPercent": 100,
"translationInfos": [
{
"description": "Release notes in English",
"language": "en"
},
{
"description": "توضیحات نسخه به فارسی",
"language": "fa"
}
]
}'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
payload = {
"title": "Release title",
"stagedRolloutPercent": 100,
"translationInfos": [
{"description": "Release notes in English", "language": "en"},
{"description": "توضیحات نسخه به فارسی", "language": "fa"},
],
}
response = requests.put(url, headers=headers, json=payload)
print(response.status_code, response.json())
stagedRolloutPercent sets the percentage of users who receive the new release. translationInfos contains localized release notes.
Upload the release file
After creating the bundle, upload the APK with a PUT request using multipart/form-data. The file must not exceed 500 MB; use the Developer Panel for larger files.
- cURL
- Python
curl --request PUT \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle/upload' \
--header 'X-Access-Token: {ACCESS_TOKEN}' \
--form '=@app.apk'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle/upload"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
with open("app.apk", "rb") as apk_file:
response = requests.put(
url,
headers=headers,
files={"": ("app.apk", apk_file, "application/vnd.android.package-archive")},
)
print(response.status_code, response.json())
Submit a bundle for review
After providing the information and uploading the file, submit the bundle for review:
- cURL
- Python
curl --request POST \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle/commit' \
--header 'X-Access-Token: {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"isManualPublish": false,
"message": "Please review this release"
}'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle/commit"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
payload = {
"isManualPublish": False,
"message": "Please review this release",
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code, response.json())
When isManualPublish is false, the release is published after approval. If it is true, you must publish it manually after approval. Use message to send a note to the reviewer.
Delete a bundle or cancel a review request
To delete the current bundle:
- cURL
- Python
curl --request DELETE \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle' \
--header 'X-Access-Token: {ACCESS_TOKEN}'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
response = requests.delete(url, headers=headers)
print(response.status_code, response.json())
To cancel a bundle's review request:
- cURL
- Python
curl --request DELETE \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle/revert' \
--header 'X-Access-Token: {ACCESS_TOKEN}'
import requests
package_name = "org.example.app"
url = f"https://developer.myket.ir/api/partners/applications/{package_name}/release-bundle/revert"
headers = {"X-Access-Token": "YOUR_ACCESS_TOKEN"}
response = requests.delete(url, headers=headers)
print(response.status_code, response.json())
Successful requests return code 200. Errors can occur if the bundle does not exist, you lack access to the app, required information is missing, or a release is already under review.