List invitations
/v1/practices/{practiceId}/team/invitationsRequires team:read. Lists practice invitations, including invitations sent in Clinic. Filter by pending, expired, accepted, declined, or revoked status, exact email, or your integration externalId. Only your integration and API key mode can see its external identity and onboarding state. Follow person.nextActions after invitation acceptance.
Request example
curl -X GET 'https://api.affinityrx.com/v1/practices/{practiceId}/team/invitations' \
-H "Authorization: Bearer $AFFINITY_API_KEY" \
-H 'Affinity-Version: 2026-09-28'Response example
These examples show the body structure. Values can differ. Select a status code to see its response.
{
"data": [
{
"id": "invite_01j2y8m6jcc9tt24af5pw9x1bc",
"object": "team_invitation",
"email": "<string>",
"name": "<string>",
"status": "accepted",
"roles": [
{
"id": "role_01j2y8m6jcc9tt24af5pw9x1bc",
"name": "<string>",
"key": "<string>"
}
],
"locationIds": [
"loc_01j2y8m6jcc9tt24af5pw9x1bc"
],
"createdAt": "<string>",
"expiresAt": "<string>",
"acceptedAt": "<string>",
"userId": "user_01j2y8m6jcc9tt24af5pw9x1bc",
"externalId": "<string>",
"memberId": "mbr_01j2y8m6jcc9tt24af5pw9x1bc",
"prescriberId": "prov_01j2y8m6jcc9tt24af5pw9x1bc",
"person": {
"id": "user_01j2y8m6jcc9tt24af5pw9x1bc",
"object": "team_person",
"externalId": "<string>",
"email": "<string>",
"name": "<string>",
"status": "<string>",
"invitation": {
"id": "invite_01j2y8m6jcc9tt24af5pw9x1bc",
"status": "accepted",
"expiresAt": "<string>",
"roles": [
{
"id": null,
"name": null,
"key": null
}
]
},
"account": {
"accountId": "<string>",
"emailVerified": false,
"membershipId": "mbr_01j2y8m6jcc9tt24af5pw9x1bc",
"membershipStatus": "<string>",
"roles": [
{
"id": null,
"name": null,
"key": null
}
],
"prescriberConnection": {
"status": null,
"provider": null
}
},
"nextActions": [
"<string>"
]
}
}
],
"hasMore": false,
"object": "list",
"url": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 400,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 401,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 403,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 404,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 409,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 429,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}Implementation specification
Use these field types and limits to build your integration. Download the OpenAPI document for the complete contract.
Path parameters
practiceIdstringrequiredPattern: ^prac_[0-7][0-9a-hjkmnp-tv-z]{25}$
Query parameters
limitintegerDefault: 25
Minimum: 1
Maximum: 100
startingAfterstring | nullShow schema
Any of · 1: string
string
Pattern: ^invite_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
endingBeforestring | nullShow schema
Any of · 1: string
string
Pattern: ^invite_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
statusstring | nullShow schema
Any of · 1: string
string
Allowed: "accepted", "declined", "pending", "expired", "revoked"
Any of · 2: null
null
emailstring | nullShow schema
Any of · 1: string
string
Pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$
Any of · 2: null
null
externalIdstring | nullShow schema
Any of · 1: string
string
Any of · 2: null
null
Headers
Affinity-VersionstringSelects the HTTP API contract for this request only. When omitted, API-key requests use their service account’s stored version. Does not change the stored default.
Pin requests to 2026-09-28.
Response specifications
200Successful response
application/json
dataobject[]requiredShow data fields
Array items · object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^invite_[0-7][0-9a-hjkmnp-tv-z]{25}$
objectstringrequiredAllowed: "team_invitation"
emailstringrequirednamestring | nullrequiredShow name fields
Any of · 1: string
string
Any of · 2: null
null
statusstringrequiredAllowed: "accepted", "declined", "pending", "expired", "revoked"
rolesobject[]requiredShow roles fields
Array items · object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^role_[0-7][0-9a-hjkmnp-tv-z]{25}$
namestringrequiredkeystring | nullrequiredShow key fields
Any of · 1: string
string
Any of · 2: null
null
locationIdsany[]requiredShow locationIds fields
Array items · any
All of · 1: any
any
Pattern: ^loc_[0-7][0-9a-hjkmnp-tv-z]{25}$
createdAtstringrequiredexpiresAtstringrequiredacceptedAtstring | nullrequiredShow acceptedAt fields
Any of · 1: string
string
Any of · 2: null
null
userIdany | nullrequiredThis integration's mode-scoped user ID, used for draft attribution and sessions after acceptance. Null for invitations outside this integration.
Show userId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^user_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
externalIdstring | nullrequiredShow externalId fields
Any of · 1: string
string
Any of · 2: null
null
memberIdany | nullrequiredShow memberId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^mbr_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
prescriberIdany | nullrequiredShow prescriberId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^prov_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
personobject | nullrequiredThis integration's current onboarding and account-connection state. Null for invitations outside this integration.
Show person fields
Any of · 1: object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^user_[0-7][0-9a-hjkmnp-tv-z]{25}$
objectstringrequiredAllowed: "team_person"
externalIdstringrequiredemailstring | nullrequiredShow email fields
Any of · 1: string
string
Any of · 2: null
null
namestring | nullrequiredShow name fields
Any of · 1: string
string
Any of · 2: null
null
statusstringrequiredinvitationobject | nullrequiredShow invitation fields
Any of · 1: object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^invite_[0-7][0-9a-hjkmnp-tv-z]{25}$
statusstringrequiredAllowed: "accepted", "declined", "pending", "expired", "revoked"
expiresAtstringrequiredrolesobject[]requiredShow roles fields
Array items · object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^role_[0-7][0-9a-hjkmnp-tv-z]{25}$
namestringrequiredkeystring | nullrequiredShow key fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
accountobject | nullrequiredShow account fields
Any of · 1: object
accountIdstringrequiredemailVerifiedbooleanrequiredmembershipIdanyrequiredShow membershipId fields
All of · 1: any
any
Pattern: ^mbr_[0-7][0-9a-hjkmnp-tv-z]{25}$
membershipStatusstringrequiredrolesobject[]requiredShow roles fields
Array items · object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^role_[0-7][0-9a-hjkmnp-tv-z]{25}$
namestringrequiredkeystring | nullrequiredShow key fields
Any of · 1: string
string
Any of · 2: null
null
prescriberConnectionobject | nullrequiredShow prescriberConnection fields
Any of · 1: object
statusstringrequiredproviderobjectrequiredNo additional properties
Show provider fields
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^prov_[0-7][0-9a-hjkmnp-tv-z]{25}$
namestringrequiredlegalNamestringrequiredcredentialsstring | nullrequiredShow credentials fields
Any of · 1: string
string
Any of · 2: null
null
phonestring | nullrequiredShow phone fields
Any of · 1: string
string
Any of · 2: null
null
addressobject | nullrequiredShow address fields
Any of · 1: object
line1stringrequiredline2string | nullShow line2 fields
Any of · 1: string
string
Any of · 2: null
null
citystringrequiredstatestringrequiredpostalCodestringrequiredcountrystringrequiredAny of · 2: null
null
npistringrequiredpracticeStatusstringrequiredlicensesobject[]requiredShow licenses fields
Array items · object
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^lic_[0-7][0-9a-hjkmnp-tv-z]{25}$
statestringrequiredlicenseNumberstringrequiredexpiresAtstring | nullrequiredShow expiresAt fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
nextActionsstring[]requiredShow nextActions fields
Array items · string
string
Any of · 2: null
null
hasMorebooleanrequiredobjectstringrequiredAllowed: "list"
urlstringrequired400HTTP 400
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
401Unauthorized
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
403Forbidden
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
404Not found
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
409Conflict
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
429Too many requests
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri