Bundles
A bundle is a declaration of a ZIS integration's resources. A bundle can include:
- One or more flows
- Zero or more custom action definitions
- One or more job specs
For more information about bundles, see Understanding Zendesk Integration Services.
JSON format
Bundles are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
description | string | true | false | The description of the bundle |
integration | string | false | true | The name of the integration this bundle belongs to |
name | string | false | true | The name of the bundle |
resources | object | true | true | A collection of ZIS resources |
uuid | string | false | true | The uuid of the bundle |
zendesk_account_id | integer | true | false | Zendesk Account ID |
zis_template_version | string | false | true | The ZIS bundle template version. Allowed value of "2019-10-14". |
List Bundles
GET /api/services/zis/registry/{integration}/bundles
List all existing bundles for an integration from the ZIS Registry.
Authentication
You can authorize requests using basic authentication, an API token, or a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Allowed for
- Admins
Pagination
- Cursor pagination
See Pagination.
Returns a maximum of 100 records per page. Defaults to 20 records per page.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
page[after] | integer | Query | false | pagination page number |
page[before] | integer | Query | false | pagination page number |
page[size] | integer | Query | false | pagination page size |
integration | string | Path | true | The name of the integration. integration can be up to 64 characters long. It can only include lower-case letters (a-z), numbers, dash (-), and underscore (_) characters |
Code Samples
cURL
curl https://{subdomain}.zendesk.com/api/services/zis/registry/{integration}/bundles \
-u {email_address}/token:{api_token} \
Go
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles?page[after]=&page[before]=&page[size]="
method := "GET"
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles")
.newBuilder()
.addQueryParameter("page[after]", "")
.addQueryParameter("page[before]", "")
.addQueryParameter("page[size]", "");
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("GET", null)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {
method: 'GET',
url: 'https://support.zendesk.com/api/services/zis/registry/my_integration/bundles',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
params: {
'page[after]': '',
'page[before]': '',
'page[size]': '',
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles?page[after]=&page[before]=&page[size]="
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"GET",
url,
auth=auth,
headers=headers
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles")
uri.query = URI.encode_www_form("page[after]": "", "page[before]": "", "page[size]": "")
request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
{
"bundles": [
{
"description": "this is an example bundle",
"integration": "my_integration",
"name": "example bundle",
"uuid": "5c722550-4180-4b64-9bcd-f8e38baac15d",
"zendesk_account_id": 12345,
"zis_template_version": "2019-10-14"
}
],
"meta": {
"after": "5c722550-4180-4b64-9bcd-f8e38baac15d",
"before": "5c722550-4180-4b64-9bcd-f8e38baac15d",
"has_more": true
}
}
400 Bad Request
// Status 400 Bad Request
{
"errors": [
{
"code": "1010",
"detail": "error message",
"status": "400"
}
],
"message": "Unauthorized"
}
401 Unauthorized
// Status 401 Unauthorized
{
"errors": [
{
"code": "1001",
"detail": "error message",
"status": "401"
}
],
"message": "Unauthorized"
}
500 Internal Server Error
// Status 500 Internal Server Error
{
"errors": [
{
"code": "1050",
"detail": "error message",
"status": "500"
}
],
"message": "Server Error"
}
Upload or Update Bundle
POST /api/services/zis/registry/{integration}/bundles
Uploads a new bundle or updates an existing bundle for a ZIS integration.
Authentication
You can authorize requests using basic authentication or an API token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Allowed for
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | The name of the integration. integration can be up to 64 characters long. It can only include lower-case letters (a-z), numbers, dash (-), and underscore (_) characters |
Example body
{
"description": "this is an example bundle",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"zis_template_version": "2019-10-14"
}
Code Samples
cURL
curl https://{subdomain}.zendesk.com/api/services/zis/registry/{integration}/bundles \
-u {email_address}/token:{api_token} \
-X POST \
-H "Content-Type: application/json" \
-d @bundle.json
Go
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles"
method := "POST"
payload := strings.NewReader(`{
"description": "this is an example bundle",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"zis_template_version": "2019-10-14"
}`)
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles")
.newBuilder();
RequestBody body = RequestBody.create(MediaType.parse("application/json"),
"""
{
\"description\": \"this is an example bundle\",
\"name\": \"example bundle\",
\"resources\": {
\"example_flow\": {
\"properties\": {
\"definition\": {
\"StartAt\": \"HelloWorld\",
\"States\": {
\"HelloWorld\": {
\"End\": true,
\"Result\": \"Hello World!\",
\"ResultPath\": \"$.messages\",
\"Type\": \"Pass\"
}
}
},
\"name\": \"my_flow\"
},
\"type\": \"ZIS::Flow\"
},
\"example_job_spec\": {
\"properties\": {
\"event_source\": \"support\",
\"event_type\": \"ticket.TicketCreated\",
\"flow_name\": \"zis:example:flow:my_flow\",
\"name\": \"my_job_Spec\"
},
\"type\": \"ZIS::JobSpec\"
}
},
\"zis_template_version\": \"2019-10-14\"
}""");
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var data = JSON.stringify({
"description": "this is an example bundle",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"zis_template_version": "2019-10-14"
});
var config = {
method: 'POST',
url: 'https://support.zendesk.com/api/services/zis/registry/my_integration/bundles',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
data : data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
import json
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles"
payload = json.loads("""{
"description": "this is an example bundle",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"zis_template_version": "2019-10-14"
}""")
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"POST",
url,
auth=auth,
headers=headers,
json=payload
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles")
request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")
request.body = %q({
"description": "this is an example bundle",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"zis_template_version": "2019-10-14"
})
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
null
400 Bad Request
// Status 400 Bad Request
{
"errors": [
{
"code": "1010",
"detail": "error message",
"status": "400"
}
],
"message": "Unauthorized"
}
401 Unauthorized
// Status 401 Unauthorized
{
"errors": [
{
"code": "1001",
"detail": "error message",
"status": "401"
}
],
"message": "Unauthorized"
}
500 Internal Server Error
// Status 500 Internal Server Error
{
"errors": [
{
"code": "1050",
"detail": "error message",
"status": "500"
}
],
"message": "Server Error"
}
Show Bundle by UUID
GET /api/services/zis/registry/{integration}/bundles/{uuid}
Returns information about an uploaded bundle.
Authentication
You can authorize requests using basic authentication, an API token, or a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Allowed for
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | The name of the integration. integration can be up to 64 characters long. It can only include lower-case letters (a-z), numbers, dash (-), and underscore (_) characters |
uuid | string | Path | true | The UUID of the bundle |
Code Samples
cURL
curl https://{subdomain}.zendesk.com/api/services/zis/registry/{integration}/bundles/{uuid} \
-H "Authorization: Bearer {access_token}"
Go
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c"
method := "GET"
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c")
.newBuilder();
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("GET", null)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {
method: 'GET',
url: 'https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c"
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"GET",
url,
auth=auth,
headers=headers
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c")
request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
{
"description": "this is an example bundle",
"integration": "my_integration",
"name": "example bundle",
"resources": {
"example_flow": {
"properties": {
"definition": {
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"End": true,
"Result": "Hello World!",
"ResultPath": "$.messages",
"Type": "Pass"
}
}
},
"name": "my_flow"
},
"type": "ZIS::Flow"
},
"example_job_spec": {
"properties": {
"event_source": "support",
"event_type": "ticket.TicketCreated",
"flow_name": "zis:example:flow:my_flow",
"name": "my_job_Spec"
},
"type": "ZIS::JobSpec"
}
},
"uuid": "5c722550-4180-4b64-9bcd-f8e38baac15d",
"zendesk_account_id": 12345,
"zis_template_version": "2019-10-14"
}
400 Bad Request
// Status 400 Bad Request
{
"errors": [
{
"code": "1010",
"detail": "error message",
"status": "400"
}
],
"message": "Unauthorized"
}
401 Unauthorized
// Status 401 Unauthorized
{
"errors": [
{
"code": "1001",
"detail": "error message",
"status": "401"
}
],
"message": "Unauthorized"
}
500 Internal Server Error
// Status 500 Internal Server Error
{
"errors": [
{
"code": "1050",
"detail": "error message",
"status": "500"
}
],
"message": "Server Error"
}
Delete Bundle by UUID
DELETE /api/services/zis/registry/{integration}/bundles/{uuid}
Delete a bundle for a ZIS integration.
Authentication
You can authorize requests using basic authentication, an API token, or a ZIS OAuth access token.
Allowed for
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | The name of the integration. integration can be up to 64 characters long. It can only include lower-case letters (a-z), numbers, dash (-), and underscore (_) characters |
uuid | string | Path | true | The UUID of the bundle |
Code Samples
cURL
curl https://{subdomain}.zendesk.com/api/services/zis/registry/{integration}/bundles/{uuid} \
-u {email_address}/token:{api_token} \
-H "Content-Type: application/json" \
-X DELETE
Go
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c"
method := "DELETE"
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c")
.newBuilder();
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("DELETE", null)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {
method: 'DELETE',
url: 'https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c"
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"DELETE",
url,
auth=auth,
headers=headers
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/services/zis/registry/my_integration/bundles/543a30ec-c7af-4385-a516-7d05e446c12c")
request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
204 No Content
// Status 204 No Content
null
400 Bad Request
// Status 400 Bad Request
{
"errors": [
{
"code": "1010",
"detail": "error message",
"status": "400"
}
],
"message": "Unauthorized"
}
401 Unauthorized
// Status 401 Unauthorized
{
"errors": [
{
"code": "1001",
"detail": "error message",
"status": "401"
}
],
"message": "Unauthorized"
}
404 Not Found
// Status 404 Not Found
{
"errors": [
{
"code": "1020",
"detail": "error message",
"status": "400"
}
],
"message": "Missing Resource"
}
500 Internal Server Error
// Status 500 Internal Server Error
{
"errors": [
{
"code": "1050",
"detail": "error message",
"status": "500"
}
],
"message": "Server Error"
}