Skip to main content
GET
/
v1
/
users
/
{publicId}
Get user by publicId
curl --request GET \
  --url https://app.hipp.health/api/v1/users/{publicId} \
  --header 'Authorization: Bearer <token>'
{
  "publicId": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "caregiverId": "<string>",
  "birthDate": "2023-12-25",
  "addressLine1": "<string>",
  "addressLine2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postalCode": "<string>"
}

Get User By Id

Retrieve a single user by their publicId.

Headers

Authorization: Bearer <your-api-key>

Path Parameters

  • publicId (required): User public identifier

Success Response (200)

{
  "publicId": "usr_1234567890_abc123def",
  "firstName": "John",
  "lastName": "Doe",
  "sex": "MALE",
  "caregiverId": null,
  "role": "PATIENT",
  "birthDate": "1990-01-15",
  "addressLine1": "123 Main St",
  "addressLine2": "Apt 4B",
  "city": "New York",
  "state": "NY",
  "postalCode": "10001"
}

Error Responses

400 - Validation Error

{
  "error": "Validation error",
  "details": [
    {
      "code": "invalid_string",
      "message": "Invalid publicId format",
      "path": ["publicId"]
    }
  ]
}

401 - Unauthorized

{
  "error": "API key required"
}

403 - Forbidden

{
  "error": "Access denied"
}

404 - Not Found

{
  "error": "Resource not found"
}

Examples

cURL Example

# Get user by publicId
curl -X GET "https://app.hipp.health/api/v1/users/usr_1234567890_abc123def" \
  -H "Authorization: Bearer your-api-key"

JavaScript Example

const getUserById = async (publicId) => {
  const response = await fetch(`/api/v1/users/${publicId}`, {
    method: "GET",
    headers: {
      Authorization: "Bearer your-api-key",
    },
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.error || "Failed to fetch user");
  }

  return response.json();
};

// Usage
try {
  const user = await getUserById("usr_1234567890_abc123def");
  console.log("User:", user);
} catch (error) {
  console.error("Error fetching user:", error.message);
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as 'Bearer '

Path Parameters

publicId
string
required

User public identifier

Minimum string length: 1

Response

Successful response

publicId
string
required

User public identifier

role
enum<string>
required

User role. All values may be returned by the API; a smaller subset may be assigned when creating a user (see the create user endpoint). Note that HIPP_ADMIN users are never returned by the list users endpoint.

Available options:
ADMIN,
BILLING_MANAGER,
SCHEDULING_MANAGER,
CLINICIAN,
TECHNICIAN,
PATIENT,
CAREGIVER,
HIPP_ADMIN,
HIPP_BILLING_MANAGER,
CLINICAL_ADMIN,
PAYROLL_ADMIN,
CLINICAL_SUPERADMIN
firstName
string | null

User's first name

lastName
string | null

User's last name

sex
enum<string> | null

User's sex

Available options:
MALE,
FEMALE,
OTHER
caregiverId
string | null

Caregiver public identifier (if user is a patient)

birthDate
string<date> | null

User's birth date in YYYY-MM-DD format

addressLine1
string | null

First line of address

addressLine2
string | null

Second line of address

city
string | null

City

state
string | null

State

postalCode
string | null

Postal code