v1

latestOpenAPI 3.0.02026-07-2447166133.5 KB
Contacts

Invite patient to Spruce

This operation sends an invite to a patient contact:

  • If the contact is invited for the first time, a new secure conversation will be created,
  • If the contact is already invited, the invite will be re-sent to the same secure conversation,
  • If the contact is already on Spruce, an error will be returned.
post/contacts/{contactId}/invite

Path parameters

contactIdstring required

The id of the contact to invite.

Request body

customMessagestring

The message to send to the invitee.

destinationIdstring required

The id of the phone number or email to send the invite to.

internalEndpointIdstring required

Organization's internal secure endpoint that will be used to send the invite.

Example request

{
  "customMessage": "You've been invited to securely message with our clinic.",
  "destinationId": "entityContact_0D4QABCC06000",
  "internalEndpointId": "organizationCode_2ER39ETHBQ800"
}

Response

Expected response to a valid request

Example response

{
  "contact": {
    "apiURL": "https://api.sprucehealth.com/contact/entity_0E5QDGJC03000",
    "appURL": "https://app.sprucehealth.com/org/entity_0D4QABCC06000/contact/entity_0E5QDGJC03000",
    "canDelete": true,
    "canEdit": true,
    "category": "patient",
    "companyName": "Walgreens",
    "created": "2021-01-30T08:30:00Z",
    "customContactFields": [
      {
        "id": "entityCustomField_0E5QDGJC03000",
        "name": "Preferred Pharmacy",
        "value": "CVS"
      }
    ],
    "dateOfBirth": "2000-01-30",
    "displayName": "Joe William Smith",
    "emailAddresses": [
      {
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "Work",
        "value": "contact@example.com"
      }
    ],
    "familyName": "Smith",
    "faxNumbers": [
      {
        "displayValue": "(222) 555-0000",
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "Work"
      }
    ],
    "gender": "unknown",
    "genderDetail": "Non-binary",
    "givenName": "Joe",
    "hasAccount": true,
    "hasPendingInvite": true,
    "id": "entity_0E5QDGJC03000",
    "integrationLinks": [
      {
        "contactId": "entity_0E5QDGJC03000",
        "externalId": "elation_140797386655555",
        "type": "elation"
      }
    ],
    "middleName": "William",
    "organizationContactFields": [
      {
        "id": "managedCustomField_0E5QDGJC03000",
        "name": "Preferred Pharmacy",
        "value": "CVS"
      }
    ],
    "phoneNumbers": [
      {
        "displayValue": "(222) 555-0000",
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "Work"
      }
    ],
    "pronouns": "he/him",
    "tags": [
      {
        "id": "tag_0E5QDGJC03000",
        "value": "Smith"
      }
    ]
  },
  "conversation": {
    "apiURL": "https://api.sprucehealth.com/conversations/t_0E5QDJJC03000",
    "appURL": "https://app.sprucehealth.com/org/entity_0D4QABCC06000/thread/t_0E5QDJJC03000",
    "assignedToMemberId": "entity_0D4QABCC06000",
    "associatedContactIds": [
      "entity_0D4QABCC06000"
    ],
    "createdAt": "2020-04-01T00:00:00Z",
    "externalParticipants": [
      {
        "contact": "entity_0D4QABCC06000"
      }
    ],
    "id": "t_0E5QDGJC03000",
    "internalMemberIds": [
      "entity_0D4QABCC06000"
    ],
    "lastMessageAt": "2020-04-01T00:00:00Z",
    "subtitle": "Billing",
    "tags": [
      {
        "id": "tag_0E5QDGJC03000",
        "value": "Smith"
      }
    ],
    "title": "John Doe"
  }
}