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: db03049b-8162-4693-81d4-0e225b7624c8
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": [
"db03049b-8162-4693-81d4-0e225b7624c8"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteBzG0cE%2FjWlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
}
}Update an app ¶
Update an appPUT/brands/:brand/sso_applications/:id
Example URI
PUT /brands/:brand/sso_applications/:id
URI Parameters
- brand
string(required) Example: db03049b-8162-4693-81d4-0e225b7624c8- id
string(required) Example: 28953973-42cc-4768-bb77-9e8068dfef47
Request
Body
{
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteBzG0cE%2FjWlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml",
"brands": [
"db03049b-8162-4693-81d4-0e225b7624c8"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteBzG0cE8zOlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
}
}Update app ordering ¶
Update app orderingPUT/brands/:brand/sso_applications/sort
It can handle multiple updates in one call.
Example URI
PUT /brands/:brand/sso_applications/sort
URI Parameters
- brand
string(required) Example: db03049b-8162-4693-81d4-0e225b7624c8
Request
Body
[
{
"id": "e5f44df5-8172-4040-a668-2e8367d48139",
"order": 27
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "e5f44df5-8172-4040-a668-2e8367d48139",
"order": 27
}
],
"info": {
"count": 1,
"total": 0
}
}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: db03049b-8162-4693-81d4-0e225b7624c8- id
string(required) Example: 28953973-42cc-4768-bb77-9e8068dfef47- associations
string(required) Example: sso_application.brands
Request
Body
{
"brands": [
"db03049b-8162-4693-81d4-0e225b7624c8",
"fe5e8be0-9364-4112-92cb-cda707b97bbf"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"brands": [
{
"id": "db03049b-8162-4693-81d4-0e225b7624c8",
"created_at": 1789549248.549939,
"updated_at": 1789549248.549939,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Brokerage",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
},
{
"id": "fe5e8be0-9364-4112-92cb-cda707b97bbf",
"created_at": 1789549248.883103,
"updated_at": 1789549248.883103,
"palette": null,
"assets": null,
"messages": null,
"parent": {
"id": "db03049b-8162-4693-81d4-0e225b7624c8",
"created_at": 1789549248.549939,
"updated_at": 1789549248.549939,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Brokerage",
"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": [
"db03049b-8162-4693-81d4-0e225b7624c8"
],
"type": "brand",
"hostnames": null,
"member_count": 0,
"base_url": "https://irish.rechat.com"
}
],
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteByEkcD%2FjalTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
}
}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: db03049b-8162-4693-81d4-0e225b7624c8- id
string(required) Example: 28953973-42cc-4768-bb77-9e8068dfef47- associations
string(required) Example: sso_application.brands
Request
Body
{
"brands": [
"db03049b-8162-4693-81d4-0e225b7624c8",
"fe5e8be0-9364-4112-92cb-cda707b97bbf"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"brands": [
{
"id": "db03049b-8162-4693-81d4-0e225b7624c8",
"created_at": 1789549248.549939,
"updated_at": 1789549248.549939,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Brokerage",
"parents": null,
"type": "brand",
"hostnames": null,
"member_count": 1,
"base_url": "https://irish.rechat.com"
},
{
"id": "fe5e8be0-9364-4112-92cb-cda707b97bbf",
"created_at": 1789549248.883103,
"updated_at": 1789549248.883103,
"palette": null,
"assets": null,
"messages": null,
"parent": {
"id": "db03049b-8162-4693-81d4-0e225b7624c8",
"created_at": 1789549248.549939,
"updated_at": 1789549248.549939,
"palette": null,
"assets": null,
"messages": null,
"parent": null,
"name": "Admin Brand Parent",
"deleted_at": null,
"training": false,
"brand_type": "Brokerage",
"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": [
"db03049b-8162-4693-81d4-0e225b7624c8"
],
"type": "brand",
"hostnames": null,
"member_count": 0,
"base_url": "https://irish.rechat.com"
}
],
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteByEkcD%2FjalTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
}
}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: db03049b-8162-4693-81d4-0e225b7624c8
Response
200Body
{
"code": "OK",
"data": [
{
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteByEkcC%2BTSlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
},
{
"id": "e5f44df5-8172-4040-a668-2e8367d48139",
"created_at": 1789549249.958271,
"updated_at": 1789549249.958272,
"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": "Order Update Test SSO Application",
"name_id": "null",
"name_id_format": null,
"mappings": null,
"audience": null,
"destination": null,
"recipient": null,
"order": 27,
"issuer": "57a87717-7914-4922-902c-09a7728874e0",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVzMYfHqkXs0H5jxTEQKYbdpMPjk26u0IoeAl%2BncayiyBkLVxufaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteByEkcC%2BTSlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/e5f44df5-8172-4040-a668-2e8367d48139.xml"
}
],
"info": {
"count": 2,
"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: db03049b-8162-4693-81d4-0e225b7624c8- id
string(required) Example: 28953973-42cc-4768-bb77-9e8068dfef47
Request
Body
{
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteBzG0cE%2FjWlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml",
"brands": [
"db03049b-8162-4693-81d4-0e225b7624c8"
]
}Response
200Body
{
"code": "OK",
"data": {
"id": "28953973-42cc-4768-bb77-9e8068dfef47",
"created_at": 1789549249.74024,
"updated_at": 1789549249.740242,
"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": "611043d3-ed7d-44a2-8b73-25fe79a6eefd",
"extra": null,
"type": "sso_application",
"open_url": "http://localhost:3079/sso_applications/open?hash=jFzYu21eACj1iYSEEWEhXfxrj%2BiaJBmLDjQLY4VVN3HECyAoGonBuOcdkSgYB2in0EyAaaVVm8tAH65K4kf5gxeQEaYbcZEHjk7uuk0ocwl%2Bnsa9i3I5eltgfaQQIOedXGOCTXMShFR3R6F0JxGoQWrMrMwzpn6%2FFOgnejUSVjqVEKrt%2FZHxb6wVzCTq1DCTxD8NCiVO4AbawWRw5dk%2B8DwjteBzG0cE8zOlTls%3D",
"metadata_url": "http://localhost:3079/sso_applications/28953973-42cc-4768-bb77-9e8068dfef47.xml"
}
}