Get a project member
- Sandbox: available
- Staging: available
- Production: unknown
Reads one Practitioner member of your current project.
Auth: bearer token of a project admin (ProjectMembership.admin).
Scope: the caller's project (from the token). A membership of another project answers 404.
Behaviour
emailVerifiedistrueonce the member has used an emailed set-password link, andnullwhen the User cannot be read.pendingis alwaysfalseon this route.- The route requires a Practitioner membership; any other membership type is refused with 400.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/projects/me/members/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>membershipId*stringId of the ProjectMembership.
The member.
application/json- response
id*stringemail*stringdisplayName*stringfirstName*stringlastName*stringadmin*booleanprofileType*string"Practitioner""Patient""RelatedPerson"profileId*stringpending*booleaninvitedAt*stringemailVerified*booleancurl -X GET 'https://api.sandbox.ovok.com/v1/projects/me/members/string'{ "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "admin": true, "profileType": "Practitioner", "profileId": "string", "pending": true, "invitedAt": "string", "emailVerified": true}Invite a Practitioner to the project POST
Adds a Practitioner to your current project and emails them a link to set their password. **Auth:** bearer token of a project admin (`ProjectMembership.admin`). **Scope:** the caller's project (from the token). The project setting `PRACTITIONER_INVITATION_ENABLED` must be on. ## Behaviour - `email` is trimmed and lowercased. `firstName` and `lastName` default to `New` and `Member`; `admin` defaults to `false`. - Creates the User (when the address has no account yet), the Practitioner and the membership in one write. - The invitee is emailed a link to set a password, built on the project's practitioner app URL (the project's `PRACTITIONER_APP_URL`, then the parent project's, then the legacy `CLINICIAN_DASHBOARD_URL`, then your request's `Origin` when CORS allows it, then the deployment default). The response has `pending: true` and `existingAccount: false`. - An address that can already sign in (it has a password, or belongs to another project) gets the membership but no email, and the response has `existingAccount: true`. - If the email cannot be sent, the new account is removed again and the request fails. - `access` sets the membership's `access[]` entries. Each must name an AccessPolicy of this project. With `access`, the membership's base `accessPolicy` is the project's `DEFAULT_PRACTITIONER_ACCESS_POLICY` setting. - A member with this email already exists on the project: 409. Setting `access` on a project with no default practitioner access policy: 409 `invitation_not_configured`. No practitioner app URL resolves: 409 `app_url_not_configured`, and nothing is created. - Practitioner invitations disabled on the project: 403. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/projects/me/members' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "email": "max.mustermann@example.com", "firstName": "Max", "lastName": "Mustermann", "admin": false }' ```
Update a project member PATCH
Changes a Practitioner member of your current project: their admin flag, their `access[]` entries, or both. **Auth:** bearer token of a project admin (`ProjectMembership.admin`). **Scope:** the caller's project (from the token). A membership of another project answers 404. ## Behaviour - `admin`: `true` or `false` sets the flag; `null` leaves it as it is. - `access`: replaces the membership's `access[]` entries; an empty array removes them. Omit it to leave them as they are. Each entry must name an AccessPolicy of this project. A membership without a base `accessPolicy` cannot have its entries removed, because Medplum would then grant access to the whole project. - `versionId`: pass the `meta.versionId` you read. If the membership changed since, the request answers 409. A concurrent write that lands first also answers 409. - A request that changes nothing returns the member unchanged. - Demoting the last admin of the project is refused. - After the change, Ovok renews its cached session data for every session of the member. Medplum applies the change on the member's next request. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/v1/projects/me/members/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "admin": true }' ```