Skip to main content

Upload App

POST https://deploygate.com/api/users/{OWNER_NAME}/apps

Easily and automatically upload from test servers and self-created tools.


The behavior when both distribution_key and distribution_name are specified

distribution_key takes priority. If the corresponding distribution page specified with distribution_key doesn't exist, API returns 404 error.

Application upload for Workspace (Flexible/Enterprise plans)

Organization is required to be uploaded apps under Workspace. For ${API_TOKEN}, use API key of the user belongs to Owner or Developer team of the Organization. Also, specify the destination Oranization name for ${OWNER_NAME}.

Path Params

NameTypeRequiredDescription
OWNER_NAMEstringtrueUser name or Organization name

Form Data

NameTypeRequiredDescription
filefiletrueApp's binary file (IPA/APK/AAB)
messagestringfalseDescription of uploaded file
distribution_keystringfalseBy specifying the distribution page's hash (the "xxxx" portion of the distributed page's URL: /distributions/xxxx), that distribution page will be updated simultaneously.
distribution_namestringfalseSpecify the name of the updated distribution page. If none exists, a new distribution page will be created. Possible uses include creating distribution pages for each Git branch name.
release_notestringfalseMessage displayed during distribution page app updates.
disable_notifystringfalse(iOS only) A setting of "true" disables Push notification emails.

Example

curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=sample"
Update distribution pages
curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=sample" \
--form-string "distribution_key=abcd1234" \
--form-string "release_note=new build"
Distribute per Git branch
curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=git:${GIT_HASH}" \
--form-string "distribution_name=${GIT_BRANCH}" \
--form-string "release_note=new build"

Result 200

{
"error":false,
"results":{
"name":"DeployGate",
"package_name":"com.deploygate",
"secret":"1234567890abcdef1234567890abcdef12345678",
"labels":{ /* obsoleted field. this may be deleted in near future. */ },
"os_name":"Android",
"path":"/users/_your_name_/apps/com.deploygate",
"revision":1,
"version_code":"36",
"version_name":"1.6.0",
"sdk_version":"7",
"target_sdk_version":23,
"signature":"1234567890abcdef1234567890abcdef12345678",
"message":"sample",
"file":"https://xxx",
"md5":"1234567890abcdef1234567890abcdef",
"icon":"https://yyy",
"user":{
"id":1,
"name":"_your_name_",
"profile_icon":"https://zzz"
}
}
}

Result 400

{
"error": true,
"message": "application create error: cannot detect the package.",
"because": "application create error: cannot detect the package."
}