# List Automated messages

Retrieves a list of automated appointment messages.

Endpoint: GET /v2/automated_messages
Version: 1.0.0
Security: apiKeyAuth, practiceGroupId

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `practiceGroupId` (unknown)
    apiKey in header x-practice-group-id

## Query parameters:

  - `page_index` (string)

  - `page_size` (string)

  - `orderBy` (string)

  - `order_descending` (string)

  - `recipient_id` (string)

  - `status` (any)

  - `notification_type` (any)

  - `notification_group` (any)
    Notification types by group: booking (appointment.confirmed, appointment.admin_video_confirmation), reschedule (appointment.rescheduled), cancellation (appointment.cancelled) and reminder (every appointment.minus*.reached). Lists a message in any of the groups or of the notification_type values.

  - `status_group` (any)
    Statuses by group: sent (SENT), delivered (SUCCESS) and failed (EXPIRED, ERROR, INVALIDATED). Lists a message in any of the groups or of the status values.

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.id` (string, required)

  - `data.recipient` (object)

  - `data.recipient.hero_id` (string)

  - `data.recipient.title` (string)
    Enum: "Baron", "Baroness", "Brigadier", "Count", "Colonel", "Countess", "Captain", "Dame", "The Dowager Viscountess", "Dr", "Duchess", "Duke", "Earl", "His Excellency", "Father", "H.E. Ambassador Mr", "H.E. Mr", "H.E. Mrs", "Her Grace", "His Grace", "The Hon", "The Hon Mr", "The Hon Mrs", "HRH", "HRH Prince", "HRH Princess", "Insurance", "HM King", "Lady", "Lord", "Major", "Master", "Miss", "Mr", "Mrs", "Ms", "Mss", "Mx", "Pr", "Professor", "HM Queen", "Rabbi", "Reverend", "Sheikh", "Sheikha", "Sir", "The", "", "Viscount", "Viscountess"

  - `data.recipient.first_name` (string)

  - `data.recipient.last_name` (string)

  - `data.channel` (string)
    Enum: "SMS", "EMAIL", "NHS_APP"

  - `data.contact_detail` (string)

  - `data.sent_at` (string)

  - `data.status` (string)
    Enum: "INVALIDATED", "QUEUED", "SENT", "ERROR", "SUCCESS", "EXPIRED", "CREATED", "SCHEDULED"

  - `data.message_type` (string)

  - `data.appointment_id` (string)

  - `data.appointment_type` (string)

  - `data.appointment_start_time` (string)

  - `data.notification_type` (string)
    Enum: "appointment.confirmed", "appointment.admin_video_confirmation", "appointment.admin_sent_confirmation", "appointment.rescheduled", "appointment.cancelled", "appointment.minus30minutes.reached", "appointment.minus24hours.reached", "appointment.minus48hours.reached", "appointment.minus72hours.reached", "appointment.minus7days.reached", "appointment.minus14days.reached", "appointment.minus21days.reached", "appointment.booking-failed", "appointment.reschedule-failed", "appointment.cancel-failed", "care_nav_submission.completed", "notification.errored", "notification.expired", "invoice.created", "admin.invited", "client_account.login_token_issued", "client_account.verification_code_issued", "patient_upload.completed", "practice_group.onboarded"

  - `count` (number, required)

## Response 400:

  - `400` (unknown)
    Validation error

## Response 400 fields (application/json):

  - `error` (boolean, required)
    Example: true

  - `statusCode` (number, required)
    Example: 400

  - `message` (array, required)

  - `message.code` (string, required)
    Example: invalid_type

  - `message.expected` (string, required)
    Example: string

  - `message.path` (array, required)
    Example: ["patient_id"]

  - `message.message` (string, required)
    Example: Required

## Response 401:

  - `401` (unknown)
    Unauthorised

## Response 404:

  - `404` (unknown)
    Not found

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 500:

  - `500` (unknown)
    Unknown error

