Introduction
Welcome to the Blyng Client API! You can use our API to access Blyng API endpoints, which can get information about your users, your conversations, and allows you to provide information about your products and properties to Blyng's natural language engine.
You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right (soon available).
Environment
The {{environment}} section of the url is either api, for production environment or api-uat for UAT environment.
Authentication
POST /api/v1/token
Example:
POST https://{{environment}}.blyng.io/api/v1/token
POST Body.
{
"accountId": "account1",
"secret": "secret1234",
"refresh_token": "7cb15d5bcaac778352a8f1f3360d23f02f34ec182e259897fd6ce485d76234"
}
Response Body
{
"access_token": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"refresh_token": "6cf615d5bcaac778352a8f1f3360d23f02f34ec182e259897fd6ce485d7870d4",
"token_type": "bearer",
"expires": "3600"
}
Token-based OAuth 2.0 authorization.
HTTP Request
POST /api/v1/token

more details about OAuth 2.0 tokens
Upon successful authorization access_token is to be included in the Authorization header:
Authorization: Bearer mF_9.B5f-4.1JqM
Query Parameters
| Parameter | Required | Description | Data type |
|---|---|---|---|
| account_id | Optional | either account id & secret is provided or a refresh token | string |
| secret | Optional | either account id & secret is provided or a refresh token | string |
| refresh_token | Optional | either account id & secret is provided or a refresh token | string |
Accounts
Get Users
Returns the list of users for the account.
GET /api/v1/accounts/:id/users
Example:
GET https://{{environment}}.blyng.io/api/v1/accounts/1234/users
Example Response Body:
[
{
"firstName": "Alex",
"lastName": "Ries",
"image": "/assets/imgs/users/unknown-user.jpg",
"id": "5e7c93a65b598e0017d738dd",
"accountId": "5e7a624763b907e94c2fb0c5",
"createdAt": "2020-03-26T11:36:06.141Z",
"updatedAt": "2020-03-26T11:36:06.141Z"
},
{
"firstName": "John",
"lastName": "Doe",
"image": "/assets/imgs/users/unknown-user.jpg",
"id": "5e7d0f7d2e130a0017b9a2ae",
"accountId": "5e7a624763b907e94c2fb0c5",
"createdAt": "2020-03-26T20:24:29.625Z",
"updatedAt": "2020-03-26T20:24:29.626Z"
}
]
HTTP Request
GET /api/v1/accounts/:id/users
Query Parameters
| Parameter | Default | Description | Data type |
|---|---|---|---|
| id | N/A | user id | string |
Conversations
Get all conversations
GET /api/v1/conversations
Example:
GET https://{{environment}}.blyng.io/api/v1/conversations?account_id=1234&from=123456&to=123456
Response body.
[
{
"summary": {
"agency_ref": "34280_Y51880_3",
"firstname": "Anna",
"lastname": "Smith",
"lead_type": "qualified",
"tenants": 2,
"moveDate": "flexible",
"budget": "between 1500 - 1700",
"viewing_slot": "Tuesday PM",
"time_to_contact": "Evening (5 to 7pm)",
"comment": "is viewing at any lunchtime possible?",
"employment": "full-time",
"mobile": "447752111222",
"email": "someone@somewhere.com"
},
"transcript": [
{
"sender": "Visitor:",
"text": "Get Started",
"timestamp": "1548412730661"
},
{
"sender": "Blyng:",
"text": "👋 Hi , we are Romans. Let's find your dream home 🏡",
"timestamp": "1548412733470"
}
]
}
]
Fetch information about conversations.
HTTP Request
GET /api/v1/conversations
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| account_id | N/A | account id |
| from | N/A | from time in Unix timestamp format |
| to | N/A | to time in Unix timestamp format |
Properties
Get property
GET /api/v1/properties/:id
Example:
GET https://{{environment}}.blyng.io/api/v1/properties/1234
{
"createDate" : 1578301208917,
"property" : {
"address" : "Meadow Close, Raynes Park, London, SW20",
"agentRef" : "1118868",
"autoEmailReasonType" : "new",
"bedrooms" : 4,
"branch" : {
"address" : "55 Wimbledon Hill Road,\r\nLondon,\r\nSW19 7QW",
"branchLogo" : "https://media.rightmove.co.uk/company/clogo_rmchoice_5187_0012.jpeg",
"brandName" : "Foxtons",
"brandPlusLettings" : false,
"brandPlusResale" : false,
"development" : false,
"hideReducedPropsFlag" : false,
"identifier" : 15975,
"largeBranchLogo" : "https://media.rightmove.co.uk/company/clogo_5187_0008.jpeg",
"name" : "Wimbledon",
"updateDate" : 1562059381000
},
"commercial" : false,
"development" : false,
"displayPrices" : [ {
"displayPrice" : "£900,000",
"displayPriceQualifier" : ""
} ],
"epcs" : [ {
"caption" : "EER",
"identifier" : 2011774717,
"order" : 2,
"type" : "EPC",
"url" : "https://media.rightmove.co.uk/hips/epcs/16k/15975/75457393/15975_1118868_EPC_01_0000.gif"
}, {
"caption" : "EIR",
"identifier" : 2011774720,
"order" : 3,
"type" : "EPC",
"url" : "https://media.rightmove.co.uk/hips/epcs/16k/15975/75457393/15975_1118868_EPC_02_0000.gif"
} ],
"exactLocationAvailable" : true,
"features" : [ {
"featureDescription" : "Excellent 4 double bedroom semi-detached house",
"identifier" : 379890217,
"sequence" : 1
}, {
"featureDescription" : "Wonderful large reception room",
"identifier" : 379890220,
"sequence" : 2
}, {
"featureDescription" : "Eat in fully fitted kitchen",
"identifier" : 379890223,
"sequence" : 3
}, {
"featureDescription" : "Substantial master bedroom with en-suite bathroom",
"identifier" : 379890226,
"sequence" : 4
}, {
"featureDescription" : "Large Private Garden",
"identifier" : 379890229,
"sequence" : 5
}, {
"featureDescription" : "Off street parking",
"identifier" : 379890232,
"sequence" : 6
}, {
"featureDescription" : "Peaceful location",
"identifier" : 379890235,
"sequence" : 7
} ],
"floorplanCount" : 1,
"floorplans" : [ {
"caption" : "Floorplan area for info only, not for £sq/ft val",
"identifier" : 2011774744,
"order" : 2,
"type" : "Master Floorplan Image",
"url" : "https://media.rightmove.co.uk/16k/15975/75457393/15975_1118868_FLP_01_0000.png"
} ],
"fullDescription" : "Located within a quiet cul de sac, moments from Cannon Hill Common, this 4 bedroom house is wonderfully arranged over 3 floors and benefits from superb open plan interiors, off street parking and a large garden.<br /><br />Meadow Close is within easy reach of the shops and amenities of Raynes Park. The nearest underground station is Morden (Northern Line) and Raynes Park Station (British Rail) is close by.",
"googleAnalyticsLabel" : "semidetached 4 beds",
"identifier" : 75457393,
"latitude" : 51.39948,
"longitude" : -0.227692,
"marketInfoUrl" : "https://www.rightmove.co.uk/property-for-sale/market-information/property-75457393.html",
"mobilePropertyMapViewUrl" : "https://www.rightmove.co.uk/apps/property-mapview.html?propertyId=75457393",
"mobileStreetViewUrl" : "https://www.rightmove.co.uk/apps/streetview.html?propertyId=75457393",
"mobileVirtualToursNum" : 0,
"mobileVirtualToursUrl" : "https://www.rightmove.co.uk/property-for-sale/mobile-virtualtour/property-75457393.html",
"outcode" : "SW20",
"photoCount" : 10,
"photoLargeThumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_02_0000_max_656x437.jpg",
"photoThumbnailUrl" : "https://media.rightmove.co.uk/16k/15975/75457393/15975_1118868_IMG_02_0000.jpg",
"photos" : [ {
"identifier" : 2011774687,
"order" : 2,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_02_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_02_0000_max_620x414.jpg"
}, {
"identifier" : 2011774690,
"order" : 3,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_01_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_01_0000_max_620x414.jpg"
}, {
"identifier" : 2011774678,
"order" : 4,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_03_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_03_0000_max_620x414.jpg"
}, {
"identifier" : 2011774672,
"order" : 5,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_04_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_04_0000_max_620x414.jpg"
}, {
"identifier" : 2011774699,
"order" : 6,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_05_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_05_0000_max_620x414.jpg"
}, {
"identifier" : 2011774702,
"order" : 7,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_06_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_06_0000_max_620x414.jpg"
}, {
"identifier" : 2011774714,
"order" : 8,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_07_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_07_0000_max_620x414.jpg"
}, {
"identifier" : 2011774708,
"order" : 9,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_08_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_08_0000_max_620x414.jpg"
}, {
"identifier" : 2011774732,
"order" : 10,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_09_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_09_0000_max_620x414.jpg"
}, {
"identifier" : 2011774726,
"order" : 11,
"thumbnailUrl" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_10_0000_max_200x138.jpg",
"type" : "Master Photo Image",
"url" : "https://media.rightmove.co.uk/dir/16k/15975/75457393/15975_1118868_IMG_10_0000_max_620x414.jpg"
} ],
"premiumDisplay" : false,
"price" : 900000,
"priceQualifier" : "",
"propertyContentHidden" : false,
"propertyType" : "semi-detached house",
"publicsiteUrl" : "https://www.rightmove.co.uk/property-for-sale/property-75457393.html",
"saved" : false,
"schoolCheckerUrl" : "https://www.rightmove.co.uk/property-for-sale/nearby-schools/property-75457393.html",
"shouldShowPrice" : true,
"showMap" : true,
"showStreetView" : true,
"soldPricesUrl" : "https://www.rightmove.co.uk/house-prices/detail.html?locationIdentifier=POSTCODE%5E840057&referrer=propertyDetails&referrerPropertyId=75457393",
"sortDate" : 1573498919000,
"stations" : [ {
"distance" : 0.6,
"station" : "Motspur Park",
"type" : "1"
}, {
"distance" : 0.7,
"station" : "Raynes Park",
"type" : "1"
}, {
"distance" : 0.9,
"station" : "Wimbledon Chase",
"type" : "1"
} ],
"summary" : "Located within a quiet cul de sac, moments from Cannon Hill Common, this 4 bedroom house is wonderfully arranged over 3 floors and benefits from superb open plan interiors, off street parking and a large garden.",
"telephoneNumber" : "020 8012 6808",
"tenureType" : "Freehold",
"transactionTypeId" : 1,
"updateDate" : 1577444538000,
"visible" : true,
"zoomLevel" : 13
},
"property_type" : "sale",
"result" : "SUCCESS",
"timestamps" : "2020-01-06T09:00:00.519Z"
},
"property_type" : "sale",
"timestamps" : {
"date_creation" : "2020-01-06T09:00:00.519Z",
"date_update" : "2020-01-06T09:00:00.519Z",
"timestamp_creation" : 1578301218897,
"timestamp_update" : 1578301218897
}
}
Fetch information about properties.
HTTP Request
GET /api/v1/properties/:id
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| id | N/A | property id |
Users
Get conversations
GET /api/v1/users/:id/conversations
Example:
GET https://{{environment}}.blyng.io/api/v1/users/5e7a624763b907e94c2fb/conversations
Response Body
"[<Array of conversation for the user>]"
Example Response Body:
[
{
"summary": {
"agency_ref": "34280_Y51880_3",
"lead_type": "qualified",
"firstname": "Anna",
"lastname": "Smith",
"tenants": 2,
"moveDate": "flexible",
"budget": "between 1500 - 1700",
"viewing_slot": "Tuesday PM",
"time_to_contact": "Evening (5 to 7pm)",
"comment": "is viewing at any lunchtime possible?",
"employment": "full-time",
"mobile": "447752111222",
"email": "someone@somewhere.com"
},
"transcript": [
{
"sender": "Visitor:",
"text": "Get Started",
"timestamp": "1548412730661"
},
{
"sender": "Blyng:",
"text": "👋 Hi , we are Romans. Let's find your dream home 🏡",
"timestamp": "1548412733470"
}
]
}
]
HTTP Request
GET /api/v1/users/:id/conversations
Query Parameters
| Parameter | Default | Description | Data type |
|---|---|---|---|
| id | N/A | user id | string |
Errors
The Blyng API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The requested data is hidden for administrators only. |
| 404 | Not Found -- The specified data could not be found. |
| 405 | Method Not Allowed -- You tried to access data with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 410 | Gone -- The data requested has been removed from our servers. |
| 429 | Too Many Requests -- Request rate too high! Timers reset every 15 minutes! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |