API
Login Sign Up

Messages

Listing all messages

GET https://api.groovehq.com/v1/tickets/:ticket_number/messages

Parameters

Name Type Required Default Notes
page integer No 1 The page number
per_page integer No 25 The number of messages to return per page (max 50)

Example Response

Status: 200 OK

{
  "messages": [{
    "created_at": "2012-07-17T13:41:01Z",
    "updated_at": "2012-07-17T13:41:01Z",
    "note": false,
    "body": "The comment<br />body",
    "plain_text_body": "The comment\nbody",
    "href": "https://api.groovehq.com/v1/messages/5",
    "links": {
      "attachments": {
        "href": "https://api.groovehq.com/v1/attachments?message=764578238"
      },
      "author": {
        "href": "https://api.groovehq.com/v1/customers/customer@somewhere.com"
      },
      "recipient": {
        "href": "https://api.groovehq.com/v1/agents/matt@groovehq.com"
      },
      "ticket": {
        "href": "https://api.groovehq.com/v1/tickets/1"
      }
    }
  }],
  "meta": {
    "pagination": {
      "current_page": 1,
      "total_pages": 23,
      "total_count": 23,
      "next_page": "http://api.groovehq.dev/v1/tickets/1/messages?page=2"
    }
  }
}

Finding one message

GET https://api.groovehq.com/v1/messages/:id

Example Response

Status: 200 OK

{
  "message": {
    "created_at": "2012-07-17T13:41:01Z",
    "updated_at": "2012-07-17T13:41:01Z",
    "note": false,
    "body": "The comment<br />body",
    "plain_text_body": "The comment\nbody",
    "links": {
      "author": {
        "href": "https://api.groovehq.com/v1/customers/customer@somewhere.com"
      },
      "recipient": {
        "href": "https://api.groovehq.com/v1/agents/matt@groovehq.com"
      },
      "ticket": {
        "href": "https://api.groovehq.com/v1/tickets/1"
      }
    }
  }
}

Creating a new message

POST https://api.groovehq.com/v1/tickets/:ticket_number/messages

Name Type Required Default Notes
body string Yes The message body
author string No The email of the agent or customer the ticket belongs to
sent_at datetime No Can be used to set the created and updated datetimes to sometime in the past. RFC-822 format preferred
note boolean No false Is the message a private note?
send_copy_to_customer boolean No false Whether to send a copy of the message to the customer
skip_unread_ticket boolean No false Prevent message's ticket state from updating to unread
skip_notifications boolean No false Skip all agent notifications

Example Response

Status: 201 Created
Location: https://api.groovehq.com/v1/messages/1

{
  "message": {
    "href": "https://api.groovehq.com/v1/messages/1",
    "links": {
      "author": {
        "href": "https://api.groovehq.com/v1/customers/customer@somewhere.com"
      },
      "ticket": {
        "href": "https://api.groovehq.com/v1/tickets/1"
      }
    }
  }
}