Appointment messages

After an appointment type is created, you can send messages to subscribers when different actions occur. Messages can include dynamic values (also known as macros) that are populated when messages are sent. Any macro must have a value populated in the metadata of the call to POST /events/reminders. A list of macros is returned when creating, updating, and retrieving messages.

Note: To reference an appointment type, the call must include the uuid that was received on the API response when it was first created.

Make the following calls to the Appointment Reminders API for appointment messages:

Authentication

Note: Legacy APIs and the APIs outlined in the Attentive API section need separate tokens. Contact legacyapi@attentivemobile.com for a legacy API token.

You must include the following headers in your API call:

Headers

Header name Description Value Required
Authorization You must provide an access token. Contact legacyapi@attentivemobile.com for this token. Bearer <token> Required
Content-type The format of returned data. application/json Required

Create a new appointment message

Make a call to this endpoint to create a new appointment message.

URL

POST https://tactical-client-api.attentivemobile.com/events/types/messages

Parameters

Parameter Description Example Type Required
eventType This is an object that includes the unique identifier for the appointment type. object Required
uuid This is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See [Appointment types](https://docs.attentive.com/pages/api-reference/appointment-reminders-api/appointment-types/) for more details. 1a2b3c4d5e6f7g8h9i0j string Required
messageType The type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP
CONFIRMATION string Required
text The SMS message that is sent to the subscriber. This is a confirmation message for the event in {eventLocation}. string Required
uuid This is the unique identifier for the appointment message.

Note: This value cannot be set on the request body, it is only shown on the response.

z0y9x8w7v6u5t4s3r2q1 string n/a
macros Dynamic values that can be sent along with a message.

Note: This value cannot be set on the request body, it is only shown on the response.

eventLocation string Optional

Sample JSON request

curl 'https://tactical-client-api.attentivemobile.com/events/types/messages \
-X POST \
-H 'Authorization: Bearer 1a2b3c4d5' \
-H 'Content-Type: application/json' \
-d '{"eventType": {"uuid": "6c52d314-a3ca-4781-ba70-XXXXXXXXXXXX"}, "messageType": "CONFIRMATION", "text": "This is a confirmation message for the event in {eventLocation}."}

Sample JSON response

A successful response contains a uuid to use to reference the specific appointment message (827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ in the following example).

{
    "eventType": {
	    "uuid": "6c52d314-a3ca-4781-ba70-XXXXXXXXXXXX"
    },
    "messageType": "CONFIRMATION",
    "text": "This is a confirmation message for the event in {eventLocation}.",
    "uuid": "827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ",
    "macros": ["eventLocation"]
}

List an appointment message

Make a call to this endpoint to get information about an existing appointment.

URL

GET https://tactical-client-api.attentivemobile.com/events/types/messages/{uuid}

Parameters

Note that the following parameters only appear in the response.

Parameter Description Example Type Required
eventType This is an object that includes the unique identifier for the appointment type. object Required
uuid This is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See [Appointment types](https://docs.attentive.com/pages/api-reference/appointment-reminders-api/appointment-types/) for more details. 1a2b3c4d5e6f7g8h9i0j string Required
messageType The type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP
CONFIRMATION string Required
text The SMS message that is sent to the subscriber. This is a confirmation message for the event in {eventLocation}. string Required
uuid This is the unique identifier for the appointment message.

Note: This value cannot be set on the request body, it is only shown on the response.

z0y9x8w7v6u5t4s3r2q1 string Required
macros Dynamic values that can be sent along with a message.

Note: This value cannot be set on the request body, it is only shown on the response.

eventLocation string Optional

Sample JSON request

curl 'https://tactical-client-api.attentivemobile.com/events/types/messages/827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ \
-X GET \
-H 'Authorization: Bearer 1a2b3c4d5' \
-H 'Content-Type: application/json'

Sample JSON response

{
    "eventType": {
        "uuid": "6c52d314-a3ca-4781-ba70-XXXXXXXXXXXX"
    },
    "messageType": "CONFIRMATION",
    "text": "This is a confirmation message for the event.",
    "uuid": "827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ"
}

Update an appointment message

Make a call to this endpoint to update an existing appointment.

URL

PUT https://tactical-client-api.attentivemobile.com/events/types/messages/{uuid}

Parameters

Note that the request only needs the updated message in the body or any subset of fields.

Parameter Description Example Type Required
eventType This is an object that includes the unique identifier for the appointment type. object Required
uuid This is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See [Appointment types](https://docs.attentive.com/pages/api-reference/appointment-reminders-api/appointment-types/) for more details. 1a2b3c4d5e6f7g8h9i0j string Required
messageType The type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP

CONFIRMATION string n/a
text The SMS message that is sent to the subscriber. This is a confirmation message for the event in {eventLocation}. string n/a
uuid This is the unique identifier for the appointment message. z0y9x8w7v6u5t4s3r2q1 string n/a
macros Dynamic values that can be sent along with a message. eventLocation string n/a

Sample JSON request

curl 'https://tactical-client-api.attentivemobile.com/events/types/messages/827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ \
-X PUT \
-H 'Authorization: Bearer 1a2b3c4d5' \
-H 'Content-Type: application/json' \
-d '{"text": "This is a confirmation message for the AMAZING event."}

Sample JSON response

{
    "eventType": {
	    "uuid": "6c52d314-a3ca-4781-ba70-XXXXXXXXXXXX"
    },
    "messageType": "CONFIRMATION",
    "text": "This is a confirmation message for the AMAZING event.",
    "uuid": "827ea2ad-cdf8-45cf-beaf-ZZZZZZZZZZZZ"
}

Status codes

The following table lists the returned HTTP status codes.

Code Description Notes
200 OK Request successful.
400 Bad request Data is improperly formatted.
401 Authorization error API key is incorrect.
404 Not Found Activity ID was not found for cancel, no-show, or update.
500 Internal Server Error This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.