Inbox Conversations

  1. List Conversations
  2. Get a single Conversation
  3. Create a new Conversation
  4. Update a Conversation
  5. Add Bookings to a Conversation
  6. Remove Bookings from a Conversation

Parameters

Name Type Read/Write Description
id Integer Read Conversation’s id.
default_channel String Read Conversation’s default channel.
subject String Read Conversation’s subject.
created_at Time Read Conversation’s create time.
updated_at Time Read Conversation’s update time.
closed_at Time Read Time when Converstation was closed at.
deadline_response_at Time Read Conversation’s deadline response time.
last_message_at Time Read Conversation’s last message time.
marked_as_spam_at Time Read Time when Conversation was marked as spam.
Name Type Read/Write Description
id Integer Read Conversation’s id.
default_channel String Read/Write Conversation’s default channel.
subject String Read/Write Conversation’s subject.
closed Boolean Write Conversation’s subject.
source_id Integer Write Conversation’s subject.
assignee_id Integer Write Conversation’s subject.
created_at Time Read Conversation’s create time.
updated_at Time Read Conversation’s update time.
closed_at Time Read Time when Converstation was closed at.
deadline_response_at Time Read/Write Conversation’s deadline response time.
last_message_at Time Read Conversation’s last message time.
marked_as_spam_at Time Read/Write Time when Conversation was marked as spam.

List Conversations

GET /inbox/conversations

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": null,
      "subject": "Here goes subject of conversation.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-11-22T12:19:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [

        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}

Get a single Conversation

Returns a single conversation identified by ID.

GET /inbox/conversations/:conversation_id

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": null,
      "subject": "Here goes subject of conversation.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-11-22T12:19:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [

        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}

Create a new Conversation

Creates a Conversation.

POST /inbox/conversations

Example JSON request

{
  "conversations": [
    {
      "default_channel": "channelname",
      "subject": "Subject.",
      "last_message_at": "2018-12-20T14:25:57Z"
    }
  ]
}

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": "channelname",
      "subject": "Subject.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-12-20T14:25:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [

        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}

Update a Conversation

Returns an updated conversation identified by ID.

PUT /inbox/conversations/:conversation_id

Restrictions on updatable parameters

Only :assignee_id, :closed, :default_channel, :marked_as_spam attributes are allowed.

Example JSON request

{
  "conversations": [
    {
      "default_channel": "channelname"
    }
  ]
}

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": "channelname",
      "subject": "Subject.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-12-20T14:25:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [

        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}

Add Bookings to a Conversation

Returns an updated conversation identified by ID.

PUT /inbox/conversations/:conversation_id/connect_booking

Example JSON request

{
  "bookings": [
    {
      "id": 15
    }
  ]
}

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": "channelname",
      "subject": "Subject.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-12-20T14:25:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [
          15
        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}

Remove Bookings from a Conversation

Returns an updated conversation identified by ID.

PUT /inbox/conversations/:conversation_id/disconnect_booking

Example JSON request

{
  "bookings": [
    {
      "id": 15
    }
  ]
}

Response

{
  "links": {
    "conversations.account": "https://www.bookingsync.com/api/v3/accounts/{conversations.account}",
    "conversations.assignee": "https://www.bookingsync.com/api/v3/hosts/{conversations.assignee}",
    "conversations.bookings": "https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}",
    "conversations.inquiries": "https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}",
    "conversations.source": "https://www.bookingsync.com/api/v3/sources/{conversations.source}"
  },
  "conversations": [
    {
      "id": 5,
      "default_channel": "channelname",
      "subject": "Subject.",
      "created_at": "2018-12-20T14:25:57Z",
      "updated_at": "2018-12-20T14:25:57Z",
      "closed_at": null,
      "deadline_response_at": null,
      "last_message_at": "2018-12-20T14:25:57Z",
      "marked_as_spam_at": null,
      "links": {
        "account": 1,
        "assignee": null,
        "bookings": [

        ],
        "inquiries": [

        ],
        "source": null
      }
    }
  ],
  "meta": {
  }
}