---
title: Create a Record
slug: create-a-record
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "ttXy6p6K7DMHtqAhcMjI2",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://developer.digitail.io/api/v1/records",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/records",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/records",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Create a Record",
    "description": "<p>Permissions needed: CREATE_CHECKUPS\nCreate a new Record.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "clinic_id",
              "kind": "optional",
              "type": "integer",
              "description": "Clinic Id.",
              "example": 0
            },
            {
              "name": "vet_id",
              "kind": "optional",
              "type": "integer",
              "description": "Clinic Id.",
              "example": 0
            },
            {
              "name": "pet_id",
              "kind": "optional",
              "type": "integer",
              "description": "Pet Id.",
              "example": 0
            },
            {
              "name": "appointment_id",
              "kind": "optional",
              "type": "integer",
              "nullable": true,
              "description": "Appointment Id.",
              "example": ""
            },
            {
              "name": "template_id",
              "kind": "optional",
              "type": "integer",
              "nullable": true,
              "description": "Template Id.",
              "example": ""
            },
            {
              "name": "internal_notes",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Internal notes visible only to clinic staff members."
            },
            {
              "name": "diagnosis",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Diagnosis."
            },
            {
              "name": "presumptive_diagnosis",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Presumptive Diagnosis."
            },
            {
              "name": "treatment",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Treatment."
            },
            {
              "name": "recommendations",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Recommendations."
            },
            {
              "name": "template_default",
              "kind": "optional",
              "type": "string<general | refill>",
              "nullable": true,
              "description": "<p>Optional category of default record template to apply when <code>template_id</code> is not provided. When omitted, the <code>general</code> default template (if any) is applied. Pass <code>null</code> to skip default-template lookup entirely.</p>",
              "enum": [
                "general",
                "refill"
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "passport",
          "name": "passport",
          "kind": "optional",
          "type": "oauth2",
          "description": "Laravel passport oauth2 security.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://digitail.test/oauth/authorize",
              "tokenUrl": "https://digitail.test/oauth/token",
              "refreshUrl": "https://digitail.test/oauth/token"
            }
          }
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "<p>Record = NewFileCase = Consultation = Soap. Record is the preferred naming.</p>",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "number",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "175"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "integer",
                    "description": "<p><code>0</code> - Draft <code>1</code> - Saved <code>2</code> - Closed <code>3</code> - Hospitalized</p>",
                    "example": 1,
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3"
                    ]
                  },
                  {
                    "name": "vet_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "responsible_id",
                    "kind": "optional",
                    "type": "integer",
                    "nullable": true,
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "responsible",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Vet responsible for the record. Only present when <code>responsible</code> is requested via the <code>include</code> query parameter.</p>",
                    "complexType": "allOf",
                    "complexItems": [
                      {
                        "name": "items",
                        "description": "",
                        "modelRef": "#/paths/~1api~1v1~1vets~1%7Bid%7D~1colleagues-calendar-order/get/responses/200/content/application~1json/schema/properties/data/items",
                        "schema": []
                      }
                    ],
                    "schema": []
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "pet_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "sale_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "date",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "2021-11-19"
                  },
                  {
                    "name": "reason",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Routine checkup"
                  },
                  {
                    "name": "template_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "comments",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "recommendations",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "rabic_tag_number",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "presumptive_diagnosis",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "diagnosis",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "treatment",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "visit_types",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": ""
                      },
                      {
                        "name": "clinic_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "category",
                        "kind": "optional",
                        "type": "string<consultation_exams | vaccines | preventive_vaccines | euthanasia | spay_neuter | medical_procedures | imagining_diagnostics | boarding | grooming | microchipping | other | admin>",
                        "description": "",
                        "enum": [
                          "consultation_exams",
                          "vaccines",
                          "preventive_vaccines",
                          "euthanasia",
                          "spay_neuter",
                          "medical_procedures",
                          "imagining_diagnostics",
                          "boarding",
                          "grooming",
                          "microchipping",
                          "other",
                          "admin"
                        ]
                      },
                      {
                        "name": "category_label",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "duration",
                        "kind": "optional",
                        "type": "integer",
                        "description": ""
                      },
                      {
                        "name": "is_visible",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "color",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "order",
                        "kind": "optional",
                        "type": "integer",
                        "nullable": true,
                        "description": ""
                      },
                      {
                        "name": "deposit_for_online_booking",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "format": "float"
                      },
                      {
                        "name": "has_intake_enabled",
                        "kind": "optional",
                        "type": "boolean",
                        "nullable": true,
                        "description": "only valid for clinics with Tails integration in the Pet Parent App"
                      },
                      {
                        "name": "printable_files",
                        "kind": "optional",
                        "type": "array",
                        "nullable": true,
                        "description": "",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "integer",
                            "description": ""
                          },
                          {
                            "name": "title",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "service_packages",
                        "kind": "optional",
                        "type": "array",
                        "nullable": true,
                        "description": "",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "integer",
                            "description": ""
                          },
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "client_name",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": ""
                          },
                          {
                            "name": "description",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "unit_price",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": ""
                          },
                          {
                            "name": "price",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": ""
                          },
                          {
                            "name": "price_includes_tax",
                            "kind": "optional",
                            "type": "boolean",
                            "nullable": true,
                            "description": ""
                          },
                          {
                            "name": "tax",
                            "kind": "optional",
                            "type": "float",
                            "nullable": true,
                            "description": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "reason_visit_type",
                    "kind": "optional",
                    "type": "object",
                    "nullable": true,
                    "description": "",
                    "modelRef": "#/paths/~1api~1v1~1records/post/responses/201/content/application~1json/schema/properties/data/properties/visit_types/items",
                    "customType": "items",
                    "schema": []
                  },
                  {
                    "name": "structure",
                    "kind": "optional",
                    "type": "object",
                    "nullable": true,
                    "description": "",
                    "complexType": "oneOf",
                    "complexItems": [],
                    "schema": []
                  },
                  {
                    "name": "selectedDiagnoses",
                    "kind": "optional",
                    "type": "array",
                    "description": "<p>Only present when <code>selectedDiagnoses</code> is requested via the <code>include</code> query parameter.</p>",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Otitis externa"
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      },
                      {
                        "name": "recommendation",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      },
                      {
                        "name": "clinic_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      }
                    ]
                  },
                  {
                    "name": "clinical_examination_notes",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Only present when <code>clinical_examination_notes</code> is requested via the <code>append</code> query parameter.</p>"
                  },
                  {
                    "name": "has_quick_soap",
                    "kind": "optional",
                    "type": "boolean",
                    "nullable": true,
                    "description": "<p>Whether the record has QuickSOAP content. Only present when <code>has_quick_soap</code> is requested via the <code>append</code> query parameter.</p>"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Ecihuc3kvM-8IE_q3dgaz",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://developer.digitail.io/api/v1/records \\\n     --header 'accept: application/json'"
        },
        {
          "id": "lFCnmgBEnV4yX-Ucqxxrc",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/records\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4QyOIU8nGFTbOp1p9IclA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/records\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "mSp4VS2x-Wv61a9jki-M5",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/records\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Ecihuc3kvM-8IE_q3dgaz"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"number\": \"175\",\n    \"status\": 1,\n    \"vet_id\": 1,\n    \"responsible_id\": 1,\n    \"responsible\": {},\n    \"clinic_id\": 1,\n    \"pet_id\": 1,\n    \"sale_id\": 1,\n    \"date\": \"2021-11-19\",\n    \"reason\": \"Routine checkup\",\n    \"template_id\": 0,\n    \"comments\": \"\",\n    \"recommendations\": \"\",\n    \"rabic_tag_number\": \"\",\n    \"presumptive_diagnosis\": \"\",\n    \"diagnosis\": \"\",\n    \"treatment\": \"\",\n    \"visit_types\": [\n      {\n        \"id\": 0,\n        \"clinic_id\": 0,\n        \"name\": \"\",\n        \"description\": \"\",\n        \"category\": \"\",\n        \"category_label\": \"\",\n        \"duration\": 0,\n        \"is_visible\": false,\n        \"color\": \"\",\n        \"order\": 0,\n        \"deposit_for_online_booking\": \"\",\n        \"has_intake_enabled\": false,\n        \"printable_files\": [\n          {\n            \"id\": 0,\n            \"title\": \"\"\n          }\n        ],\n        \"service_packages\": [\n          {\n            \"id\": 0,\n            \"name\": \"\",\n            \"client_name\": \"\",\n            \"description\": \"\",\n            \"unit_price\": \"\",\n            \"price\": \"\",\n            \"price_includes_tax\": false,\n            \"tax\": \"\"\n          }\n        ]\n      }\n    ],\n    \"reason_visit_type\": {},\n    \"structure\": {},\n    \"selectedDiagnoses\": [\n      {\n        \"id\": 1,\n        \"name\": \"Otitis externa\",\n        \"description\": \"\",\n        \"recommendation\": \"\",\n        \"clinic_id\": 1\n      }\n    ],\n    \"clinical_examination_notes\": \"\",\n    \"has_quick_soap\": false\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}