---
title: Update a Pet
slug: update-a-pet
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "nl9MC_HG99tysdXE2TSsr",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://developer.digitail.io/api/v1/pets/{id}",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/pets/{id}",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/pets/{id}",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Update a Pet",
    "description": "<p>Permissions needed: UPDATE_PATIENTS\nUpdate Pet by ID, empty values will overwrite, omit key to leave unchanged</p>",
    "contentType": "multipart/form-data",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "X-HTTP-METHOD-OVERRIDE",
          "type": "string",
          "description": "PATCH header",
          "default": "PATCH"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "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": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/post/responses/201/content/application~1json/schema/properties/data",
                "customType": "data",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Ts9D-HcataWOq0HRJOOCn",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://developer.digitail.io/api/v1/pets/{id} \\\n     --header 'accept: application/json' \\\n     --header 'x-http-method-override: PATCH'"
        },
        {
          "id": "wltYTjkUaA0VXzh0qam7L",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"multipart/form-data\");\nmyHeaders.append(\"x-http-method-override\", \"PATCH\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/pets/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "t4o5BnJWLolj5nbBZZUW3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/pets/{id}\")\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\"] = \"multipart/form-data\"\nrequest[\"x-http-method-override\"] = \"PATCH\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "J7hDW7QqPqa4kWHr14O0v",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://developer.digitail.io/api/v1/pets/{id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'multipart/form-data',\n   'x-http-method-override': 'PATCH'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Ts9D-HcataWOq0HRJOOCn"
    },
    "results": {
      "languages": [
        {
          "id": "1ZmtCuRcpInWNkWLik0YD",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {}\n}"
        }
      ],
      "selectedLanguageId": "1ZmtCuRcpInWNkWLik0YD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}