curl --request POST \
--url https://connect.penbox.io/v1/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"reference": "<string>",
"status": "<string>",
"owner": {
"email": "jsmith@example.com"
},
"contacts": [
{
"key": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}
'import requests
url = "https://connect.penbox.io/v1/cases"
payload = {
"title": "<string>",
"reference": "<string>",
"status": "<string>",
"owner": { "email": "jsmith@example.com" },
"contacts": [
{
"key": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
reference: '<string>',
status: '<string>',
owner: {email: 'jsmith@example.com'},
contacts: [
{
key: '<string>',
email: 'jsmith@example.com',
name: '<string>',
given_name: '<string>',
family_name: '<string>',
phone: '<string>'
}
],
schema: [{key: '<string>', type: '<string>', value: '<unknown>', name: '<string>'}]
})
};
fetch('https://connect.penbox.io/v1/cases', 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://connect.penbox.io/v1/cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'reference' => '<string>',
'status' => '<string>',
'owner' => [
'email' => 'jsmith@example.com'
],
'contacts' => [
[
'key' => '<string>',
'email' => 'jsmith@example.com',
'name' => '<string>',
'given_name' => '<string>',
'family_name' => '<string>',
'phone' => '<string>'
]
],
'schema' => [
[
'key' => '<string>',
'type' => '<string>',
'value' => '<unknown>',
'name' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://connect.penbox.io/v1/cases"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://connect.penbox.io/v1/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.penbox.io/v1/cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"locale": "<string>",
"reference": "<string>",
"status": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"template": "<string>",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"given_name": "<string>",
"family_name": "<string>"
},
"steps": [
{
"id": "<string>",
"title": "<string>",
"status": "<string>",
"data": {}
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}Create Case
Create a new case (workflow) with contacts and data schema.
curl --request POST \
--url https://connect.penbox.io/v1/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"reference": "<string>",
"status": "<string>",
"owner": {
"email": "jsmith@example.com"
},
"contacts": [
{
"key": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}
'import requests
url = "https://connect.penbox.io/v1/cases"
payload = {
"title": "<string>",
"reference": "<string>",
"status": "<string>",
"owner": { "email": "jsmith@example.com" },
"contacts": [
{
"key": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
reference: '<string>',
status: '<string>',
owner: {email: 'jsmith@example.com'},
contacts: [
{
key: '<string>',
email: 'jsmith@example.com',
name: '<string>',
given_name: '<string>',
family_name: '<string>',
phone: '<string>'
}
],
schema: [{key: '<string>', type: '<string>', value: '<unknown>', name: '<string>'}]
})
};
fetch('https://connect.penbox.io/v1/cases', 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://connect.penbox.io/v1/cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'reference' => '<string>',
'status' => '<string>',
'owner' => [
'email' => 'jsmith@example.com'
],
'contacts' => [
[
'key' => '<string>',
'email' => 'jsmith@example.com',
'name' => '<string>',
'given_name' => '<string>',
'family_name' => '<string>',
'phone' => '<string>'
]
],
'schema' => [
[
'key' => '<string>',
'type' => '<string>',
'value' => '<unknown>',
'name' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://connect.penbox.io/v1/cases"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://connect.penbox.io/v1/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.penbox.io/v1/cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"reference\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": {\n \"email\": \"jsmith@example.com\"\n },\n \"contacts\": [\n {\n \"key\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"given_name\": \"<string>\",\n \"family_name\": \"<string>\",\n \"phone\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"key\": \"<string>\",\n \"type\": \"<string>\",\n \"value\": \"<unknown>\",\n \"name\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"locale": "<string>",
"reference": "<string>",
"status": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"given_name": "<string>",
"family_name": "<string>",
"phone": "<string>"
}
],
"template": "<string>",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"given_name": "<string>",
"family_name": "<string>"
},
"steps": [
{
"id": "<string>",
"title": "<string>",
"status": "<string>",
"data": {}
}
],
"schema": [
{
"key": "<string>",
"type": "<string>",
"value": "<unknown>",
"name": "<string>"
}
]
}Authorizations
API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}
Body
Case title
Case reference. Use it to filter cases by reference.
Initial custom status
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Array of data fields from the schema. Leave it empty to use the schema from the template. If you want to add new fields, you can add them here.
Show child attributes
Show child attributes
Response
Case created successfully
Case UUID
Case title
Parent status
draft, pending, in_progress, closed Creation timestamp
Last update timestamp
Case description
Language/locale code
Custom reference number
Custom status value
Who the case is waiting for
none, owner, contact Timestamp when archived
Array of contact objects
Show child attributes
Show child attributes
Template reference
Case owner information
Show child attributes
Show child attributes
Array of step objects representing the case workflow
Show child attributes
Show child attributes
Array of data fields with their current values
Show child attributes
Show child attributes
Was this page helpful?