Back to top

Messages API

Resource Group

Authentication

Login user
POST/access_tokens

Example URI

POST /access_tokens
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "email": "[email protected]",
  "password": "password"
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "access_token": "access_token"
}

Message

Get all messages
GET/messages

Example URI

GET /messages
Response  401
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer ABC123
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "content": "Message 1"
  }
]

Message

Show single message
GET/messages/{id}

Example URI

GET /messages/1
URI Parameters
HideShow
id
number (required) Example: 1

Id of a message.

Response  401
Request
HideShow
Headers
Content-Type: application/json;charset=utf-8
Authorization: Bearer ABC123
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "content": "Message 1"
}

Generated by aglio on 25 Jun 2018