Appointment Messages

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 [email protected] for a legacy API token.

You must include the following headers in your API call:

Headers

Header nameDescriptionValueRequired
AuthorizationYou must provide an access token. Contact [email protected] for this token.Bearer <token>Required
Content-typeThe format of returned data.application/jsonRequired

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

ParameterDescriptionExampleTypeRequired
eventTypeThis is an object that includes the unique identifier for the appointment type.objectRequired
uuidThis is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See Appointment types for more details.1a2b3c4d5e6f7g8h9i0jstringRequired
messageTypeThe type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP
CONFIRMATIONstringRequired
textThe SMS message that is sent to the subscriber.This is a confirmation message for the event in {eventLocation}.stringRequired
uuidThis 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.
z0y9x8w7v6u5t4s3r2q1stringn/a
macrosDynamic 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.
eventLocationstringOptional

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.

ParameterDescriptionExampleTypeRequired
eventTypeThis is an object that includes the unique identifier for the appointment type.objectRequired
uuidThis is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See Appointment types for more details.1a2b3c4d5e6f7g8h9i0jstringRequired
messageTypeThe type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP
CONFIRMATIONstringRequired
textThe SMS message that is sent to the subscriber.This is a confirmation message for the event in {eventLocation}.stringRequired
uuidThis 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.
z0y9x8w7v6u5t4s3r2q1stringRequired
macrosDynamic 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.
eventLocationstringOptional

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.

ParameterDescriptionExampleTypeRequired
eventTypeThis is an object that includes the unique identifier for the appointment type.objectRequired
uuidThis is the unique identifier for the appointment type. This is automatically generated when you create an appointment type. See Appointment types for more details.1a2b3c4d5e6f7g8h9i0jstringRequired
messageTypeThe type of message for the appointment, which can be one the following:
  • CONFIRMATION
  • CANCELLATION
  • REMINDER
  • NO_SHOW
  • FOLLOW_UP
CONFIRMATIONstringn/a
textThe SMS message that is sent to the subscriber.This is a confirmation message for the event in {eventLocation}.stringn/a
uuidThis is the unique identifier for the appointment message.z0y9x8w7v6u5t4s3r2q1stringn/a
macrosDynamic values that can be sent along with a message.eventLocationstringn/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.

CodeDescriptionNotes
200OKRequest successful.
400Bad requestData is improperly formatted.
401Authorization errorAPI key is incorrect.
404Not FoundActivity ID was not found for cancel, no-show, or update.
500Internal Server ErrorThis status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.