Skip to main content
Use this endpoint to modify an existing practitioner role. Send only the fields you want to change — you do not need to include the full role object. This is useful for updating availability, changing a specialty, or deactivating a role by setting status to inactive.

Request

PATCH https://api.clinikapi.com/v1/practitioner-roles/{id}

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).
Content-Type
string
required
Must be application/json.

Path Parameters

id
string
required
The ID of the practitioner role to update (e.g. pr_abc123).

Body

All body fields are optional. Include only the fields you want to change.
role
string
Updated role code (e.g. doctor, nurse, consultant, admin).
organizationId
string
Updated organization reference ID.
locationId
string
Updated location reference ID.
specialty
object
Updated specialty for this role. Replaces the entire specialty object.
status
string
Updated role status. One of: active, inactive.
period
object
Updated active date range. Replaces the entire period object.

Response

Returns 200 OK with the complete updated practitioner role resource.
data.id
string
The practitioner role’s unique ID.
data.practitionerId
string
ID of the linked practitioner.
data.role
string
Current role code.
data.status
string
Current role status after update.
data.specialty
object
Current specialty object after update.
data.period
object
Current active date range after update.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.

Examples

curl — update specialty

curl -X PATCH https://api.clinikapi.com/v1/practitioner-roles/pr_abc123 \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "specialty": {
      "code": "394819006",
      "display": "Interventional Cardiology"
    }
  }'

curl — deactivate a role

curl -X PATCH https://api.clinikapi.com/v1/practitioner-roles/pr_abc123 \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "inactive",
    "period": {
      "start": "2024-01-01",
      "end": "2025-12-31"
    }
  }'

TypeScript SDK

import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY!);

// Update specialty
const { data } = await clinik.practitionerRoles.update('pr_abc123', {
  specialty: {
    code: '394819006',
    display: 'Interventional Cardiology',
  },
});

// Deactivate a role
await clinik.practitionerRoles.update('pr_abc123', {
  status: 'inactive',
  period: {
    start: '2024-01-01',
    end: '2025-12-31',
  },
});