Skip to main content
POST
/
cases
Create Case
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>",
  "template": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "workspace": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "owner": {
    "email": "[email protected]"
  },
  "contacts": [
    {
      "key": "<string>",
      "email": "[email protected]",
      "name": "<string>",
      "given_name": "<string>",
      "family_name": "<string>",
      "phone": "<string>"
    }
  ],
  "schema": [
    {
      "key": "<string>",
      "type": "<string>",
      "value": "<unknown>",
      "name": "<string>"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "parent_status": "draft",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "locale": "<string>",
  "reference": "<string>",
  "status": "<string>",
  "waiting_for": "none",
  "archived_at": "2023-11-07T05:31:56Z",
  "contacts": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "key": "<string>",
      "name": "<string>",
      "email": "[email protected]",
      "given_name": "<string>",
      "family_name": "<string>",
      "phone": "<string>"
    }
  ],
  "template": "<string>",
  "owner": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "email": "[email protected]",
    "given_name": "<string>",
    "family_name": "<string>"
  },
  "steps": [
    {
      "id": "<string>",
      "title": "<string>",
      "status": "<string>",
      "data": {}
    }
  ],
  "schema": [
    {
      "key": "<string>",
      "type": "<string>",
      "value": "<unknown>",
      "name": "<string>"
    }
  ]
}
Create a new case (workflow) with contacts and data schema.
Contacts are automatically created or linked if they already exist in the system based on their email address.

Authorizations

Authorization
string
header
required

API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}

Body

application/json
title
string
required

Case title

reference
string

Case reference. Use it to filter cases by reference.

status
string

Initial custom status

template
object
workspace
object
owner
object
contacts
object[]
schema
object[]

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.

Response

200 - application/json

Case created successfully

id
string<uuid>
required

Case UUID

title
string
required

Case title

parent_status
enum<string>
required

Parent status

Available options:
draft,
pending,
in_progress,
closed
created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp

description
string | null

Case description

locale
string | null

Language/locale code

reference
string | null

Custom reference number

status
string | null

Custom status value

waiting_for
enum<string>

Who the case is waiting for

Available options:
none,
owner,
contact
archived_at
string<date-time> | null

Timestamp when archived

contacts
object[]

Array of contact objects

template
string | null

Template reference

owner
object

Case owner information

steps
object[]

Array of step objects representing the case workflow

schema
object[]

Array of data fields with their current values