# Get interactions

Endpoint: GET /interactions
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Query parameters:

  - `limit` (integer)
    The maximum count of results to retrieve.

  - `startingAfter` (string)
    Return results starting after the provided object identifier.

  - `endingBefore` (string)
    Return results ending before the provided object identifier.

  - `offset` (integer)
    Offset from the start of results.

  - `hasNoPerson` (boolean)
    If `true`, include only unassociated interactions—those not associated with a borrower.
If `false`, include only interactions associated with a borrower.
If unset, include any interaction regardless of it being associated with a borrower or not.

  - `channel` (array)
    Exactly match the channel over which the interaction took place.

  - `direction` (string)
    Exactly match the direction the interaction—either `inbound` or `outbound`.

  - `status` (array)
    Exactly match the status of an interaction.

  - `statusDetails` (array)
    Exactly match the status details of an interaction.

  - `agentOutcome` (array)
    Exactly match the `agentOutcome` of an interaction.

  - `subject` (array)
    The interaction subject value(s) by which to filter. To match interactions
without a subject pass the string "null".

  - `theme` (array)

  - `caseIds` (array)
    Exactly matches one of several Peach case IDs (`CS-XXXX-XXXX`).

  - `contentContains` (string)
    Search for an exact match in the content of the interaction

  - `sortBy` (array)
    The data attributes by which to sort the results.

  - `createdAtBefore` (string)
    Filter only objects that were not created at or before the specified
timestamp. This timestamp is in UTC.

  - `createdAtAfter` (string)
    Filter only objects that were not created at or after the specified
timestamp. This timestamp is in UTC.

  - `startedAtBefore` (string)
    Filter only objects that were not started at or before the specified
timestamp. This timestamp is in UTC.

  - `startedAtAfter` (string)
    Filter only objects that were not started at or after the specified
timestamp. This timestamp is in UTC.

  - `scheduledAtFromBefore` (string)
    Include only interactions which have a `scheduledAtFrom` set to before (or equal to) this
timestamp. The timestamp must include a timezone (or UTC offset).

  - `scheduledAtFromAfter` (string)
    Include only interactions which have a `scheduledAtFrom` set to after (or equal to) this
timestamp. The timestamp must include a timezone (or UTC offset).

  - `scheduledAtToBefore` (string)
    Include only interactions which have a `scheduledAtTo` set to before (or equal to) this
timestamp. The timestamp must include a timezone (or UTC offset).

  - `scheduledAtToAfter` (string)
    Include only interactions which have a `scheduledAtTo` set to after (or equal to) this
timestamp. The timestamp must include a timezone (or UTC offset).

  - `createdBy` (string)
    The User ID or Employee ID of the user which created the interaction.

If `null` is specified then match all interactions with `createdBy` of `null`.

  - `hasVoicemail` (boolean)
    If `true`, include only interactions with voicemails—only valid for `channel=voice`case.
If `false`, include only interactions without voicemails.
If unset, then include any interaction regardless of it having voicemail or not.

Note that a voicemail is different from a call recording. A voicemail is an audio message
left by a caller when no pickup by the company was possible. e.g., the call was made while the office was
closed or while there were no agents available to answer the call.

  - `hasRecording` (boolean)
    If `true` match only interactions with call recordings—only valid for `channel=voice`.
If `false` match only interactions without call recordings.
If unset, match any interaction regardless of it have a recording or not.

Note that a call recording is when an agent chooses to record a call, which is
different from a voicemail.

  - `include` (array)
    A list of additional interaction relationships to include in the response object. 

- When `include=borrower` the `borrower` field will be populated (otherwise it will be `null`). This
  is data describing the borrower associated with this interaction.
