Cases

Create a case in your workspace.


See also

Learn more about Cases
Learn more about Templates

post/v1/cases

Request

  • Base URL
    https://api.dotfile.com
  • Auth
    API key in header X-DOTFILE-API-KEY

Request body

namestring required

Name for the case (at most 180 characters).

status'draft' | 'open'

Optional status for this case, Defaults to open. To set the status to approved, rejected or closed, use the Create a case review endpoint.

external_idstring

Optional external id for this case. You can use that to reference an entity of your system. Must be unique if set.

template_keystring nullable

Optional template key to attach template to this case.

template_idstring uuid nullable

Prefer using template_key instead.
Optional template id to attach template to this case. Cannot be set at the same time as template_key.

assignee_idstring uuid nullable

Optional assignee id to assign a user to this case.

space_slugstring nullable

Optional space slug to assign this case to a space at creation. Must reference a space in the same workspace. Cases created without space_slug remain unassigned.

metadataobject nullable

Optional metadata in a format of key (string) / value (string) for this case.

custom_propertiesobject

Optional partial custom properties object in a format of key (string) / value (string | boolean | string[] | number | null) to create the case.

Archived custom properties are not accepted.

tagsstring[] nullable

Optional tags for this case. Either tag id, or tag label. Tag labels are case insensitive

Example request

{
  "space_slug": "space_7hk92Q75dm0a",
  "metadata": {
    "custom_key": "true",
    "my_data": "this is important",
    "count": "42"
  },
  "custom_properties": {
    "custom_text": "Custom properties text",
    "custom_boolean": true,
    "custom_date": "2012-12-12",
    "custom_countries": [
      "FR"
    ],
    "custom_choices": [
      "option1",
      "option2"
    ],
    "custom_numeric": 12.3,
    "custom_property": null
  },
  "tags": [
    "High risk",
    "8468f8e0-1067-4099-b8c3-824ae8b7204e"
  ],
  "companies": [
    {
      "banking_information": {
        "iban": "FR7630006000011234567890189",
        "bic": "AGRIFRPPXXX"
      },
      "custom_properties": {
        "custom_text": "Custom properties text",
        "custom_boolean": true,
        "custom_date": "2012-12-12",
        "custom_countries": [
          "FR"
        ],
        "custom_choices": [
          "option1",
          "option2"
        ],
        "custom_numeric": 12.3,
        "custom_property": null
      }
    }
  ],
  "individuals": [
    {
      "banking_information": {
        "iban": "FR7630006000011234567890189",
        "bic": "AGRIFRPPXXX"
      },
      "phone_number": "+33601234567",
      "custom_properties": {
        "custom_text": "Custom properties text",
        "custom_boolean": true,
        "custom_date": "2012-12-12",
        "custom_countries": [
          "FR"
        ],
        "custom_choices": [
          "option1",
          "option2"
        ],
        "custom_numeric": 12.3,
        "custom_property": null
      }
    }
  ]
}

Response

Case has been created in the workspace

ℹ️ Click to see full payload

idstring uuid required
namestring required
status'draft' | 'open' | 'approved' | 'rejected' | 'closed' required
external_idstring nullable required
space_slugstring nullable required
template_idstring uuid nullable required

Prefer using template.key instead.

contact_has_actionsboolean required
reviewer_has_actionsboolean required
flagsstring[] required

all_checks_approved for_review for_first_collect for_recollection first_collect_completed

tagsstring[] required
custom_propertiesobject required

Custom properties object in a format of key (string) / value (string | boolean | string[] | number | null) to read the case.

Archived custom properties are omitted.

metadataobject nullable required

Object in a format of key (string) / value (string)

last_activity_atstring date-time required

Latest activity date
Date time in format ISO 8601 (yyyy-MM-ddTHH:mm:ss.S+X eg 2023-01-31T13:30:00.000Z)

last_contact_action_atstring date-time nullable required

Latest contact action date
Date time in format ISO 8601 (yyyy-MM-ddTHH:mm:ss.S+X eg 2023-01-31T13:30:00.000Z)

assignee_idstring nullable required

The user id of the assignee of the case. null if not assigned.

Prefer to use assignee.id instead.

created_atstring date-time required

Creation date
Date time in format ISO 8601 (yyyy-MM-ddTHH:mm:ss.S+X eg 2023-01-31T13:30:00.000Z)

updated_atstring date-time required

Latest update date
Date time in format ISO 8601 (yyyy-MM-ddTHH:mm:ss.S+X eg 2023-01-31T13:30:00.000Z)

Example response

{
  "custom_properties": {
    "custom_text": "Custom properties text",
    "custom_boolean": true,
    "custom_date": "2012-12-12",
    "custom_countries": [
      "FR"
    ],
    "custom_choices": [
      "option1",
      "option2"
    ],
    "custom_numeric": 12.3,
    "custom_property": null
  },
  "individuals": [
    {
      "banking_information": {
        "iban": "FR7630006000011234567890189",
        "bic": "AGRIFRPPXXX"
      },
      "phone_number": "+33601234567",
      "custom_properties": {
        "custom_text": "Custom properties text",
        "custom_boolean": true,
        "custom_date": "2012-12-12",
        "custom_countries": [
          "FR"
        ],
        "custom_choices": [
          "option1",
          "option2"
        ],
        "custom_numeric": 12.3,
        "custom_property": null
      }
    }
  ],
  "companies": [
    {
      "banking_information": {
        "iban": "FR7630006000011234567890189",
        "bic": "AGRIFRPPXXX"
      },
      "custom_properties": {
        "custom_text": "Custom properties text",
        "custom_boolean": true,
        "custom_date": "2012-12-12",
        "custom_countries": [
          "FR"
        ],
        "custom_choices": [
          "option1",
          "option2"
        ],
        "custom_numeric": 12.3,
        "custom_property": null
      }
    }
  ]
}

Changes