DodoDentist Patients API

The Patients API from DodoDentist — 2 operation(s) for patients.

Operations 5

GET /api/patients List patients #
POST /api/patients Create a patient #
GET /api/patients/{patientId} Get a patient #
PUT /api/patients/{patientId} Update a patient #
DELETE /api/patients/{patientId} Delete a patient #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dododentist-com:dododentist-com-patients-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dododentist-com-patients-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DodoDentist Patients API
  version: 1.0.0
  description: 'Public REST API for DodoDentist. Authenticate with an API key created in the DodoDentist dashboard: send the base64-encoded key secret with HTTP Basic auth. Each key carries per-resource scopes like `patients:read` or `appointments:write`.'
servers:
- url: https://api.dododentist.com
tags:
- name: Patients
paths:
  /api/patients:
    get:
      tags:
      - Patients
      summary: List patients
      description: Lists the patients of your clinic. Requires the `patients:read` scope.
      security:
      - apiKey: []
      - accessToken: []
      parameters:
      - in: query
        name: clinicId
        schema:
          type: string
      - in: query
        name: email
        schema:
          type: string
      - in: query
        name: _ids
        description: Comma-separated list of patient ids
        schema:
          type: string
      - in: query
        name: fields
        description: Comma-separated projection of fields to return
        schema:
          type: string
      responses:
        '200':
          description: Array of patients
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      minLength: 1
                    clinicId:
                      type: string
                      minLength: 1
                    name:
                      type: string
                    email:
                      type: string
                      format: email
                    phone:
                      type: string
                    language:
                      type: string
                    lastEditTime:
                      type: string
                      format: date-time
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        '403':
          description: API key is missing the `patients:read` scope
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        '429':
          description: API key rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
      operationId: getApiPatients
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dododentist.com/api/patients',\n  qs: {\n    clinicId: 'SOME_STRING_VALUE',\n    email: 'SOME_STRING_VALUE',\n    _ids: 'SOME_STRING_VALUE',\n    fields: 'SOME_STRING_VALUE'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://api.dododentist.com/api/patients?clinicId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"
      - lang: Shell + Httpie
        source: "http GET 'https://api.dododentist.com/api/patients?clinicId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"
      - lang: Python + Python3
        source: 'import http.client


          conn = http.client.HTTPSConnection("api.dododentist.com")


          headers = { ''Authorization'': "Basic REPLACE_BASIC_AUTH" }


          conn.request("GET", "/api/patients?clinicId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE", headers=headers)


          res = conn.getresponse()

          data = res.read()


          print(data.decode("utf-8"))'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dododentist.com/api/patients?clinicId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: Php + Http1
        source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dododentist.com/api/patients');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clinicId' => 'SOME_STRING_VALUE',\n  'email' => 'SOME_STRING_VALUE',\n  '_ids' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"
      - lang: Php + Http2
        source: "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dododentist.com/api/patients');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'clinicId' => 'SOME_STRING_VALUE',\n  'email' => 'SOME_STRING_VALUE',\n  '_ids' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
    post:
      tags:
      - Patients
      summary: Create a patient
      description: Creates a patient in your clinic. Requires the `patients:write` scope. Fires the `patient.created` webhook.
      security:
      - apiKey: []
      - accessToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - clinicId
              properties:
                clinicId:
                  type: string
                name:
                  type: string
                email:
                  type: string
                phone:
                  type: string
      responses:
        '200':
          description: The created patient
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 1
                  clinicId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  language:
                    type: string
                  lastEditTime:
                    type: string
                    format: date-time
        '403':
          description: API key is missing the `patients:write` scope
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
      operationId: postApiPatients
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.dododentist.com/api/patients',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {clinicId: 'string', name: 'string', email: 'string', phone: 'string'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Shell + Curl
        source: "curl --request POST \\\n  --url https://api.dododentist.com/api/patients \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\"}'"
      - lang: Shell + Httpie
        source: "echo '{\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\"}' |  \\\n  http POST https://api.dododentist.com/api/patients \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"
      - lang: Python + Python3
        source: "import http.client\n\nconn = http.client.HTTPSConnection(\"api.dododentist.com\")\n\npayload = \"{\\\"clinicId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"POST\", \"/api/patients\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dododentist.com/api/patients\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"clinicId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: Php + Http1
        source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dododentist.com/api/patients');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"
      - lang: Php + Http2
        source: "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\"}');\n\n$request->setRequestUrl('https://api.dododentist.com/api/patients');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
  /api/patients/{patientId}:
    get:
      tags:
      - Patients
      summary: Get a patient
      description: Returns a single patient by id. Patients belonging to another organization respond 404. Requires the `patients:read` scope.
      security:
      - apiKey: []
      - accessToken: []
      parameters:
      - in: path
        name: patientId
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The patient
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 1
                  clinicId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  language:
                    type: string
                  lastEditTime:
                    type: string
                    format: date-time
        '404':
          description: Not found (or owned by another organization)
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
      operationId: getApiPatientsPatientId
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.dododentist.com/api/patients/%7BpatientId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"
      - lang: Shell + Httpie
        source: "http GET https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"
      - lang: Python + Python3
        source: 'import http.client


          conn = http.client.HTTPSConnection("api.dododentist.com")


          headers = { ''Authorization'': "Basic REPLACE_BASIC_AUTH" }


          conn.request("GET", "/api/patients/%7BpatientId%7D", headers=headers)


          res = conn.getresponse()

          data = res.read()


          print(data.decode("utf-8"))'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dododentist.com/api/patients/%7BpatientId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: Php + Http1
        source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"
      - lang: Php + Http2
        source: "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
    put:
      tags:
      - Patients
      summary: Update a patient
      description: Requires the `patients:write` scope. Fires the `patient.updated` webhook.
      security:
      - apiKey: []
      - accessToken: []
      parameters:
      - in: path
        name: patientId
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The updated patient
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 1
                  clinicId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  language:
                    type: string
                  lastEditTime:
                    type: string
                    format: date-time
        '404':
          description: Not found (or owned by another organization)
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
      operationId: putApiPatientsPatientId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                _id:
                  type: string
                  minLength: 1
                clinicId:
                  type: string
                  minLength: 1
                name:
                  type: string
                email:
                  type: string
                  format: email
                phone:
                  type: string
                language:
                  type: string
                lastEditTime:
                  type: string
                  format: date-time
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.dododentist.com/api/patients/%7BpatientId%7D',\n  headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'},\n  body: {\n    _id: 'string',\n    clinicId: 'string',\n    name: 'string',\n    email: 'user@example.com',\n    phone: 'string',\n    language: 'string',\n    lastEditTime: '2019-08-24T14:15:22Z'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Shell + Curl
        source: "curl --request PUT \\\n  --url https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \\\n  --header 'content-type: application/json' \\\n  --data '{\"_id\":\"string\",\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"language\":\"string\",\"lastEditTime\":\"2019-08-24T14:15:22Z\"}'"
      - lang: Shell + Httpie
        source: "echo '{\"_id\":\"string\",\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"language\":\"string\",\"lastEditTime\":\"2019-08-24T14:15:22Z\"}' |  \\\n  http PUT https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH' \\\n  content-type:application/json"
      - lang: Python + Python3
        source: "import http.client\n\nconn = http.client.HTTPSConnection(\"api.dododentist.com\")\n\npayload = \"{\\\"_id\\\":\\\"string\\\",\\\"clinicId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"lastEditTime\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"Basic REPLACE_BASIC_AUTH\"\n    }\n\nconn.request(\"PUT\", \"/api/patients/%7BpatientId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dododentist.com/api/patients/%7BpatientId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"_id\\\":\\\"string\\\",\\\"clinicId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"lastEditTime\\\":\\\"2019-08-24T14:15:22Z\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: Php + Http1
        source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$request->setBody('{\"_id\":\"string\",\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"language\":\"string\",\"lastEditTime\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"
      - lang: Php + Http2
        source: "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"_id\":\"string\",\"clinicId\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"language\":\"string\",\"lastEditTime\":\"2019-08-24T14:15:22Z\"}');\n\n$request->setRequestUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
    delete:
      tags:
      - Patients
      summary: Delete a patient
      description: Requires the `patients:write` scope. Fires the `patient.deleted` webhook.
      security:
      - apiKey: []
      - accessToken: []
      parameters:
      - in: path
        name: patientId
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The deleted patient
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 1
                  clinicId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  language:
                    type: string
                  lastEditTime:
                    type: string
                    format: date-time
        '404':
          description: Not found (or owned by another organization)
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  message:
                    type: string
                  name:
                    type: string
                  statusCode:
                    type: integer
                  details:
                    type: object
                    additionalProperties: true
      operationId: deleteApiPatientsPatientId
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.dododentist.com/api/patients/%7BpatientId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Shell + Curl
        source: "curl --request DELETE \\\n  --url https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"
      - lang: Shell + Httpie
        source: "http DELETE https://api.dododentist.com/api/patients/%7BpatientId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"
      - lang: Python + Python3
        source: 'import http.client


          conn = http.client.HTTPSConnection("api.dododentist.com")


          headers = { ''Authorization'': "Basic REPLACE_BASIC_AUTH" }


          conn.request("DELETE", "/api/patients/%7BpatientId%7D", headers=headers)


          res = conn.getresponse()

          data = res.read()


          print(data.decode("utf-8"))'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.dododentist.com/api/patients/%7BpatientId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: Php + Http1
        source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"
      - lang: Php + Http2
        source: "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.dododentist.com/api/patients/%7BpatientId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: basic
      description: 'HTTP Basic auth carrying only the API key secret: `Authorization: Basic base64(<key secret>)`.'
    accessToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Operator session token issued by the DodoDentist dashboard: `Authorization: Token <access token>`.'