1https://usescrubs.com



1curl --location --request GET 'https://usescrubs.com/api/v1/api-key' \
2--header 'X-Scrubs-Clinic-Api-Key: your_api_key_here' \
3--header 'X-Scrubs-Clinic-Provider: your_provider_id'
4
5# To list all API keys (requires root key):
6curl --location --request GET 'https://usescrubs.com/api/v1/api-key?list_all=true' \
7--header 'X-Scrubs-Clinic-Api-Key: your_root_api_key_here' \
8--header 'X-Scrubs-Clinic-Provider: your_provider_id'1{
2 "id": "key_123456789",
3 "friendly_name": "Clinic Main API Key",
4 "created": "2024-01-15T10:30:00Z",
5 "clinic_id": "00A123",
6 "usage_limit": 1000,
7 "root": false
8}1https://usescrubs.com



1curl --location --request POST 'https://usescrubs.com/api/v1/api-key' \
2--header 'X-Scrubs-Clinic-Api-Key: your_root_api_key_here' \
3--header 'X-Scrubs-Clinic-Provider: your_provider_id' \
4--header 'Content-Type: application/json' \
5--data '{
6 "clinic_id": "00A123",
7 "friendly_name": "New Clinic API Key",
8 "usage_limit": 100
9}'1{
2 "apiKey": "sk_live_123456789abcdef",
3 "friendly_name": "New Clinic API Key",
4 "created": "2024-01-25T09:15:00Z",
5 "clinic_id": "00A123",
6 "usage_limit": 100,
7 "root": false
8}1https://usescrubs.com



1curl --location --request PUT 'https://usescrubs.com/api/v1/api-key' \
2--header 'X-Scrubs-Clinic-Api-Key: your_root_api_key_here' \
3--header 'X-Scrubs-Clinic-Provider: your_provider_id' \
4--header 'Content-Type: application/json' \
5--data '{
6 "id": "key_123456789",
7 "friendly_name": "Updated Clinic API Key",
8 "usage_limit": 1500
9}'1{
2 "id": "key_123456789",
3 "friendly_name": "Updated Clinic API Key",
4 "created": "2024-01-15T10:30:00Z",
5 "clinic_id": "00A123",
6 "usage_limit": 1500,
7 "root": false
8}1https://usescrubs.com



1curl --location --request DELETE 'https://usescrubs.com/api/v1/api-key?id=key_123456789' \
2--header 'X-Scrubs-Clinic-Api-Key: your_root_api_key_here' \
3--header 'X-Scrubs-Clinic-Provider: your_provider_id'1{
2 "message": "API key deleted successfully"
3}