- When `include=contact` the `contact`` field will be populated (otherwise it will be `null`). This is
  contact data for the contact this interaction was sent to or from.
- When `include=lastTaskMeta` the `lastTaskMeta` field will be populated (otherwise it will be `null`).
  This is meta data about the most recently ended task associated with this interaction.

You can include multiple fields by passing multiple values, e.g., `include=borrower,contact`.

  - `sensitive` (boolean)
    If `true`, include only interactions with the `sensitive` property set to `true`.
If `false`, include only interactions with the `sensitive` property set to `false`.
If unset, include any interaction regardless of `sensitive` property.

  - `isExternal` (boolean)
    If `true`, include only interactions with the `isExternal` property set to `true`.
If `false`, include only interactions with the `isExternal` property set to `false`.
If unset, include any interaction regardless of `isExternal` property.

## Response 200 fields (application/json):

  - `count` (integer)
    Number of items returned by the current request.

  - `nextUrl` (string)
    URL of the next set of results.

  - `previousUrl` (string)
    URL of the previous set of results.

  - `status` (integer)
    HTTP status code.

  - `total` (integer)
    Total number of items in this result.

  - `data` (array)

  - `data.channel` (string)
    The channel by which an interaction occurs.
    Enum: "fax", "gui", "document"

  - `data.content` (object)
    The content and attributes of the message sent. Normally in JSON format.

  - `data.channel` (string)
    The channel by which an interaction occurs—always `voice` for `VoiceInteraction`
    Enum: "voice"

  - `data.content` (object)

  - `data.content.from` (string)
    An E.164 formatted phone number—a phone number prefixed with a `+` and
a country code. (Note that in the United States this is `+1`)
    Example: +12024561111

  - `data.holdDuration` (number)
    The amount of time the inbound caller was on hold before
speaking to an agent, in seconds. `null` if the caller wasn't on
hold.

  - `data.inboundCallAcceptedBy` (object)

  - `data.inboundCallAcceptedBy.descriptor` (string)
    Short description of the user who performed the action.
Different systems may have different data available for a given user. The descriptor
gives the best available short description of the user. It prefers names, then email addresses,
then related IDs.
e.g.,
- "Borrower Tim Jones"
- "Borrower BO-ABCD-1234"
- "Peach Service User"
- "Agent Abigail Smith"
- "Agent bob@acme.com"
- "Agent EM-ABCD-1234"
    Example: Agent bob@acme.com

  - `data.inboundCallAcceptedBy.employee` (object)

  - `data.inboundCallAcceptedBy.employee.id` (string)
    The employee's ID

  - `data.inboundCallAcceptedBy.id` (string)
    The unique identifier of the user who performed the action.

  - `data.inboundCallAcceptedBy.name` (string)
    The name of the user who performed the action.

  - `data.inboundCallAcceptedBy.userType` (string)
    The type of the user.
    Enum: "agent", "borrower", "service"

  - `data.isAutodialed` (boolean)
    `true` if an autodialed call. If no value is passed, we'll assume
isAutodialed=`false`—meaning a manual call was performed.
For more information on why this is important reference the
Telephone Consumer Protection Act (TCPA).

  - `data.recordingConsentGiven` (boolean)
    `true` if the borrower has given consent to record the call.

  - `data.recordingDuration` (integer)
    The duration of the recording of this voice call in seconds, or `null` if there
is no recording.

  - `data.recordingStartedAt` (string)
    The date-time at which the recording of this voice call started, or `null`
if there is no recording.

  - `data.twilioConferenceFriendlyName` (string)
    The Twilio conference friendly name for this voice interaction.

  - `data.twilioConferenceSid` (string)
    The Twilio conference SID for this voice interaction.

  - `data.voicemailDuration` (integer)
    The duration of the voicemail of this voice call in seconds, or `null` if there
is no voicemail.

  - `data.voicemailStartedAt` (string)
    The date-time at which the voicemail left for this call started, or `null`
if there is no voicemail.

  - `data.channel` (string)
    The channel by which an interaction occurs—always `email` for `EmailInteraction`.
    Enum: "email"

  - `data.emailInReplyTo` (string)
    The contents of the `In-Reply-To` header, the unique [RFC5322
email message
ID](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4)
associated with the email being replied to. `null` if the header
wasn't present in the email.

  - `data.emailMessageId` (string)
    The contents of the `Message-ID` header, the unique [RFC5322
email message
ID](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4)
associated with this email. `null` if the header wasn't present
in the email.

  - `data.emailReferences` (string)
    The contents of the `References` header, a structured string of
[RFC5322 email message
IDs](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4) that
identify the messages making up the email thread. `null` if the
header wasn't present in the email.

  - `data.channel` (string)
    The channel by which an interaction occurs—always `text` for `TextInteraction``.
    Enum: "text"

  - `data.twilioConvoSid` (string)
    The Twilio conversation SID associated with this interaction. (Only valid for interactions with a channel of text or chat)

  - `data.channel` (string)
    The channel by which an interaction occurs—always `chat` for `ChatInteraction`
    Enum: "chat"

  - `data.channel` (string)
    The channel by which an interaction occurs—always `mail` for `MailInteraction`
    Enum: "mail"

  - `data.mailIsCertified` (boolean)
    Whether or not this mail interaction is sent as [USPS Certified
Mail](https://faq.usps.com/s/article/Certified-Mail-The-Basics). Certified
mail provides proof of mailing and has more granular tracking
events, but incurs additional cost. Please refer to your order
form for more pricing information.
NOTE: Sending as certified mail is currently only supported for
the following subjects:
- `loanRightToCurePersonalUnsecured`
- `loanRightToCurePersonalUnsecuredColorado`
- `loanRightToCurePersonalUnsecuredDC`
- `loanRightToCurePersonalUnsecuredIowa`
- `loanRightToCurePersonalUnsecuredKansas`
- `loanRightToCurePersonalUnsecuredMaine`
- `loanRightToCurePersonalUnsecuredMissouri`
- `loanRightToCurePersonalUnsecuredSouthCarolina`
- `loanRightToCurePersonalUnsecuredWestVirginia`
- `loanRightToCurePersonalUnsecuredWisconsin`

  - `data.mailNumberOfPages` (integer)

