Skip to main content

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:

  1. Create or update the release bundle's information.
  2. Upload the APK file.
  3. Submit the bundle for review and approval.
Security

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 --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}'

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 --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"
}
]
}'

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 --request PUT \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle/upload' \
--header 'X-Access-Token: {ACCESS_TOKEN}' \
--form '=@app.apk'

Submit a bundle for review​

After providing the information and uploading the file, submit the bundle for review:

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"
}'

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 --request DELETE \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle' \
--header 'X-Access-Token: {ACCESS_TOKEN}'

To cancel a bundle's review request:

curl --request DELETE \
'https://developer.myket.ir/api/partners/applications/{PACKAGE_NAME}/release-bundle/revert' \
--header 'X-Access-Token: {ACCESS_TOKEN}'

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.