API Documentation
SSO ¶
A brokerage may decide to provide access to many other different applications for it’s users and agents and allow a single sign on onto their platforms, making Rechat a hub to all applications agents need.
Each application a brokerage provides to it’s users is called a “SSO Application” that can be managed using the following.
In order to launch an app, all clients have to do is to open up a new browser to sso_application.open_url.
Create an app ¶
Create an appPOST/brands/:brand/sso_applications
The most important thing here is the authentication_type. SAML would be enabled for third party apps with SSO functionality. None for applications that can just be opened as a link and no sso is possible into them.
Example URI
POST /brands/:brand/sso_applications
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341
Request
Body
{
"name": "Test SSO Application",
"authentication_type": "SAML",
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name_id": "null",
"name_id_format": null,
"mappings": null,
"brands": [
"801c1128-7419-422b-840b-879065ee3341"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD%2BDSlTls%3D"
}
}Update an app ¶
Update an appPUT/brands/:brand/sso_applications
Example URI
PUT /brands/:brand/sso_applications
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341- id
string(required) Example: 3a0af57d-e318-4268-8d53-fddd40608bb5
Request
Body
{
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD%2BDSlTls%3D",
"brands": [
"801c1128-7419-422b-840b-879065ee3341"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD%2Fj6lTls%3D"
}
}Set Brands that are allowed to use this app ¶
Set Brands that are allowed to use this appPUT/brands/:brand/sso_applications/:id/brands
Example URI
PUT /brands/:brand/sso_applications/:id/brands
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341- id
string(required) Example: 3a0af57d-e318-4268-8d53-fddd40608bb5- associations
string(required) Example: sso_application.brands
Request
Body
{
"brands": [
"801c1128-7419-422b-840b-879065ee3341",
"524e7719-1334-4f44-8c1a-8cf8bf865c7d"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"brands": [
{
"id": "524e7719-1334-4f44-8c1a-8cf8bf865c7d",
"created_at": 1770151231.075315,
"updated_at": 1770151231.075315,
"palette": null,
"assets": null,
"messages": null,
"parent": {
"id": "801c1128-7419-422b-840b-879065ee3341",
"created_at": 1770151230.901015,
"updated_at": 1770151230.901015,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Office",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
},
"name": "Child Brand",
"deleted_at": null,
"training": false,
"brand_type": "Team",
"parents": [
"801c1128-7419-422b-840b-879065ee3341"
],
"type": "brand",
"hostnames": null,
"member_count": 0,
"base_url": "https://irish.rechat.com"
},
{
"id": "801c1128-7419-422b-840b-879065ee3341",
"created_at": 1770151230.901015,
"updated_at": 1770151230.901015,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Office",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
}
],
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD8jSlTls%3D"
}
}Set Icon ¶
Set IconPUT/brands/:brand/sso_applications/:id/icon
Example URI
PUT /brands/:brand/sso_applications/:id/icon
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341- id
string(required) Example: 3a0af57d-e318-4268-8d53-fddd40608bb5- associations
string(required) Example: sso_application.brands
Request
Body
{
"brands": [
"801c1128-7419-422b-840b-879065ee3341",
"524e7719-1334-4f44-8c1a-8cf8bf865c7d"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"brands": [
{
"id": "524e7719-1334-4f44-8c1a-8cf8bf865c7d",
"created_at": 1770151231.075315,
"updated_at": 1770151231.075315,
"palette": null,
"assets": null,
"messages": null,
"parent": {
"id": "801c1128-7419-422b-840b-879065ee3341",
"created_at": 1770151230.901015,
"updated_at": 1770151230.901015,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Office",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
},
"name": "Child Brand",
"deleted_at": null,
"training": false,
"brand_type": "Team",
"parents": [
"801c1128-7419-422b-840b-879065ee3341"
],
"type": "brand",
"hostnames": null,
"member_count": 0,
"base_url": "https://irish.rechat.com"
},
{
"id": "801c1128-7419-422b-840b-879065ee3341",
"created_at": 1770151230.901015,
"updated_at": 1770151230.901015,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Office",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
}
],
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD8jSlTls%3D"
}
}Get all available applications ¶
Get all available applicationsGET/brands/:brand/sso_applications
Example URI
GET /brands/:brand/sso_applications
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341
Response
200Body
{
"code": "OK",
"data": [
{
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcC%2FTalTls%3D"
}
],
"info": {
"count": 1,
"total": 0
}
}Delete an app ¶
Delete an appDELETE/brands/:brand/sso_applications/:id
Example URI
DELETE /brands/:brand/sso_applications/:id
URI Parameters
- brand
string(required) Example: 801c1128-7419-422b-840b-879065ee3341- id
string(required) Example: 3a0af57d-e318-4268-8d53-fddd40608bb5
Request
Body
{
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD%2BDSlTls%3D",
"brands": [
"801c1128-7419-422b-840b-879065ee3341"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "3a0af57d-e318-4268-8d53-fddd40608bb5",
"created_at": 1770151232.023754,
"updated_at": 1770151232.023757,
"deleted_at": null,
"authentication_type": "SAML",
"url": null,
"acs_url": "https://samltest.id/saml/sp",
"entity_id": "https://samltest.id/saml/sp",
"start_url": null,
"signed": null,
"name": "Updated Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 0,
"issuer": "7b1e7664-fc7b-4c65-a020-50f17299dd9d",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1id%2BKEjAlXKhr07PLdRmLWzEIY4QEZXTEDycqG4CUubRKmC8QB2in0EyAaaVVmpJJS%2FtG4hD50hbCSqYbdJEHjhTouEkoLAgiysS12SRkfg1ifaQQIOedXGOCTXNO1lUnRqR%2FfRGnRG3HrMw3rS%2B%2FFO1zLDUaBDGXE%2F2%2FrpD2OKUVzCTq1DCTxD8NCiVO4AbaymRx4Nk8%2BTwnteB0EEcD%2Fj6lTls%3D"
}
}