curl --request PATCH \
--url https://core.nextmatter.com/api/instances/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"tags": [],
"visibility_teams": [
123
]
}
'import requests
url = "https://core.nextmatter.com/api/instances/{id}/"
payload = {
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"tags": [],
"visibility_teams": [123]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '', deadline: '2023-11-07T05:31:56Z', tags: [], visibility_teams: [123]})
};
fetch('https://core.nextmatter.com/api/instances/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nextmatter.com/api/instances/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'deadline' => '2023-11-07T05:31:56Z',
'tags' => [
],
'visibility_teams' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nextmatter.com/api/instances/{id}/"
payload := strings.NewReader("{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://core.nextmatter.com/api/instances/{id}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.nextmatter.com/api/instances/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"process": "<string>",
"step_assignments": [
{
"step_id": 123,
"user_id": 123
}
],
"url": "<string>",
"id": 123,
"started_time": "2023-11-07T05:31:56Z",
"completed_time": "2023-11-07T05:31:56Z",
"aborted_time": "2023-11-07T05:31:56Z",
"last_updated_time": "2023-11-07T05:31:56Z",
"process_snapshot": {},
"active_step_ids": [
123
],
"step_deadlines": [
{}
],
"public_url": "<string>",
"stage": "<string>",
"visibility_mode": "<string>",
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"priority": "V",
"tags": [],
"visibility_teams": [
123
]
}Partially update instance
Update selected instance properties. Sending visibility_teams sets the audience to exactly those teams and requires permission to manage instance visibility. visibility_mode is read-only.
curl --request PATCH \
--url https://core.nextmatter.com/api/instances/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"tags": [],
"visibility_teams": [
123
]
}
'import requests
url = "https://core.nextmatter.com/api/instances/{id}/"
payload = {
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"tags": [],
"visibility_teams": [123]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '', deadline: '2023-11-07T05:31:56Z', tags: [], visibility_teams: [123]})
};
fetch('https://core.nextmatter.com/api/instances/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nextmatter.com/api/instances/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'deadline' => '2023-11-07T05:31:56Z',
'tags' => [
],
'visibility_teams' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nextmatter.com/api/instances/{id}/"
payload := strings.NewReader("{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://core.nextmatter.com/api/instances/{id}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.nextmatter.com/api/instances/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"tags\": [],\n \"visibility_teams\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"process": "<string>",
"step_assignments": [
{
"step_id": 123,
"user_id": 123
}
],
"url": "<string>",
"id": 123,
"started_time": "2023-11-07T05:31:56Z",
"completed_time": "2023-11-07T05:31:56Z",
"aborted_time": "2023-11-07T05:31:56Z",
"last_updated_time": "2023-11-07T05:31:56Z",
"process_snapshot": {},
"active_step_ids": [
123
],
"step_deadlines": [
{}
],
"public_url": "<string>",
"stage": "<string>",
"visibility_mode": "<string>",
"name": "",
"deadline": "2023-11-07T05:31:56Z",
"priority": "V",
"tags": [],
"visibility_teams": [
123
]
}Authorizations
Authentication is API key based. As an admin, you can generate an API key in Next Matter by going to Company > Next Matter API keys.
When sending requests to the API, authenticate by passing the API key in the "Authorization" HTTP header, prepended with the string "Api-Key ".
For example:
Authorization: Api-Key xyzabc.12fsfe242ubdgakew ".
Path Parameters
^\d+$Body
The name of the instance. If automatic naming has been enabled the name parameter needs to be an empty string, null, or completely left out.
255Time by which the instance should be completed
The priority of the instance. If you don't send this parameter, the priority will be "Regular". Other options are V - "Very High" and H - "High".
V- Very highH- High
V, H A list of string tags seperated by a comma
IDs of the teams that may see this instance. On start, list order is kept, and the field is accepted only when the workflow allows or requires a team selection; omit it to use the workflow's default audience. On update, sending this field sets the audience to exactly these teams and requires permission to manage instance visibility. Teams that were already selected stay in their current order; newly added teams are appended in the order given. Omit the field to leave the teams unchanged. An empty list clears the teams, except for restrictive instances, which must keep at least one.
Response
The related workflow resource URI
A list of user assignments per step
Show child attributes
Show child attributes
The instance resource URI. For example https://core.nextmatter.com/api/instances/[instance_id]/.
A snapshot of the workflow structure. If you set "inject_values" query parameter to "true", this will return the input values of the form fields., If you set "steps_time_frame" query parameter to "true", this will return the completion values of the form fields.
Show child attributes
Show child attributes
List of active step IDs of the instance
List of instance step deadlines
Show child attributes
Show child attributes
The public URL of the instance (for status tracking), if enabled in the workflow settings
Who can see this instance. Set from the workflow when the instance starts and cannot be changed. One of public, involved, involved_plus, or restrictive.
The name of the instance. If automatic naming has been enabled the name parameter needs to be an empty string, null, or completely left out.
255Time by which the instance should be completed
The priority of the instance. If you don't send this parameter, the priority will be "Regular". Other options are V - "Very High" and H - "High".
V- Very highH- High
V, H A list of string tags seperated by a comma
IDs of the teams that may see this instance. On start, list order is kept, and the field is accepted only when the workflow allows or requires a team selection; omit it to use the workflow's default audience. On update, sending this field sets the audience to exactly these teams and requires permission to manage instance visibility. Teams that were already selected stay in their current order; newly added teams are appended in the order given. Omit the field to leave the teams unchanged. An empty list clears the teams, except for restrictive instances, which must keep at least one.
Was this page helpful?

