---
title: "Messaging"
canonical: "https://wiki.patientsknowbest.com/space/api/3364028560/Messaging"
format: markdown
---
> Macro (pagetree)



> Macro (toc)

## Overview

PKB maintains a dedicated endpoint at /phr-fhir which exposes a single, custom operation, designed to allow a Messaging-like way of creating new patients.

See [Patient/$process-message](https://dev.patientsknowbest.com/home/fhir-api/operation/process-message) for more information.

### What you can do with this endpoint

- Create, update, and invite patients to register using the $process-message operation

### What you cannot do with this endpoint

- Read or write any other data

## Capabilities

Full details of the supported capabilities are defined in this CapabilityStatement:

[https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365011457/Capabilities+Messaging+Endpoint](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365011457/Capabilities+Messaging+Endpoint)

## Endpoint

The Messaging FHIR endpoint is available at a base of /phr-fhir relative to the server host.

For example, PKB's sandbox environment has a server host address of: [https://sandbox.patientsknowbest.com](https://sandbox.patientsknowbest.com)

The corresponding Facade FHIR endpoint is therefore available at: [https://sandbox.patientsknowbest.com/phr-fhir](https://sandbox.patientsknowbest.com/phr-fhir)

## Authentication

Access to the Messaging FHIR endpoint is protected by OAuth 2.0.

Callers must provide a valid Bearer token in the Authorization HTTP header, which can be obtained from PKB by using the correct workflow for your deployment.

System Clients are also required to provide the [X Org Public Id](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365078610/OAuth+2.0#X-Org-Public-Id) HTTP header.

Please see our [OAuth 2.0 documentation](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3365078610) for more information.

## Validation and business rules

Pending

## Examples

Please see the [Examples](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3575513089/Messaging+Examples) page for guidance on how to interact with this endpoint.

## Roadmap

Please see the [Messaging Roadmap](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3363963093) page for planned changes to this endpoint.