v1

latestOpenAPI 3.0.02026-07-2447166133.5 KB
Conversations

Update a conversation

This operation updates a specific conversation by id.

Fields provided in the input object will be updated, omitted fields (null) will be unchanged.

patch/conversations/{conversationId}

Path parameters

conversationIdstring required

The id of the conversation to update

Headers

s-idempotency-keystring

A unique value generated by the client used to recognize subsequent retries of the same request. Idempotency keys can be up to 255 characters long.

Request body

archivedboolean

Whether the conversation should be archived (true) or unarchived (false)

assignToMemberIdstring

The id of a team or teammate to assign the conversation to. If the specified teammate or team is not a member of the conversation, they will be added as a member.

tagIdsConversationTagId[]

An array of Spruce conversation tag ids

Example request

{
  "assignToMemberId": "entity_0D4QABCC06000",
  "tagIds": [
    "tag_0E5QDGJC03000"
  ]
}

Response

ok response

apiURLstring url required

An absolute URL for fetching this conversation from the API

appURLstring url required

An absolute URL to view the conversation in the Spruce app

archivedboolean required

Whether or not the conversation is archived

assignedToMemberIdstring

The id of the teammate the conversation is assigned to

associatedContactIdsstring[]

The ids of the contacts associated with the conversation. This may include contacts that are not a part of the conversation. For example, the conversation may be with parents, but associated with a contact representing their child.

createdAtstring date-time required

The date the conversation was created

idstring required

Spruce's conversation ID

internalMemberIdsstring[]

The ids of the teammates, teams and/or your organization that are members of the conversation.

isReadOnlyboolean required

If the conversation is read-only, messages cannot be sent to it.

lastMessageAtstring date-time

The time of the conversations latest message

objectstring required

String representing the object's type

subtitlestring

The subtitle of the conversation

titlestring required

The title of the conversation

type'email' | 'phone' | 'secure' | 'fax' | 'team' | 'note' | 'other' required

The type of the conversation (e.g. 'email', 'phone', 'secure', etc.). Note that SMS will be in a 'phone' conversation, and video calls will be in a 'secure' conversation. More conversation types may be added in the future, so ensure while parsing this that you gracefully handle any new/unexpected values.

Example response

{
  "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"
}