Back to top

RESTful API of Notifications Bounded Context

Headers

As this API is working with JSON every request must add the following headers:

Accept: application/json

And for requests with body:

Content-Type: application/json

Aircall

The aircall documentation about all webhooks available are in here.

Aircall webhoook

Create aircall event in RabbitMQ
POST/aircall/webhoook

Example URI

POST https://notifications.spotahome.com/aircall/webhoook
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "event": "aircall.ended",
  "timestamp": 1681826116,
  "data": {}
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "event": {
      "type": "string"
    },
    "timestamp": {
      "type": "number"
    },
    "data": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "event",
    "timestamp",
    "data"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Twilio webhook

Create twilio event in RabbitMQ
POST/twilio/webhook

Example URI

POST https://notifications.spotahome.com/twilio/webhook
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "from": "+34666666666",
  "to": "+34666666666",
  "message": "Hello world!",
  "secret": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "secret": {
      "type": "string"
    }
  },
  "required": [
    "from",
    "to",
    "message",
    "secret"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Sendbird webhook

The sendbird documentation about all webhooks available are in here.

Create sendbird event in RabbitMQ
POST/sendbird/webhook

Example URI

POST https://notifications.spotahome.com/sendbird/webhook
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "category": "open_channel:create",
  "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "category": {
      "type": "string"
    },
    "app_id": {
      "type": "string"
    }
  },
  "required": [
    "category",
    "app_id"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Zoho webhook

Create zoho event in RabbitMQ
POST/zoho/webhook

Example URI

POST https://notifications.spotahome.com/zoho/webhook
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "Hello, world!",
  "ticketId": "Hello, world!",
  "commenterId": "Hello, world!",
  "content": "Hello, world!",
  "contentType": "Hello, world!",
  "isPublic": true,
  "attachments": [],
  "modifiedTime": "Hello, world!",
  "commentedTime": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "ticketId": {
      "type": "string"
    },
    "commenterId": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "contentType": {
      "type": "string"
    },
    "isPublic": {
      "type": "boolean"
    },
    "attachments": {},
    "modifiedTime": {
      "type": "string"
    },
    "commentedTime": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "ticketId",
    "commenterId",
    "content",
    "contentType",
    "isPublic",
    "attachments",
    "modifiedTime",
    "commentedTime"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Zoho tickets

Create Zoho ticket
POST/api/zoho/tickets

Example URI

POST https://notifications.spotahome.com/api/zoho/tickets
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "templateName": "booking_follow_up",
  "userId": "1d9cae68-d0e3-4d97-b1aa-3bec45099e7f"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "templateName": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    }
  },
  "required": [
    "templateName",
    "userId"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

User contact tickets

Get latest tickets of a user
GET/users/me/contacts

Example URI

GET https://notifications.spotahome.com/users/me/contacts
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "1d9cae68-d0e3-4d97-b1aa-3bec45099e7f",
  "subject": "Booking follow up",
  "status": "Open"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "status": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "subject",
    "status"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Generated by aglio on 25 Nov 2025