{"swagger":"2.0","info":{"title":"Rainbow Enduser portal","version":"1.84.0","description":"# Rainbow end user portal API guide\n\n## Preamble\n\n### Introduction\n\nThis guide describes list of API services that are provided by OT Rainbow End user portal. This portal is dedicated to end user features.\n\n### Protocol\n\nREST interface is used for sending/receiving OT rainbow API messages. HTTP requests GET, DELETE, POST, UPDATE are used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them. Additional data could be provided in message body. JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.\n\n### Security considerations\n\nEach request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.\n\n","x-logo":{"url":"https://hub.openrainbow.com/img/logohub.svg","backgroundColor":"#ff4900"}},"securityDefinitions":{"Bearer":{"name":"Authorization","in":"header","type":"apiKey","description":"For accessing the API a valid JWT token or a valid OAuth access token must be passed in all the queries in the 'Authorization' header. \n\n* JWT \n  * A valid JWT token is generated by the API and returned as answer of a call to the route GET /api/rainbow/authentication/v1.0/login giving a valid user & password.\n  * The following syntax must be used in the 'Authorization' header:   \nBearer xxxxxx.yyyyyyy.zzzzzz\n* OAuth access token \n  * A valid OAuth access token is generated and returned as answer of the OAuth 2.0 workflow with authorization code grant. This is done by calling the route GET /api/rainbow/authentication/v1.0/oauth/authorize to get an authorization code and then POST /api/rainbow/authentication/v1.0/oauth/token to exchange it agains an access token and a refresh token.\n  * The following syntax must be used in the 'Authorization' header:   \nBearer xxxxxx.yyyyyyy.zzzzzz\n"}},"x-permissions":{"analytics":{"name":"analytics","title":"Analytics","description":"Analytics role allows to access some GET API to retrieve some Rainbow data for processing usage statistics (DataLake,...) "},"user":{"name":"user","title":"User","description":"Standard Rainbow users "},"guest":{"name":"guest","title":"Guest User","description":"Guests can use Rainbow application, but they have restricted rights and features in the application "},"superadmin":{"name":"superadmin","title":"ALE Admin","description":"ALE Admin has high privileges on Rainbow API "},"public":{"name":"public","title":"Public","description":"⚠️ This Rainbow API is accessible and documented publicly for external developers. "},"UserHimself":{"name":"UserHimself","title":"User himself","description":"This Rainbow API can only be called by user himself (i.e. userId of logged in user = value of userId parameter in URL) "},"support":{"name":"support","title":"ALE Support","description":"ALE Support has special privileges on API allowing them to perform technical tasks and debug operations on Rainbow application "},"admin":{"name":"admin","title":"Company Admin","description":"Company Admin have special privileges on Rainbow API allowing them to manage their company and users from their company "}},"paths":{"/api/rainbow/enduser/v1.0/bots/{botId}":{"get":{"tags":["Bots"],"summary":"Get a bot service data.","description":"","operationId":"getBotById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"botId","in":"path","required":true,"type":"string","description":"Bot Service unique identifier (like 578bb08dc0d8c107725ef8c4)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"analytics"},{"name":"user"},{"name":"guest"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getBotByIdSuccess"},"examples":{"application/json":{"data":{"id":"578bd3ad01583d8c09a9bfc9","latin_name":"emily jolie","name":"Emily Jolie","jid":"rainbowland.fr","createdByUserId":"573f189f774e0a428ee813a3","createdByLoginEmail":"superadmin@openrainbow.org"}}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: Bot Service with name = Amalia doesn't belong to superadmin@openrainbow.org.","errorDetailsCode":403001}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Bot Service with id 5783d15233c9426b54daad41 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/bots":{"get":{"tags":["Bots"],"summary":"Get all bot services.","description":"This API can be used to retrieve the list of bot services.","operationId":"getBots","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less bot services details in response.   \n- `small`: id, name, jid   \n- `medium`: id, name, jid   \n- `full`: id, name, jid, createdByUserId, createdByLoginEmail"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of bot services to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first bot to retrieve (first bot if not specified). Warning: if offset > total, no results are returned."},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort bots list based on the given field."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting bots list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"analytics"},{"name":"user"},{"name":"guest"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getBotsSuccess"},"examples":{"application/json":{"data":[{"name":"Alfred","jid":"mydomain.fr","id":"578bb08dc0d8c107725ef8c4"},{"name":"Emily Jolie","jid":"rainbowland.fr","id":"578bd3ad01583d8c09a9bfc9"}],"limit":100,"offset":0,"total":2}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}}}}},"/api/rainbow/metrics":{"delete":{"tags":["Common"],"summary":"Clear performance metrics","description":"Clear metrics","operationId":"DeleteMetrics","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json. Then the result is in JSON format. For other cases the result is in text format."}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/DeleteMetricsSuccess"},"examples":{"text/plain":"HTTP/1.1 200 OK\n// text format\nOK","application/json":{"status":"OK"}}}}},"get":{"tags":["Common"],"summary":"Get performance metrics","description":"Get portal performance metrics  \n  \nIt allows to show Node specific metrics like: \n\n* processCpuTotal\n* processStartTime\n* osMemoryHeap\n* processOpenFileDescriptors\n* processMaxFileDescriptors\n* eventLoopLag\n* processHandles\n* processRequests\n* heapSizeAndUsed\n* heapSpacesSizeAndUsed\n* version\n\nNode metrics probes are launched every 10 seconds.  \n  \nA first custom metric is available to probe portal Rest API performance (an histogram of response time)  \n  \nWhen 'content-type' header field is set to 'application/json', the result is in JSON format. For other cases the result is in text format.","operationId":"GetMetrics","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json. Then the result is in JSON format. For other cases the result is in text format."}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetMetricsSuccess"},"examples":{"text/plain":"HTTP/1.1 200 OK\n// text format\n// Node metrics\n# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.\n# TYPE process_cpu_user_seconds_total counter\nprocess_cpu_user_seconds_total 2.292 1501847794097\n\n// custom metrics\n# HELP process_cpu_system_seconds_total Total system CPU time spent in seconds.\n# TYPE process_cpu_system_seconds_total counter\nprocess_cpu_system_seconds_total 0.116 1501847794097\n..... etc\n\n# HELP http_request_duration_ms Duration of HTTP requests in ms\n# TYPE http_request_duration_ms histogram\nhttp_request_duration_ms_bucket{le=\"0.1\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"1\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"2\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"5\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"10\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"15\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"50\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"100\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"200\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"300\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"400\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 0\nhttp_request_duration_ms_bucket{le=\"500\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 1\nhttp_request_duration_ms_bucket{le=\"1000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"2000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"5000\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_bucket{le=\"+Inf\",method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3\nhttp_request_duration_ms_sum{method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 1584\nhttp_request_duration_ms_count{method=\"GET\",route=\"/authentication/v1.0/login\",code=\"200\"} 3","application/json":{"metrics":[{"help":"Total user CPU time spent in seconds.","name":"process_cpu_user_seconds_total","type":"counter","values":[{"value":2.604,"labels":{},"timestamp":1501847934116}]},{"name":"http_request_duration_ms","help":"Duration of HTTP requests in ms","type":"histogram","values":[{"labels":{"le":0.1,"method":"GET","route":"/authentication/v1.0/login","code":200},"value":0,"metricName":"http_request_duration_ms_bucket"}]}]}}}}}},"/api/rainbow/enduser/v1.0/about":{"get":{"tags":["Common"],"summary":"About enduser portal","description":"Get portal information (module name, version)","operationId":"GetApiRainbowEnduserV10About","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetApiRainbowEnduserV10AboutSuccess"},"examples":{"application/json":{"version":"1.10.0","description":"Rainbow Enduser Portal"}}}}}},"/api/rainbow/ping":{"get":{"tags":["Common"],"summary":"Get enduser portal status report","description":"This API allows to check enduser portal status.   \n  \nIf no XMPP connections are available and/or if no database connection is available, an error 503 Service Unavailable is returned.","operationId":"GetApiRainbowPing","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetApiRainbowPingSuccess"},"examples":{"application/json":{"status":"OK"}}}}}},"/api/rainbow/logs/levels":{"put":{"tags":["Common"],"summary":"Change log level","description":"Allow to change the log level of the portal. The requested log level is applied to the requested transports (console, file, syslog, ...)","operationId":"PutApiRainbowLogsLevels","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PutApiRainbowLogsLevels"}}],"x-permissions":[{"name":"superadmin"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/PutApiRainbowLogsLevelsSuccess"},"examples":{"application/json":{"oldLoggerLevels":{"console":"warn","syslog":"info"},"newLoggerLevels":{"console":"debug","syslog":"debug"}}}}}}},"/api/rainbow/enduser/v1.0/companies":{"post":{"tags":["Companies"],"summary":"Create a company","description":"A user belonging to the 'Default' company is able to create his own company.   \nThen he is automatically moved to it and becomes the 'company_admin' of it.   \n  \n**The company's name is checked and must be unique.   \nThe logged in user musn't have already an admin or superadmin role**  \n  \nThe company is created with visibility='public' and userSelfRegisterEnabled=false. The user, promoted to 'company_admin', can then update these values if we want using API [PUT /api/rainbow/admin/v1.0/companies/:companyId][0].   \n  \nUser's XMPP vCard is also updated.   \nLike after a user profile update, a presence stanza is sent to user's resources and users being in user's roster. This allows clients to be notified that company of this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n  \n    <x xmlns='vcard-temp:x:update'>\n  \n        <data/>\n  \n    </x>\n  \n    <actor xmlns='jabber:iq:configuration'/x>\n  \n</presence>\n```\n\n[0]: /admin/#api-companies-PutCompanies","operationId":"createCompany","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createCompany"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createCompanySuccess"},"examples":{"application/json":{"data":{"id":"569ce8c8f9336c471b98eda1","name":"MY-ENTERPRISE","offerType":"freemium","status":"active","slogan":"My company slogan","description":"My company description","economicActivityClassification":"F","website":"https://my.enterprise.com","giphyEnabled":false,"country":"USA","visibility":"public","visibleBy":[],"visiblityRequests":[],"forceHandshake":false,"userSelfRegisterAllowedDomains":[],"userSelfRegisterEnabled":true,"adminEmail":"user1@company.com","creationDate":"2016-01-18T13:29:44.498Z","statusUpdatedDate":"2016-01-18T13:29:44.497Z","catalogId":"5979f63bae6056aadd1a8f17"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":"Company name Default is reserved to the default company on which user without company are attached","errorDetailsCode":400500}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user 569ce8c8f9336c471b98eda1 does not have required role(s) user","errorDetailsCode":403000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Companies"],"summary":"Get all companies","description":"This API allows users to get all companies.   \n  \nUsers with `user` role can only retrieve their own company and companies they can see (companies with `visibility`=`public`, companies having user's companyId in `visibleBy` field, companies being in user's company organization and having `visibility`=`organization`, BP company of user's company).   \n  \nUsers with `analytics` can retrieve all companies, but only the following fields are returned: `id`, `creationDate`, `status`, `statusUpdatedDate`, `visibility`, `visibleBy`, `organisationId`  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/companies?name=My com&format=medium&limit=100&offset=0&sortField=name&sortOrder=-1","operationId":"getCompanies","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less company details in response. > - `small`: id, name > - `medium`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape > - `full`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."},{"name":"name","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the given keyword(s) on field name.   \n  \nThe filtering is case insensitive and on partial name match: all companies **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _comp_, companies with the following names are match the filter 'My company', 'Company', 'A comp 1', 'Comp of comps', ..."},{"name":"status","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the provided status(es)"},{"name":"visibility","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the provided visibility(ies)"},{"name":"organisationId","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the organisationIds provided in this option.   \n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`"},{"name":"isBP","in":"query","required":false,"type":"boolean","description":"Allows to filter companies list on isBP field: \n\n* true returns only Business Partner companies,\n* false return only companies which are not Business Partner.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`."},{"name":"hasBP","in":"query","required":false,"type":"boolean","description":"Allows to filter companies list on companies being linked or not to a BP: \n\n* true returns only companies linked to a BP (BP IR companies are also returned),\n* false return only companies which are not linked to a BP.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support` or `bp_admin`.   \nUsers with role `bp_admin` can only use this filter with value `false`."},{"name":"bpType","in":"query","required":false,"type":"string","description":"Allows to filter companies list on bpType field.   \nThis filter allow to get all the Business Partner companies from a given bpType.   \n  \nOnly users with role `superadmin`, `support` or `bp_admin` can use this filter."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"analytics"},{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getCompaniesSuccess"},"examples":{"application/json":{"data":[{"name":"ALE1","id":"569ce8c8f9336c471b98eda1"},{"name":"ALE2","id":"569ce938f9336c471b98eda2"}],"total":2,"limit":100,"offset":0}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}}}}},"/api/rainbow/enduser/v1.0/companies/{companyId}/administrators":{"get":{"tags":["Companies"],"summary":"Get company administrators","description":"This API allows users to list users being administrator of a company.   \n  \n**Users can only retrieve administrators of their own company and administrators of companies visible by their own company** (companies being in user's company organisation and having `visibility`=`organization`, and companies having user's companyId in `visibleBy`).   \n  \nThis API implement pagination, using limit and offset options in query string arguments (default is limit on 100 users). Result sorting can also be done using sort and order options (default is sort on displayName on ascending order).   \n  \nExamples: \n\n* basic: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/administrators\n* with pagination options: GET https://openrainbow.com/api/rainbow/admin/v1.0/companies/5749aa51245015fe0d36e968/administrators?limit=10&offset=20&sortField=firstName&sortOrder=-1\n\n","operationId":"getCompanyAdministrators","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"companyId","in":"path","required":true,"type":"string","description":"Company for which list of administrators is requested"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less user details in response.   \n- `small`: id, firstName, lastName, displayName, companyId, companyName, isTerminated   \n- `medium`: id, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode   \n- `full`: id, firstName, lastName, displayName, nickName, title, jobTitle, emails, phoneNumbers, country, state, language, timezone, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, lastOfflineMailReceivedDate"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getCompanyAdministratorsSuccess"},"examples":{"application/json":{"data":[{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false},{"id":"56c5cb38e8078d7512c43985","loginEmail":"user2@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}],"total":2,"limit":100,"offset":0}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}}}}},"/api/rainbow/enduser/v1.0/companies/{companyId}":{"get":{"tags":["Companies"],"summary":"Get a company data","description":"This API allows user to get a company data.   \n  \n**Users can only retrieve their own company and companies they can see** (companies with `visibility`=`public`, companies having user's companyId in `visibleBy` field, companies being in user's company organization and having `visibility`=`organization`, BP company of user's company).   \n  \nIf user request his own company, `numberUsers` field is returned with the number of Rainbow users being in this company.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/companies/569d0ef3ef7816921f7e94fa","operationId":"getCompanyById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"companyId","in":"path","required":true,"type":"string","description":"Company unique identifier (like 569ce8c8f9336c471b98eda1)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less company details in response. > - `small`: id, name > - `medium`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape > - `full`: id, name, status, adminEmail, companyContactId, country, website, slogan, description, size, economicActivityClassification, lastAvatarUpdateDate, lastBannerUpdateDate, avatarShape   \n**When a user wants data of his own company in 'full' mode, he gets all fields except subscriptions and fields related to a business partner managing this company.**"},{"name":"name","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the given keyword(s) on field name.   \n  \nThe filtering is case insensitive and on partial name match: all companies **containing** the provided name value will be returned (whatever the position of the match).   \nEx: if filtering is done on _comp_, companies with the following names are match the filter 'My company', 'Company', 'A comp 1', 'Comp of comps', ..."},{"name":"status","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the provided status(es)"},{"name":"visibility","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the provided visibility(ies)"},{"name":"organisationId","in":"query","required":false,"type":"string","description":"Allows to filter companies list on the organisationIds provided in this option.   \n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`"},{"name":"isBP","in":"query","required":false,"type":"boolean","description":"Allows to filter companies list on isBP field: \n\n* true returns only Business Partner companies,\n* false return only companies which are not Business Partner.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support`, `bp_admin` or `admin`."},{"name":"hasBP","in":"query","required":false,"type":"boolean","description":"Allows to filter companies list on companies being linked or not to a BP: \n\n* true returns only companies linked to a BP (BP IR companies are also returned),\n* false return only companies which are not linked to a BP.\n\n  \nThis filter can only be used if user has role(s) `superadmin`, `support` or `bp_admin`.   \nUsers with role `bp_admin` can only use this filter with value `false`."},{"name":"bpType","in":"query","required":false,"type":"string","description":"Allows to filter companies list on bpType field.   \nThis filter allow to get all the Business Partner companies from a given bpType.   \n  \nOnly users with role `superadmin`, `support` or `bp_admin` can use this filter."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getCompanyByIdSuccess"},"examples":{"application/json":{"data":{"id":"569ce8c8f9336c471b98eda1","name":"AL-ENTERPRISE","country":"FRA","status":"active","adminEmail":"admin@company.com","description":"A free string that describes my company","size":"1001-5000 employees","website":"http://enterprise.alcatel-lucent.com","economicActivityClassification":"F","lastAvatarUpdateDate":"2016-02-18T13:29:44.497Z","lastBannerUpdateDate":"2016-02-18T13:29:44.497Z"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"companyId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Company with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/sources/{sourceId}/contacts/{contactId}":{"delete":{"tags":["Contacts Deletecontact"],"summary":"Delete a contact","description":"","operationId":"DeleteApiRainbowEnduserV10UsersUseridSourcesSourceidContactsContactid","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c4aebe31d144d947e385db)"},{"name":"contactId","in":"path","required":true,"type":"string","description":"Contact unique identifier (like 56e2f711c747f92e39c630c9)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/DeleteApiRainbowEnduserV10UsersUseridSourcesSourceidContactsContactidSuccess"},"examples":{"application/json":{"status":"Contact 56e688528e6e3b7b0cb7be1c successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"contactDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"ThisIsNotAValidContactId","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Contacts"],"summary":"Get a contact data","description":"","operationId":"getContact","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c4aebe31d144d947e385db)"},{"name":"contactId","in":"path","required":true,"type":"string","description":"Contact unique identifier (like 56e2f711c747f92e39c630c9)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getContactSuccess"},"examples":{"application/json":{"data":{"id":"56e2f711c747f92e39c630c9","contactId":"myContactId","firstName":"Alice","lastName":"L","displayName":"AL","company":"ALE","jobTitle":"Marketing","phoneNumbers":[{"number":"123456","type":"home"},{"number":"5509","type":"work"}],"emails":[{"email":"fr@al-enterprise.com","type":"work"},{"email":"a@al.com","type":"work"}],"addresses":[{"type":"work","street":"avenue kleber","city":"colombes","state":"Montmartre","country":"FRA"},{"type":"other","address":"32 avenue kleber colombes"}],"groups":["home"],"otherData":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"contactDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"ThisIsNotAValidContactId","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Contacts"],"summary":"Change a contact data","description":"","operationId":"updateContact","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c5c19f94141765119f896c)"},{"name":"contactId","in":"path","required":true,"type":"string","description":"Contact unique identifier (like 56e2f711c747f92e39c630c9)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateContact"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateContactSuccess"},"examples":{"application/json":{"data":{"id":"56e2f711c747f92e39c630c9","contactId":"myContactId","firstName":"Alice","lastName":"L","displayName":"AL","company":"ALE","jobTitle":"Marketing","phoneNumbers":[{"number":"123456","type":"home"},{"number":"5509","type":"work"}],"emails":[{"email":"fr@al-enterprise.com","type":"work"},{"email":"a@al.com","type":"work"}],"addresses":[{"type":"work","street":"avenue kleber","city":"colombes","state":"Montmartre","country":"FRA"},{"type":"other","address":"32 avenue kleber colombes"}],"groups":["home"],"otherData":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"contactDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"ThisIsNotAValidContactId","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Contact with contactId = myContactId already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/sources/{sourceId}/contacts":{"post":{"tags":["Contacts"],"summary":"Create a contact","description":"Create a contact for a given user's source","operationId":"createContact","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c5c19f94141765119f896c)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createContact"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createContactSuccess"},"examples":{"application/json":{"data":{"id":"56e2f711c747f92e39c630c9","contactId":"myContactId","firstName":"Alice","lastName":"L","displayName":"AL","company":"ALE","jobTitle":"Marketing","phoneNumbers":[{"number":"123456","type":"home"},{"number":"5509","type":"work"}],"emails":[{"email":"fr@al-enterprise.com","type":"work"},{"email":"a@al.com","type":"work"}],"addresses":[{"type":"work","street":"avenue kleber","city":"colombes","state":"Montmartre","country":"FRA"},{"type":"other","address":"32 avenue kleber colombes"}],"groups":["home"],"otherData":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"contactDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"ThisIsNotAValidContactId","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Contact with contactId = myContactId already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Contacts"],"summary":"Get contacts list","description":"","operationId":"getContacts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c4a4c331d144d947e385da)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less contact details in response. > - `small`: id, contactId > - `medium`: id, contactId, firstName, lastName, displayName, company, jobTitle > - `full`: all contact fields"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getContactsSuccess"},"examples":{"application/json":{"data":{"id":"56e2f711c747f92e39c630c9","contactId":"myContactId","firstName":"Alice","lastName":"L","displayName":"AL","company":"ALE","jobTitle":"Marketing","phoneNumbers":[{"number":"123456","type":"home"},{"number":"5509","type":"work"}],"emails":[{"email":"fr@al-enterprise.com","type":"work"},{"email":"a@al.com","type":"work"}],"addresses":[{"type":"work","street":"avenue kleber","city":"colombes","state":"Montmartre","country":"FRA"},{"type":"other","address":"32 avenue kleber colombes"}],"groups":["home"],"otherData":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"contactDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"ThisIsNotAValidContactId","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/conversations":{"post":{"tags":["Conversations"],"summary":"Create a conversation","description":"This API can be used to create a conversation for a given user with either another rainbow user, a room or with a bot. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nTree kinds of conversations are managed: user to user, user to room and user to bot. Conversation field `type` indicates for each conversation if it is related to a user, a room or to a bot.   \n  \nIf the conversation is successfully created, http code 201 is returned. If the conversation already exists, http code 200 is returned.   \nPeer data and lastMessage information are returned in response (lastMessage information can exist if conversation with messages is deleted and then re-created later).   \n  \nExample: POST http://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/conversations","operationId":"createConversation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)."},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createConversation"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createConversationSuccess"},"examples":{"application/json":{"id":"56d0000a0261b53142a5c022","creationDate":"2017-01-28T16:31:36.879Z","peerId":"56d0277a0261b53142a5c000","type":"user","mute":false,"isFavorite":false,"loginEmail":"firstname.lastname@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","jid_im":"0dc8f57b2bb541b6b36f80736bc4e2e8@openrainbow.com","lastAvatarUpdateDate":"2016-03-30T12:34:46.543Z","lastMessageText":"hello","lastMessageSender":"2bcb379b09c747eaac4a59526c52f750@openrainbow.com","lastMessageDate":"2016-04-21T15:54:46.644Z","unreceivedMessageNumber":"4","unreadMessageNumber":"3","call":null}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Conversations"],"summary":"Get all conversations","description":"This API can be used to retrieve the list of user's conversations. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a client starts, it has to get all conversations using this API.   \nIt is up to clients to manage the set of conversations currently active (when a new conversation is initiated or a conversation is deleted by the user) using the conversations APIs [POST /api/rainbow/enduser/v1.0/users/:userId/conversations][0] and [DELETE /api/rainbow/enduser/v1.0/users/:userId/conversations][1].   \n  \nThis API calls XMPP server for each conversation to get the last IM with the peerId, the date of the last message, the number of unread messages, the number of unreceived messages and the call information if last message is a call log. If no xmpp data has been found, lastMessageText is set to \"\", lastMessageDate is set to null, unreceivedMessageNumber and unreadMessageNumber are set to 0.   \n  \nThe conversation list is not sorted by the API. Each client has to handle conversations sorting: according to creationDate, lastMessageDate field, call log and presence state, it should be able to rank conversations in the desired order.   \n  \nThree kinds of conversations are managed: user to user, user to room, and user to bot. Conversation field `type` indicates for each conversation if it is related to a user, a room or a bot.   \n  \nExample: GET http://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/conversations\n\n[0]: #api-enduser_conversations-enduser_users_PostConversations\n[1]: #api-enduser_conversations-enduser_users_DeleteConversations","operationId":"getConversations","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getConversationsSuccess"},"examples":{"application/json":{"data":[{"id":"56d0000a0261b53142a5c022","creationDate":"2017-01-28T16:31:36.879Z","peerId":"56d0277a0261b53142a5c000","type":"user","mute":false,"isFavorite":false,"loginEmail":"firstname.lastname@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","jid_im":"0dc8f57b2bb541b6b36f80736bc4e2e8@openrainbow.com","lastAvatarUpdateDate":"2016-03-30T12:34:46.543Z","lastMessageText":"hello","lastMessageSender":"0dc8f57b2bb541b6b36f80736bc4e2e8@openrainbow.com","lastMessageDate":"2016-04-21T15:54:46.644Z","unreceivedMessageNumber":"4","unreadMessageNumber":"3","call":null},{"id":"5878e047cb89595f1bd394ac","creationDate":"2017-01-30T09:39:15.549Z","peerId":"57960df7a1ab69c4243415ae","type":"user","mute":false,"isFavorite":true,"loginEmail":"john.doe@company.com","firstName":"John","lastName":"Doe","displayName":"John Doe","jid_im":"a7a66071cf2249ccbfafd74225f68c56@openrainbow.com","lastAvatarUpdateDate":"2016-09-12T07:54:11.433Z","lastMessageText":null,"lastMessageSender":"2bcb379b09c747eaac4a59526c52f750@openrainbow.com","lastMessageDate":"2017-03-17T13:48:12.643Z","unreceivedMessageNumber":"0","unreadMessageNumber":"0","call":{"state":"answered","duration":"8608"}},{"id":"56d0000a0261b53142a5c011","creationDate":"2017-02-01T14:28:16.353Z","peerId":"56f3f51a76e0bf767ed45325","type":"room","mute":false,"isFavorite":true,"name":"name of my room","topic":"topic of my room","jid_im":"room_1d5b831fdc794108924801fb00158f07@openrainbow.com","lastMessageText":"is anybody there?","lastMessageSender":"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com","lastMessageDate":"2016-04-22T09:43:12.324Z","unreceivedMessageNumber":"0","unreadMessageNumber":"1"},{"id":"56d0000a0261b53142a5c012","creationDate":"2017-02-06T09:49:54.532Z","peerId":"56f3f51a76e0bf767ed45326","type":"bot","mute":false,"isFavorite":false,"name":"emily","jid_im":"emily.openrainbow.com","lastMessageText":"","lastMessageDate":null,"lastMessageSender":null,"unreceivedMessageNumber":"0","unreadMessageNumber":"0"}],"total":4}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/conversations/{conversationId}":{"delete":{"tags":["Conversations"],"summary":"Delete a conversation","description":"This API can be used to delete a conversation for a given user. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a conversation is deleted using this API, all user's XMPP resources will receive the following message indicating them that a conversation has been deleted: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <conversation id=\"573f1883f8a74ed086816789\" action=\"delete\" xmlns=\"jabber:iq:configuration\"/>\n  \n</message>\n```\n  \n  \nExample: DELETE http://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/conversations/56d85476ebe1b48b115d4311","operationId":"deleteConversation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier, owner of the conversation (like 56d0277a0261b53142a5cab5)"},{"name":"conversationId","in":"path","required":true,"type":"string","description":"Conversation unique identifier (like 56d0277a0261b53142a5c000)."},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteConversationSuccess"},"examples":{"application/json":{"status":"Conversation 56d85476ebe1b48b115d4311 successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"conversationId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d85476ebe1b48b115d431","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Conversation with id 56d0000a0261b53142a5c022 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Conversations"],"summary":"Update a conversation","description":"This API can be used to update a conversation for a given user. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a conversation is updated, all user's XMPP resources will receive the following message, containing the up-to-date conversation data: \n\n    \n```html\n<﻿message type=\"management\" id=\"d7601d6d-30a4-4adc-86be-42705a01f766_3\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"425fc895cac04b079261cee2fdc4f8ad@opentouch.cloud\"\n  \n        xmlns=\"jabber:client\">\n  \n    <﻿no-store xmlns=\"urn:xmpp:hints\"/>\n  \n    <conversation id=\"56d0000a0261b53142a5c022\" action=\"update\" xmlns=\"jabber:iq:configuration\">\n  \n        <peerId>56d0277a0261b53142a5c000</peerId>\n  \n        <type>user</type>\n  \n        <mute>false</mute>\n  \n        <isFavorite>true</mute>\n  \n    </conversation>\n  \n</message>\n```\n  \n  \nFor legacy reasons, when a conversation is muted/unmuted using this API, all user's XMPP resources will also receive the following message indicating them that a conversation has been muted/unmuted:   \nMute: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <mute conversation=\"573f1883f8a74ed086816789\" xmlns=\"jabber:iq:configuration\"/>\n  \n</message>\n```\nUnmute: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <unmute conversation=\"573f1883f8a74ed086816789\" xmlns=\"jabber:iq:configuration\"/>\n  \n</message>\n```\n  \n","operationId":"updateConversation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier, owner of the conversation (like 56d0277a0261b53142a5cab5)"},{"name":"conversationId","in":"path","required":true,"type":"string","description":"Conversation unique identifier (like 56d0277a0261b53142a5c000)."},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateConversation"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateConversationSuccess"},"examples":{"application/json":{"data":{"id":"56d85476ebe1b48b115d4311","creationDate":"2017-01-28T16:31:36.879Z","peerId":"56d0277a0261b53142a5c000","type":"user","mute":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"conversationId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d85476ebe1b48b115d431","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Conversation with id 56d0000a0261b53142a5c022 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/conversations/{conversationId}/markallread":{"put":{"tags":["Conversations"],"summary":"Mark all unread messages in the conversation as read","description":"This API can be used to mark all unread messages in a conversation as read. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)","operationId":"markAllUnreadConversationAsRead","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier, owner of the conversation (like 56d0277a0261b53142a5cab5)"},{"name":"conversationId","in":"path","required":true,"type":"string","description":"Conversation unique identifier (like 56d0277a0261b53142a5c000)."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/markAllUnreadConversationAsReadSuccess"},"examples":{"application/json":{"status":"All unread messages are marked as read for conversation 56d0277a0261b53142a5c000.","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"conversationId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d85476ebe1b48b115d431","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Conversation with id 56d0000a0261b53142a5c022 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/conversations/{conversationId}/downloads":{"post":{"tags":["Conversations"],"summary":"Download a conversation","description":"This API can be used to backup a conversation between a rainbow user and another one, or between a user and a room. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL) \n\n* Two kinds of conversations are allowed: user to user, user to room. User to bot is not allowed yet.\n* An email is sent to the endUser email address.\n\n","operationId":"sendConversationContentByEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier, owner of the conversation (like 56d0277a0261b53142a5cab5)"},{"name":"conversationId","in":"path","required":true,"type":"string","description":"Conversation unique identifier (like 56d0277a0261b53142a5c000)."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendConversationContentByEmailSuccess"},"examples":{"application/json":{"status":"Backup successfully sent for conversation 56d0277a0261b53142a5c000.","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"conversationId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d85476ebe1b48b115d431","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Conversation with id 56d0000a0261b53142a5c022 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Download an empty conversation, or older than 30 days.","errorDetailsCode":409011}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/countries":{"get":{"tags":["Countries"],"summary":"Get list of countries","description":"This API allows to retrieve the list of countries supported by Rainbow Server.","operationId":"getCountries","consumes":["application/json"],"produces":["application/json"],"parameters":[],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getCountriesSuccess"},"examples":{"application/json":{"data":[{"isoAlpha3Code":"ABW","fullname":"Aruba"},{"isoAlpha3Code":"AFG","fullname":"Afghanistan"},{"isoAlpha3Code":"ZWE","fullname":"Zimbabwe"}]}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/favorites":{"post":{"tags":["Favorites"],"summary":"Add a favorite to user's favorite list","description":"This API can be used to add a favorite in user's favorites list.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nTree kinds of favorites are managed: user to user, user to room and user to bot. Favorite field type indicates for each favorite if it is related to a user, a room or to a bot.   \n  \nWhen a favorite is added in users's favorite using this API, all user's XMPP resources will receive the following message indicating that a new favorite has been created: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <favorite id=\"57b44e9c0c32e0b425252f9e\" action=\"create\" type = \"user\" position = 4, peer_id =\"574ff5153448af6c2940f908\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/favorites?position=1","operationId":"createFavorite","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)."},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createFavorite"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createFavoriteSuccess"},"examples":{"application/json":{"data":{"id":"5c2e275ad7ad4634939a7264","position":0,"peerId":"5c2e275ad7ad4634939a7276","type":"user"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 574ff5153448af6c2940f909 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Favorites"],"summary":"Get all users's favorite","description":"This API can be used to retrieve the list of user's favorites. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET http://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/favorites","operationId":"enduser_users_GetFavorites","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/enduser_users_GetFavoritesSuccess"},"examples":{"application/json":{"data":[{"id":"5caefc27e970fcc8b3ecf7e5","position":0,"peerId":"5c7d4322c651536ece09bf15","type":"room"},{"id":"5caefc53e970fcc8b3ecf7e6","position":1,"peerId":"5c2e2759179ce5348438a1b9","type":"user"},{"id":"5caefd01e970fcc8b3ecf7e7","position":2,"peerId":"5c2e275ad7ad4634939a7276","type":"user"}]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Favorites"],"summary":"Move favorite to position x in favorite list","description":"This API can be used to update a favorite's position in favorite list.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a favorite is update from users's favorites using this API, all user's XMPP resources will receive the following message indicating that a user has been added in a group: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <favorite id=\"57b44e9c0c32e0b425252f9e\" action=\"update\" type = \"user\" position = \"6\" peer_id =\"574ff5153448af6c2940f908\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: PUT https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/favorites/58d0277a0261b53142a5cab5?position=12","operationId":"updateFavorite","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateFavoriteSuccess"},"examples":{"application/json":{"data":{"id":"5c2e275ad7ad4634939a7264","position":0,"peerId":"5c2e275ad7ad4634939a7276","type":"user"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Favorite with id 57b44e9c0c32e0b425252f9a does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/favorites/{favoriteId}":{"get":{"tags":["Favorites"],"summary":"Get a favorite by Id","description":"This API can be used to retrieve a specific user's favorite by Id.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/favorites/57b44e9c0c32e0b425252f9e/89b44e9c0c32e0b425252fbc","operationId":"getUserFavoritesById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"favoriteId","in":"path","required":true,"type":"string","description":"Favorite unique identifier (like 5c2e275ad7ad4634939a7264)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserFavoritesByIdSuccess"},"examples":{"application/json":{"data":{"id":"5c2e275ad7ad4634939a7264","position":0,"peerId":"5c2e275ad7ad4634939a7276","type":"user"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Favorite with id 57b44e9c0c32e0b425252f9a does not exist.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"delete":{"tags":["Favorites"],"summary":"Remove a favorite from a user's favorites list","description":"This API can be used to remove a favorite from a user's favorites list.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a favorite is removed from users's favorites using this API, all user's XMPP resources will receive the following message indicating that a favorite has been deleted: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <favorite id=\"57b44e9c0c32e0b425252f9e\" action=\"delete\" type = \"user\" peer_id =\"574ff5153448af6c2940f908\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: DELETE https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/favorites/574ff5153448af6c2940f908","operationId":"removeFavorites","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"favoriteId","in":"path","required":true,"type":"string","description":"Favorite unique identifier (like 5c2e275ad7ad4634939a7264)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/removeFavoritesSuccess"},"examples":{"application/json":{"data":{"id":"5c2e275ad7ad4634939a7264","peerId":"5c2e275ad7ad4634939a7276","type":"user"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"favorites 574ff5153448af6c2940f902 does not exist, not able to delete it.","errorDetailsCode":404002}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/groups/{groupId}/users/{userIdToAdd}":{"post":{"tags":["Groups"],"summary":"Add a user in a group","description":"This API can be used to add a user in a group.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a user is added in a group using this API, all user's XMPP resources will receive the following message indicating them that a user has been added in a group: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <group id=\"57b44e9c0c32e0b425252f9e\" action=\"create\" scope=\"user\" userId=\"574ff5153448af6c2940f908\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups/57b44e9c0c32e0b425252f9e/users/574ff5153448af6c2940f908","operationId":"addUserToGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userIdToAdd","in":"path","required":true,"type":"string","description":"User unique identifier of the user to add in the group (like 574ff5153448af6c2940f908)"},{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"groupId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/addUserToGroupSuccess"},"examples":{"application/json":{"data":{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","comment":"Group with by best friends","isFavorite":false,"owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-05T10:04:54.312Z","users":["5703d6619ccf39843c7ef89d","574ff5153448af6c2940f908"]}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 574ff5153448af6c2940f909 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User 574ff5153448af6c2940f908 is already in group 57b44e9c0c32e0b425252f9e","errorDetailsCode":409540}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/groups":{"post":{"tags":["Groups"],"summary":"Create a group","description":"This API can be used to create a group.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a group is created using this API, all user's XMPP resources will receive the following message indicating them that a group has been created: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <group id=\"57b44e9c0c32e0b425252f9e\" action=\"create\" scope=\"group\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups","operationId":"createGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createGroup"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createGroupSuccess"},"examples":{"application/json":{"data":{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","comment":"Group with by best friends","isFavorite":false,"creationDate":"2016-09-05T10:04:54.312Z","owner":"56d0277a0261b53142a5cab5","users":[]}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Groups"],"summary":"Get all user's groups","description":"This API can be used to retrieve the list of user's groups (i.e. groups having owner field equal to provided userId).   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups?format=full&userId=574ff5153448af6c2940f908&isFavorite=true","operationId":"getUserGroups","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"userId","in":"query","required":false,"type":"string","description":"List all groups having this user in their `users` list"},{"name":"isFavorite","in":"query","required":false,"type":"boolean","description":"Allows to filter group list on the isFavorite criterion."},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less group details in response. > - `small`: id, name, isFavorite > - `medium`: id, name, isFavorite, comment, owner, creationDate > - `full`: all group fields"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserGroupsSuccess"},"examples":{"application/json":{"data":[{"id":"57cd4346d8793a0d124aa21e","name":"Colleagues","isFavorite":false,"owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-03T16:52:34.312Z"},{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","isFavorite":false,"comment":"Group with by best friends","owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-05T10:04:54.312Z"}],"limit":100,"offset":0,"total":2}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/groups/{groupId}":{"delete":{"tags":["Groups"],"summary":"Delete a group","description":"This API can be used to delete a group.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a group is deleted using this API, all user's XMPP resources will receive the following message indicating them that a group has been deleted: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <group id=\"57b44e9c0c32e0b425252f9e\" action=\"delete\" scope=\"group\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: DELETE https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups/57b44e9c0c32e0b425252f9e","operationId":"deleteGroupById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"groupId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteGroupByIdSuccess"},"examples":{"application/json":{"status":"Group 57b44e9c0c32e0b425252f9e successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Group with id 57b44e9c0c32e0b425252f9a does not exist, not able to delete it.","errorDetailsCode":404002}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Groups"],"summary":"Get a group","description":"This API can be used to retrieve a specific user's groups.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nUsers being in this group are returned with the following fields: id, firstName, lastName, jid_im, companyId, companyName, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode (fields are fetched from database for each userId being in this group)   \nFor now, loginEmail is returned if the user is in the same company than logged in user, but this field is **DEPRECATED** and will be removed in a future release.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups/57b44e9c0c32e0b425252f9e","operationId":"getUserGroupsById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"groupId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserGroupsByIdSuccess"},"examples":{"application/json":{"data":{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","comment":"Group with by best friends","isFavorite":false,"owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-05T10:04:54.312Z","users":[{"id":"5703d6619ccf39843c7ef89d","loginEmail":"user1@company.com","firstName":"John","lastName":"Doe","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","jid_im":"0dc8f57b2bb541b6b36f80736bc4e2e8@openrainbow.com","lastAvatarUpdateDate":"2018-05-24T07:42:15.130Z","lastUpdateDate":"2018-04-12T12:28:23.236Z","isTerminated":false,"guestMode":false,"addedDate":"2018-04-12T12:28:23.236Z"},{"id":"574ff5153448af6c2940f908","loginEmail":"user2@company.com","firstName":"Will","lastName":"Turner","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","jid_im":"1506d73c8a9c4a8ea9a86f46f55028d4@openrainbow.com","lastAvatarUpdateDate":"2018-02-06T04:56:43.543Z","lastUpdateDate":"2018-06-25T15:08:12.393Z","isTerminated":false,"guestMode":false}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Group with id 57b44e9c0c32e0b425252f9a does not exist.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Groups"],"summary":"Update a group","description":"This API can be used to update a group.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a group is updated using this API, all user's XMPP resources will receive the following message indicating them that a group has been updated (attributes name and comment are provided according to the updated field): \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <group id=\"57b44e9c0c32e0b425252f9e\" action=\"update\" scope=\"group\" name=\"Friends\" comment=\"Group with by best friends\" isFavorite=\"false\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: PUT https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups/57b44e9c0c32e0b425252f9e","operationId":"updateGroupById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"groupId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateGroupById"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateGroupByIdSuccess"},"examples":{"application/json":{"data":{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","comment":"Group with by best friends","isFavorite":false,"owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-05T10:04:54.312Z","users":["5703d6619ccf39843c7ef89d","574ff5153448af6c2940f908"]}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Group with id 57b44e9c0c32e0b425252f9a does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/groups/{groupId}/users/{userIdToRemove}":{"delete":{"tags":["Groups"],"summary":"Remove a user from a group","description":"This API can be used to remove a user from a group.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a user is removed from a group using this API, all user's XMPP resources will receive the following message indicating them that a user has been removed from a group: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\">\n  \n    <group id=\"57b44e9c0c32e0b425252f9e\" action=\"delete\" scope=\"user\" userId=\"574ff5153448af6c2940f908\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: DELETE https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/groups/57b44e9c0c32e0b425252f9e/users/574ff5153448af6c2940f908","operationId":"removeUserFromGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userIdToRemove","in":"path","required":true,"type":"string","description":"User unique identifier of the user to remove from the group (like 574ff5153448af6c2940f908)"},{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"groupId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/removeUserFromGroupSuccess"},"examples":{"application/json":{"data":{"id":"57b44e9c0c32e0b425252f9e","name":"Friends","comment":"Group with by best friends","isFavorite":false,"owner":"56d0277a0261b53142a5cab5","creationDate":"2016-09-05T10:04:54.312Z","users":["5703d6619ccf39843c7ef89d","574ff5153448af6c2940f908"]}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User 574ff5153448af6c2940f902 is already not in group 57b44e9c0c32e0b425252f9e","errorDetailsCode":404540}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/{invitationId}/accept":{"post":{"tags":["Invitations"],"summary":"Accept a user invitation","description":"This API can be used to accept an invitation sent by another Rainbow user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nOnce invitation is accepted, invited and inviting user will be in each other roster and will be mutually visible (search API, GET users, GET users/:userId, ...).   \n  \nInviting and invited user are both notified with an XMPP message that the invitation has been accepted.   \nFor inviting user, type is `sent`.   \nFor invited user, type is `received`.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"update\" type='received' status='accepted' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/57cd5922d341df5812bbcb72/accept","operationId":"acceptUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/acceptUserInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","acceptationDate":"2016-09-29T15:18:31.342Z","status":"accepted","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User invitation 57cd5922d341df5812bbcb72 is already accepted, not able to accept it","errorDetailsCode":409605}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/{invitationId}/cancel":{"post":{"tags":["Invitations"],"summary":"Cancel a user invitation","description":"This API can be used to cancel an invitation sent to a user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nInvitation can only be canceled if it is pending.   \nIf invited user exists in Rainbow, he can't use the canceled invitation anymore to accept inviting user visibility request.   \nIf invited user does not have a Rainbow account, he can still use the invitationId of a canceled invitation to register in Rainbow (this validates his email address) but once registered he won't be added to invited user's roster.   \n  \nInvited user is notified with an XMPP message that the invitation has been canceled.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"update\" type='sent' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nIf invited user exist in Rainbow, he is also notified that the invitation has been canceled with the following message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"update\" type='received' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/57cd5922d341df5812bbcb72/cancel","operationId":"cancelUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/cancelUserInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","authorizedReSendInvitationDate":"2016-09-28T17:31:36.879Z","cancelationDate":"2016-09-29T15:18:31.342Z","status":"canceled","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User invitation 57cd5922d341df5812bbcb72 is already canceled, not able to cancel it","errorDetailsCode":409607}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/bulk":{"post":{"tags":["Invitations"],"summary":"Create user invitations by bulk","description":"This API allows logged in user to send invitations to other users by bulk (up to 100 emails).   \n  \nThe invitations are sent asynchronously. Only synchronous validation is performed on the provided emails (format, ...). The results of this synchronous validation ir returned directly in the response, for all the asynchronous validations the client will not be aware of the errors.   \nThe client will be notified though XMPP notifications for each created invitations.   \n  \nSame rules applies than for API POST /api/rainbow/enduser/v1.0/users/:userId/invitations, except that only invitation by email is implemented.","operationId":"createUserBulkInvitations","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createUserBulkInvitations"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createUserBulkInvitationsSuccess"},"examples":{"application/json":{"status":"ongoing","report":{"ongoing":[{"email":"invited.bulk1@company.com","index":0,"errors":[],"status":"ongoing"},{"email":"invited.bulk2@company.com","index":1,"errors":[],"status":"ongoing"},{"email":"invited.bulk3@company.com","index":3,"errors":[],"status":"ongoing"}],"failed":[{"email":"logged-in.user@company.com","index":2,"errors":[{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"email logged-in.user@company.com is the logged in user's loginEmail, not able to send invitation email","errorDetailsCode":403504,"errorDetailsData":{}}],"status":"failed"}]},"counters":{"total":4,"failed":1,"ongoing":3}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":{"param":"emails.length","msg":"Too many data sent in array. Max number of data: 100","value":108},"errorDetailsCode":400000,"errorDetailsData":{"maxNumberBulkInvitations":100}}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations":{"post":{"tags":["Invitations"],"summary":"Create a user invitation","description":"This API allows logged in user to invite another user.   \n  \nAt the end of the process, if invited user accepts the invitation, invited user and inviting user will be searchable mutually and will be in each other rosters.   \n  \n**Note** It's not possible to invite users having only the role `guest`. (CPAAS user)  \nFrom **1.53.0**, a user can be embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration. It is not a user with the role `guest`. This user gets the role `user` and the flag `guestMode` is set to true, waiting for the user finalizes his account. Besides, his `visibility` is 'none'. We can't invite this kind of user to join the logged in network. (HTTP error 403509)  \nHere are some details about this API and user invitation features.   \nUsers can be invited: \n\n* by `email`: \n  * If the provided email corresponds to the loginEmail of a Rainbow user, a visibility request is sent (if this Rainbow user is not in logged in user roster). \n    * An InviteUser entry is stored in database (with a generated invitationId).\n    * The invited user receive an email with a validation link (containing the invitationId).\n    * The invited user is notified with an XMPP message (containing the invitationId).\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite action=\"create\" id='57cd5922d341df5812bbcb72' type='received' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n    * The inviting user is notified with an XMPP message (containing the invitationId) (useful for multi-device).\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite action=\"create\" id='57cd5922d341df5812bbcb72' type='sent' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n    * The list of all visibility requests received by the logged in user (invited user side) can be retrieved with the API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/received(?status=pending|accepted|auto-accepted|declined)][0]\n    * The list of all visibility requests sent by the logged in user (inviting user side) can be retrieved with the API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/sent(?status=pending|accepted|auto-accepted|declined)][1]\n    * The inviting user can re-send a visibility request notification (only by email) using API [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user/:invitationId/re-send][2]\n    * To accept the visibility request (invited user side), client has to call API [POST /api/rainbow/enduser/v1.0/users/:userId/invitations/:invitationId/accept][3]  \nOnce accepted, invited and inviting user will be in each other roster and will be mutually visible (search API, GET users, GET users/:userId, ...)\n    * To decline the visibility request (invited user side), client has to call API [POST /api/rainbow/enduser/v1.0/users/:userId/invitations/:invitationId/decline][4]\n  * If the provided email is not known in Rainbow, an invitation is sent to this email to invite the person to create a Rainbow account \n    * An InviteUser entry is stored in database (with a generated invitationId).\n    * The invited user receive an email with a creation link (containing the invitationId).\n    * The inviting user is notified with an XMPP message (containing the invitationId) (useful for multi-device).\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"create\" type='sent' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n    * The list of all visibility requests sent by the logged in user (inviting user side) can be retrieved with the API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/sent(?status=pending|accepted|auto-accepted|declined)][1]\n    * The inviting user can re-send a visibility request notification (only by email) using API [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user/:invitationId/re-send][2]\n    * To create his Rainbow account, the invited user has to use API \"Self register a user\" ([POST /api/rainbow/enduser/v1.0/users/self-register][5])\n* by phoneNumber (`invitedPhoneNumber`): \n  * No match is done on potential existing Rainbow users.\n  * An InviteUser entry is stored in database (with a generated invitationId).\n  * No email is sent to invited user. It is **up to clients calling this API to send an SMS to the invited user's phone** (with the invitationId).\n  * The inviting user is notified with an XMPP message (containing the invitationId) (useful for multi-device).\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"create\" type='sent' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  * If the invitedPhoneNumber correspond to a user already existing in Rainbow, he **will not** be able to see the request using the API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/received(?status=pending|accepted|auto-accepted|declined)][0], as no match is done between the invitedPhoneNumber and a potential user existing in Rainbow\n  * The list of all visibility requests sent by the logged in user (inviting user side) can be retrieved with the API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/sent(?status=pending|accepted|auto-accepted|declined)][1]\n  * The inviting user can re-send a visibility request notification done by phoneNumber using API [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user/:invitationId/re-send][2], however it is still **up to client to send an SMS to the invited user's phone** (the API only updates the field lastNotificationDate). If needed, it is **up to clients to re-send the SMS to the invited user's phone**.\n  * To create his Rainbow account, the invited user has to use API \"Self register a user\" using the associated invitationId ([POST /api/rainbow/enduser/v1.0/users/self-register][5])\n* by Rainbow user id (`invitedUserId`): \n  * if no user is found with the provided invitedUserId, an error 404 is returned\n  * otherwise, a visibility request is sent (if this Rainbow user is not in logged in user roster).   \nSame documentation than existing user invited by email apply (see above).\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/5821f986394c356580c3c86d/invitations\n\n[0]: #api-enduser_invitations-enduser_users_GetReceivedInvites\n[1]: #api-enduser_invitations-enduser_users_GetSentInvites\n[2]: #api-enduser_notifications_emails-enduser_ResendInvite\n[3]: #api-enduser_invitations-enduser_users_AcceptInvites\n[4]: #api-enduser_invitations-enduser_users_DeclineInvites\n[5]: #api-enduser_users-enduser_SelfRegisterUsers","operationId":"createUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createUserInvitation"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createUserInvitationSuccess"},"examples":{"application/json":{"status":"Invitation successfully created.","data":{"id":"57cd5922d341df5812bbcb72","invitedPhoneNumber":"0390676767","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","authorizedReSendInvitationDate":"2016-09-28T17:31:36.879Z","acceptationDate":null,"status":"pending","type":"registration"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"email","msg":"Field email length must be between 3 and 255 characters."},{"param":"invitedUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"thisisnotavalidresourceid"},{"param":"email","msg":"Field email length must be between 3 and 255 characters."},{"param":"lang","msg":"Invalid field lang. Expected a language matching ISO 639-1 code format: 2 letters with possibility of regional variation","value":"wrongLanguage"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden: in the case the given email parameter is black-listed, a 403 Forbidden error is sent.","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"User inviteduser@company.com has limited rights and can't be invited for instance","errorDetailsCode":403509}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User inviteduser@company.com is already visible by logged in user, do not send invitation email","errorDetailsCode":409602}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/{invitationId}/decline":{"post":{"tags":["Invitations"],"summary":"Decline a user invitation","description":"This API can be used to decline an invitation sent by another Rainbow user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nInvited user is notified with an XMPP message that the invitation has been declined.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"update\" type='received' status='declined' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nInviting user is not notified and can't know that invited user has declined the invitation (it will still be listed as `pending` by API [GET /api/rainbow/enduser/v1.0/users/:userId/invitations/sent(?status=pending|accepted|auto-accepted|declined)][0]).   \n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/57cd5922d341df5812bbcb72/decline\n\n[0]: #api-enduser_invitations-enduser_users_GetSentInvites","operationId":"declineUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/declineUserInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","declinationDate":"2016-09-29T15:18:31.342Z","status":"declined","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User invitation 57cd5922d341df5812bbcb72 is already declined, not able to decline it","errorDetailsCode":409606}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/{invitationId}":{"delete":{"tags":["Invitations"],"summary":"Delete a user invitation","description":"This API can be used to delete an invitation sent to/received from another Rainbow user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nUser requesting deletion is notified with an XMPP message that the invitation has been deleted.   \nThe XMPP message is the following: \n\n* If the inviting user deletes the invitation:\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' **action=\"delete\"** **type='sent'** status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n* If the invited user deletes the invitation:\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' **action=\"delete\"** **type='received'** status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nNote that the invitation is not deleted on server side, it is simply hidden (the same database entry is used for both inviting and invited users). This allows the invitation to be still available to the other user if only one of the inviting / invited user delete the invitation for himself.   \n  \nExample: DELETE https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/57cd5922d341df5812bbcb72","operationId":"deleteUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteUserInvitationSuccess"},"examples":{"application/json":{"status":"Invitation 57cd5922d341df5812bbcb72 successfully deleted","data":{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","status":"pending","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to delete it.","errorDetailsCode":404002}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Invitations"],"summary":"Get a user invitation","description":"This API can be used to get an invitation sent/received by/from another Rainbow user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nThe user can only retrieve invitations for which he is the inviting user of the invited user.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/57cd5922d341df5812bbcb72","operationId":"getUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","authorizedReSendInvitationDate":"2016-09-28T17:31:36.879Z","acceptationDate":"2016-09-29T15:18:31.342Z","status":"pending","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User invitation 57cd5922d341df5812bbcb72 is already accepted, not able to accept it","errorDetailsCode":409605}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/received":{"get":{"tags":["Invitations"],"summary":"Get all user's received invitations","description":"This API can be used to retrieve the list of invitations received by the user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/received?status=pending","operationId":"getAllReceivedInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 573b46a305a4c22a19b216ce)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all invitations having the provided status(es)"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less invitation details in response. > - `small`: id, invitedUserId, invitedUserEmail, invitedPhoneNumber, invitingUserId, status > - `medium`: id, invitedUserId, invitedUserEmail, invitedPhoneNumber, invitingUserId, invitingUserEmail, status, invitingDate, acceptationDate, declinationDate > - `full`: all invitation fields"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getAllReceivedInvitationSuccess"},"examples":{"application/json":{"data":[{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","acceptationDate":null,"status":"pending","type":"visibility"},{"id":"57ecc8b97136e9265edc9614","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"57ecc845cf19081644641946","invitingUserEmail":"carol@other-company.com","requestedNotificationLanguage":"en","invitingDate":"2016-09-29T07:54:35.096Z","lastNotificationDate":"2016-09-29T07:54:35.093Z","acceptationDate":null,"status":"pending","type":"visibility"}],"limit":100,"offset":0,"total":2}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/sent":{"get":{"tags":["Invitations"],"summary":"Get all user's sent invitations","description":"This API can be used to retrieve the list invitations sent by the user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nInviting user can't know that invited user has declined the invitation: declined invitations are still listed as `pending`.   \n  \nExample 1: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/sent?status=pending   \nExample 2: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/sent?status=accepted&status=auto-accepted","operationId":"getAllSentInvition","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 573b46a305a4c22a19b216ce)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all invitations having the provided status(es)"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less invitation details in response. > - `small`: id, invitedUserId, invitedUserEmail, invitedPhoneNumber, invitingUserId, status > - `medium`: id, invitedUserId, invitedUserEmail, invitedPhoneNumber, invitingUserId, invitingUserEmail, status, invitingDate, acceptationDate, declinationDate > - `full`: all invitation fields"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getAllSentInvitionSuccess"},"examples":{"application/json":{"data":[{"id":"574ff57f3448af6c2940f90a","invitedUserId":"574ff5153448af6c2940f908","invitedUserEmail":"dan@other-company.com","invitingUserId":"573b46a305a4c22a19b216ce","invitingUserEmail":"bob@company.com","requestedNotificationLanguage":"de","invitingDate":"2016-09-23T09:46:32.881Z","lastNotificationDate":"2016-09-25T16:09:11.254Z","acceptationDate":"2016-09-29T07:54:35.096Z","status":"accepted","type":"visibility"},{"id":"574ff8f9301b38ca2990fe62","invitedUserEmail":"erin@third-company.com","invitingUserId":"573b46a305a4c22a19b216ce","invitingUserEmail":"bob@company.com","requestedNotificationLanguage":"en","invitingDate":"2016-09-25T16:54:35.096Z","lastNotificationDate":"2016-09-25T16:54:35.093Z","authorizedReSendInvitationDate":"2016-09-25T17:54:35.093Z","acceptationDate":null,"status":"pending","type":"visibility"},{"id":"5979f641ae6056aadd1a8f18","invitedPhoneNumber":"0390676767","invitingUserId":"573b46a305a4c22a19b216ce","invitingUserEmail":"bob@company.com","requestedNotificationLanguage":"en","lastNotificationDate":"2017-07-27T14:18:41.066Z","authorizedReSendInvitationDate":"2017-07-27T15:18:41.066Z","invitingDate":"2017-07-27T14:18:41.066Z","acceptationDate":null,"status":"pending","type":"registration"}],"limit":100,"offset":0,"total":3}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/invitations/{invitationId}/re-send":{"post":{"tags":["Invitations"],"summary":"Re-send a user invitation","description":"This API can be used to re-send a user invitation which has already been sent.   \n  \nLogged in user must be the one who sent the invitation (otherwise error 403 is returned).   \nAn invitation can only be re-sent after a given period since last notification (1 hour by default).   \nIf invitation is canceled or failed, it is set back to pending and then re-sent.   \nIf invitation is accepted or auto-accepted, error 409 is returned.   \nIf invitation is declined, it is set back to pending and re-sent if the last notification was sent since a given period (1 week by default).   \n  \nUsers are notified with an XMPP message that the invitation has been re-sent: \n\n* Inviting user side:\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' **action=\"re-send\"** **type='sent'** status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n* Invitied user side:\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' **action=\"re-send\"** **type='received'** status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/5821f986394c356580c3c86d/invitations/57cd5922d341df5812bbcb72/re-send","operationId":"resendUserInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Group unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/resendUserInvitation"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"UserHimself"},{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/resendUserInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"bob@company.com","invitingUserId":"5703d4829ccf39843c7ef89b","invitingUserEmail":"alice@my-company.com","requestedNotificationLanguage":"fr","invitingDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-10-03T10:22:12.431Z","authorizedReSendInvitationDate":"2016-10-03T11:22:12.431Z","acceptationDate":null,"status":"pending","type":"visibility"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"invitationId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"User invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to re-send invitation","errorDetailsCode":409604}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/invitations/{invitationId}/accept":{"post":{"tags":["Join Company Invitations"],"summary":"Accept a join company invitation","description":"This API allows to accept a join company invitation received by the user (invitation sent by admin using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][0]).   \n  \nTo accept the join company invitation, the user must be in default company (may evolve in the future)   \n  \nWhen the user accepts a join company invitation, he is notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"update\" id='582048dfe2e68a79f4979624' **status='accepted'** **type='received'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nAll company administrators are notified that the invitation has been accepted with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"update\" id='582048dfe2e68a79f4979624' **status='accepted'** **type='sent'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\nOnce accepted, invited user's `companyId` and `companyName` data are updated.   \nUser's XMPP vCard is also updated.   \nLike after a user profile update, a presence stanza is sent to user's resources and users being in user's roster. This allow clients to be notified that company of this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n  \n    <x xmlns='vcard-temp:x:update'>\n  \n        <data/>\n  \n    </x>\n  \n    <actor xmlns='jabber:iq:configuration'/x>\n  \n</presence>\n```\nIf invitation has flag invitedToBeCompanyAdmin set to true, user will join this company as company_admin (added role admin + adminType company_admin)   \nIf invitation has flag invitedToBeBpAdmin set to true, user will join this company as bp_admin (added role bp_admin)   \n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/join-companies/invitations/5819ed7c9547b313509237d6/accept \n\n[0]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite","operationId":"acceptJoinCompanyInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Join company invitation unique identifier (like 5819ed7c9547b313509237d6)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/acceptJoinCompanyInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","companyId":"5703d0d49ccf39843c7ef897","companyName":"Alcatel-Lucent Enterprise","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"invited.user@company.com","invitingAdminId":"5819e1fa290fd7584fb4bb73","invitingAdminLoginEmail":"admin@al-enterprise.fr","invitationDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","requestedNotificationLanguage":"fr-FR","status":"accepted","acceptationDate":"2016-11-17T08:42:31.136Z"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"JoinCompanyInvite with id 57cd5922d341df5812bbcb72 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Join company invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to accept it","errorDetailsCode":409605}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/invitations/{invitationId}/decline":{"post":{"tags":["Join Company Invitations"],"summary":"Decline a join company invitation","description":"This API allows to decline a join company invitation received by the user (invitation sent by admin using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][0]).   \n  \nInvitation must be pending (otherwise error 409 is returned).   \n  \nWhen the user declines a join company invitation, he is notified with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"update\" id='582048dfe2e68a79f4979624' **status='declined'** **type='received'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nAll company administrators are notified that the invitation has been declined with the following XMPP message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"update\" id='582048dfe2e68a79f4979624' **status='declined'** **type='sent'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/join-companies/invitations/5819ed7c9547b313509237d6/decline \n\n[0]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite","operationId":"declineJoinCompanyInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Join company invitation unique identifier (like 5819ed7c9547b313509237d6)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/declineJoinCompanyInvitationSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","companyId":"5703d0d49ccf39843c7ef897","companyName":"Alcatel-Lucent Enterprise","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"invited.user@company.com","invitingAdminId":"5819e1fa290fd7584fb4bb73","invitingAdminLoginEmail":"admin@al-enterprise.fr","invitationDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","requestedNotificationLanguage":"fr-FR","status":"declined","declinationDate":"2016-11-17T08:42:31.136Z"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"JoinCompanyInvite with id 5819ed7c9547b313509237d6 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Join company invitation 57cd5922d341df5812bbcb72 is no longer pending, not able to decline it","errorDetailsCode":409606}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/invitations/{invitationId}":{"get":{"tags":["Join Company Invitations"],"summary":"Get a join company invitation","description":"This API allows to get a join company invitation received by the user using its invitationId (invitation sent by admin using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][0]).   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/join-companies/invitations/5819ed7c9547b313509237d6\n\n[0]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite","operationId":"getJoinCompanyInvitationById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"invitationId","in":"path","required":true,"type":"string","description":"Join company invitation unique identifier (like 5819ed7c9547b313509237d6)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getJoinCompanyInvitationByIdSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","companyId":"5703d0d49ccf39843c7ef897","companyName":"Alcatel-Lucent Enterprise","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"invited.user@company.com","invitingAdminId":"5819e1fa290fd7584fb4bb73","invitingAdminLoginEmail":"admin@al-enterprise.fr","invitationDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","requestedNotificationLanguage":"fr-FR","status":"pending","declinationDate":null,"acceptationDate":null}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"JoinCompanyInvite with id 5819ed7c9547b313509237d6 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/invitations":{"get":{"tags":["Join Company Invitations"],"summary":"Get all join company invitations","description":"This API allows to list all join company invitations received by the user (invitations sent by admins using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][0]).   \n  \nWhen the user is invited to join a company by an administrator, he receives the following XMPP message to notify him that a join company invitation has been received: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"create\" id='582048dfe2e68a79f4979624' status='pending' type='received' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/join-companies/invitations?status=pending   \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/join-companies/invitations?status=accepted&status=auto-accepted \n\n[0]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite","operationId":"getJoinCompanyInvitations","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all join company invitations having the provided status(es)"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less invitation details in response.   \n- `small`: id, companyId, invitedUserId, invitedUserLoginEmail, invitingAdminId, status   \n- `medium`: id, companyId, companyName, invitedUserId, invitedUserLoginEmail, invitingAdminId, invitingAdminLoginEmail, status, lastNotificationDate, invitingDate, acceptationDate, declinationDate   \n- `full`: all join company invitation fields"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getJoinCompanyInvitationsSuccess"},"examples":{"application/json":{"data":[{"id":"57cd5922d341df5812bbcb72","companyId":"5703d0d49ccf39843c7ef897","companyName":"Alcatel-Lucent Enterprise","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"invited.user@company.com","invitingAdminId":"5819e1fa290fd7584fb4bb73","invitingAdminLoginEmail":"admin@al-enterprise.fr","invitationDate":"2016-09-28T16:31:36.881Z","lastNotificationDate":"2016-09-28T16:31:36.879Z","requestedNotificationLanguage":"fr-FR","status":"pending"},{"id":"57cd5922d341df5812bbcb73","companyId":"5703c52e7f5894a68dee8007","companyName":"Other company","invitedUserId":"573b46a305a4c22a19b216ce","invitedUserEmail":"invited.user@company.com","invitingAdminId":"5703c52de9aee38f8d70cc32","invitingAdminLoginEmail":"admin@other-company.fr","invitationDate":"2016-10-03T12:04:52.432Z","lastNotificationDate":"2016-10-03T12:04:52.430","requestedNotificationLanguage":"fr-FR","status":"pending"}],"limit":100,"offset":0,"total":2}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/requests/{joinCompanyRequestId}/cancel":{"post":{"tags":["Join Company Requests"],"summary":"Cancel a join company request","description":"This API can be used by logged in user to cancel a request to join a company he sent.   \n  \nRequest must be pending or declined (otherwise error 409 is returned).   \n  \nOnce request has been canceled, administrators won't be able to accept or decline it anymore.   \n  \nAll company admins are notified with an XMPP message that the request has been canceled: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/users/5819e52ccf95fa196aa3f38a/join-companies/requests/5819ed7c9547b313509237d6/cancel","operationId":"cancelJoinCompanyRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 5819e52ccf95fa196aa3f38a)"},{"name":"joinCompanyRequestId","in":"path","required":true,"type":"string","description":"Join company request unique identifier (like 5819ed7c9547b313509237d6)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/cancelJoinCompanyRequestSuccess"},"examples":{"application/json":{"data":{"id":"5819ed7c9547b313509237d6","requestingUserId":"5819e52ccf95fa196aa3f38a","requestingUserLoginEmail":"userindefaultcompany@default.fr","requestedCompanyId":"5703d0d49ccf39843c7ef897","requestedCompanyName":"Alcatel-Lucent Enterprise","requestedToCompanyAdmin":{"companyAdminId":"5819e1fa290fd7584fb4bb73","companyAdminLoginEmail":"admin@al-enterprise.fr"},"status":"canceled","requestedNotificationLanguage":"fr-FR","lastNotificationDate":"2016-11-02T13:43:24.338Z","requestingDate":"2016-11-02T13:43:24.339Z"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"404":{"description":"Not found"},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Join company request 5819ed7c9547b313509237d6 is no longer pending, not able to cancel it","errorDetailsCode":409607}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/requests/{joinCompanyRequestId}":{"get":{"tags":["Join Company Requests"],"summary":"Get a join company request","description":"This API allows to get a join company request sent by the user (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/requests][0]).   \n  \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL).   \nUser must be the one who sent the request (requestingUserId).   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/5819e52ccf95fa196aa3f38a/join-companies/requests/5819ed7c9547b313509237d6\n\n[0]: #api-enduser_join_company-enduser_RequestJoinCompany","operationId":"getJoinCompanyRequestById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 5819e52ccf95fa196aa3f38a)"},{"name":"joinCompanyRequestId","in":"path","required":true,"type":"string","description":"Join company request unique identifier (like 5819ed7c9547b313509237d6)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getJoinCompanyRequestByIdSuccess"},"examples":{"application/json":{"data":{"id":"5819ed7c9547b313509237d6","requestingUserId":"5819e52ccf95fa196aa3f38a","requestingUserLoginEmail":"userindefaultcompany@default.fr","requestedCompanyId":"5703d0d49ccf39843c7ef897","requestedCompanyName":"Alcatel-Lucent Enterprise","requestedToCompanyAdmin":{"companyAdminId":"5819e1fa290fd7584fb4bb73","companyAdminLoginEmail":"admin@al-enterprise.fr"},"status":"pending","requestedNotificationLanguage":"fr-FR","lastNotificationDate":"2016-11-02T13:43:24.338Z","requestingDate":"2016-11-02T13:43:24.339Z"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"JoinCompanyRequest with id 5819ed7c9547b313509237d6 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/requests":{"get":{"tags":["Join Company Requests"],"summary":"Get all join company requests","description":"This API allows to list all join company requests sent by the user (sent using API [POST /api/rainbow/enduser/v1.0/users/:userId/join-companies/requests][0]).   \n  \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/5819e52ccf95fa196aa3f38a/join-companies/requests\n\n[0]: #api-enduser_join_company-enduser_RequestJoinCompany","operationId":"getJoinCompanyRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 5819e52ccf95fa196aa3f38a)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less requests details in response. > - `small`: id, requestingUserId, requestedCompanyId, status > - `medium`: id, requestingUserId, requestingUserLoginEmail, requestedCompanyId, status, requestingDate > - `full`: all request fields"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all join company requests having the provided status(es)"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getJoinCompanyRequestsSuccess"},"examples":{"application/json":{"data":[{"requestingUserId":"5819e52ccf95fa196aa3f38a","requestedCompanyId":"5703d0d49ccf39843c7ef897","status":"pending","id":"581b462962a8047f81f84889"}],"limit":100,"offset":0,"total":1}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"post":{"tags":["Join Company Requests"],"summary":"Request to join a company","description":"This API allows logged in user to send a request to join a company.   \n  \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL).   \nUser must be in **Default** company and have only `user` role.   \n  \nThis API can be called with one of these three parameters, depending of the use case: \n\n* `requestedCompanyId`: in the case the company can be found by the user (public company), the user can send the join company request directly using the companyId of the requested company.   \nIn that case, all users having role/admin type company_admin for the requested company will be notified (they will receive an email and a XMPP message (see below)).\n* `requestedCompanyAdminId`: in the case the company can not be found by the user (private company), the user must know the loginEmail of a company_admin of the company he wants to join.   \nHe will first have to invite this company_admin by email (invite user process, see API [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user][0]).   \nOnce the company_admin will be in user's contact, he will be able to request to join company_admin's company using company_admin id.   \nAll users having role/admin type company_admin for the requested company_admin's company will be notified (they will receive an email and a XMPP message (see below)).\n* `requestedCompanyLinkId`: in the case the user received a joinCompanyLink Id from a company admin (generated with [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/links][1]), he can use it to send the join company request to the associated company.   \nAll users having role/admin type company_admin for the company associated to the joinCompanyInvite will be notified (they will receive an email and a XMPP message (see below)).\n\nThe XMPP message company_admins receive when a user send a join company request is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_user@openrainbow.com'\n  \n        to='jid_company_admin@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"create\" id='5819ed7c9547b313509237d6' status='pending' type='received' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\nAll company's company_admins will be able to: \n\n* list of all join company requests received for their company with the API [GET /api/rainbow/admin/v1.0/companies/:companyId/join-companies/requests(?status=pending|accepted|declined|canceled)][2]\n* get a given join company request with the API [GET /api/rainbow/admin/v1.0/companies/:companyId/join-companies/requests/:joinCompanyRequestId][3]\n* accept a join company request using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/requests/:joinCompanyRequestId/accept][4]  \nOnce accepted, requesting user is moved from Default company to the requested company.   \nThe following XMPP message is sent to requesting user: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_user@openrainbow.com'\n  \n        to='jid_company_admin@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' **status='accepted'** **type='received'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nThe following XMPP message is sent to all company's company_admins (including the administrator who accepted the request if superadmin, organisation_admin or bp_admin): \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_user@openrainbow.com'\n  \n        to='jid_company_admin@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' **status='accepted'** **type='sent'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n* decline a join company request using API [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/requests/:joinCompanyRequestId/decline][5]  \nThe following XMPP message is sent to requesting user: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_user@openrainbow.com'\n  \n        to='jid_company_admin@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' **status='declined'** **type='sent'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nThe following XMPP message is sent to all company's company_admins (including the administrator who declined the request if superadmin, organisation_admin or bp_admin): \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_user@openrainbow.com'\n  \n        to='jid_company_admin@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"update\" id='5819ed7c9547b313509237d6' **status='declined'** **type='received'** xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nOnce the join company request has been declined, requesting user won't be able to re-sent a join company request to this company.   \nCompany's company_admin are able to accept a declined request using accept API.\n\nUser requesting to join a company is able to: \n\n* list all join company requests he sent, with their status, using the API [GET /api/rainbow/enduser/v1.0/users/:userId/join-companies/requests(?status=pending|accepted|declined)][6]\n* get a join company request he sent, using the API [GET /api/rainbow/enduser/v1.0/users/:userId/join-companies/requests/:joinCompanyRequestId][7]\n* re-send a join company request notification to all company's company_admins (only by email) using API [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user/:invitationId/re-send][8]\n\n\n[0]: #api-notifications_emails-enduser_InviteByEndUser\n[1]: /admin/#api-join_companies_links-PostJoinCompaniesLinks\n[2]: /admin/#api-join_company_requests-GetJoinCompanyRequests\n[3]: /admin/#api-join_company_requests-GetJoinCompanyRequestById\n[4]: /admin/#api-join_company_requests-PostAcceptJoinCompanyReq\n[5]: /admin/#api-join_company_requests-PostDeclineJoinCompanyReq\n[6]: #api-enduser_join_company-enduser_GetJoinCompanyRequests\n[7]: #api-enduser_join_company-enduser_GetJoinCompanyRequestById\n[8]: #api-enduser_notifications_emails-enduser_ResendInvite","operationId":"sendJoinCompanyRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 5819e52ccf95fa196aa3f38a)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendJoinCompanyRequest"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendJoinCompanyRequestSuccess"},"examples":{"application/json":{"status":"Join company request notification successfully sent","data":{"id":"5819ed7c9547b313509237d6","requestingUserId":"5819e52ccf95fa196aa3f38a","requestingUserLoginEmail":"userindefaultcompany@default.fr","requestedCompanyId":"5703d0d49ccf39843c7ef897","requestedCompanyName":"Alcatel-Lucent Enterprise","requestedToCompanyAdmin":{"companyAdminId":"5819e1fa290fd7584fb4bb73","companyAdminLoginEmail":"admin@al-enterprise.fr"},"requestedFromJoinCompanyLinkId":"581b60cb0de6524c86be4b42","status":"pending","requestedNotificationLanguage":"fr-FR","lastNotificationDate":"2016-11-02T13:43:24.338Z","requestingDate":"2016-11-02T13:43:24.339Z"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":"Only one of requestedCompanyId, requestedCompanyAdminId or requestedCompanyLinkId parameters must be provided","errorDetailsCode":400451}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Not found","errorDetails":"No company admin found for company 5703d0d49ccf39843c7ef897, not able to send the join company request","errorDetailsCode":404650}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Logged in user has already sent a request to join company 5703d0d49ccf39843c7ef897, do not send request again","errorDetailsCode":409650}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/join-companies/requests/{joinCompanyRequestId}/re-send":{"post":{"tags":["Join Company Requests"],"summary":"Re-send a join company request","description":"This API can be used by logged in user to re-send a request to join a company.   \n  \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL).   \nUser must be in **Default** company and have only `user` role.   \n  \nIf request is canceled or declined, it is set back to pending and then re-sent.   \nIf request is accepted or auto-accepted, error 409 is returned.   \n  \nAll company admins will receive a new email notification.   \nAll company admins are notified with an XMPP message that the request has been re-sent: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyrequest action=\"re-send\" id='5819ed7c9547b313509237d6' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/users/5819e52ccf95fa196aa3f38a/join-companies/requests/5819ed7c9547b313509237d6/re-send","operationId":"resendJoinCompanyRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 5819e52ccf95fa196aa3f38a)"},{"name":"joinCompanyRequestId","in":"path","required":true,"type":"string","description":"Join company request unique identifier (like 5819ed7c9547b313509237d6)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/resendJoinCompanyRequestSuccess"},"examples":{"application/json":{"data":{"id":"5819ed7c9547b313509237d6","requestingUserId":"5819e52ccf95fa196aa3f38a","requestingUserLoginEmail":"userindefaultcompany@default.fr","requestedCompanyId":"5703d0d49ccf39843c7ef897","requestedCompanyName":"Alcatel-Lucent Enterprise","requestedToCompanyAdmin":{"companyAdminId":"5819e1fa290fd7584fb4bb73","companyAdminLoginEmail":"admin@al-enterprise.fr"},"status":"pending","requestedNotificationLanguage":"fr-FR","lastNotificationDate":"2016-11-02T13:43:24.338Z","requestingDate":"2016-11-02T13:43:24.339Z"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"404":{"description":"Not found"},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Join company request 5819ed7c9547b313509237d6 is no longer pending, not able to re-send request","errorDetailsCode":409604}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/notifications/im":{"post":{"tags":["Notifications Im"],"summary":"Send an IM to a Rainbow user","description":"This API allows to send an instant message (IM) from the logged in user to another Rainbow user.","operationId":"sendIm","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendIm"}}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendImSuccess"},"examples":{"application/json":{"status":"IM successfully sent","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/notifications/emails/offline":{"post":{"tags":["Notifications Emails"],"summary":"Ask a user offline to connect again via an email","description":"This API allows to warn a user to answer to an IM, when this other user is to slow to answer. We have to wait a while before sending this email. (default: 15 days. Rainbow parameter) We have also to wait a while between two attempts. (default: 7 days. Rainbow parameter) These parameters are available through user's settings API.","operationId":"sendOfflineUserConnectionRequestByEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendOfflineUserConnectionRequestByEmail"}}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendOfflineUserConnectionRequestByEmailSuccess"},"examples":{"application/json":{"status":"Offline email successfully sent","data":{"email":"bob@mycompany.com"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden: in the case too many offline requests are done for same userId, a 403 Forbidden error is sent.","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":{"errorMsg":"Sending an offline mail to user@company.com email is blocked by himself"},"errorDetailsCode":403535}}},"404":{"description":"Resource Not Found: in the case no user was found,","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Can't find resource UserId with given id 56fa724d5de5ae5d4bdf3b8f.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/notifications/emails/reset-password":{"post":{"tags":["Notifications Emails"],"summary":"Reset-password email","description":"This API allows to send a reset-password email to a user. A temporary user token is generated and send in the email body. This token is required in the reset password validation workflow (see documentation of related API: (PUT /api/rainbow/enduser/v1.0/users/:userId/reset-password) for more information).**Note: A rainbow user with the role 'guest' can't reset his password**","operationId":"sendResetPasswordEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendResetPasswordEmail"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendResetPasswordEmailSuccess"},"examples":{"application/json":{"status":"Reset-password email successfully sent","data":{"email":"bob@mycompany.com"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"email","msg":"Field email is mandatory."},{"param":"email","msg":"Field email length must be between 3 and 255 characters."},{"param":"email","msg":"Invalid field email. Expected an email string matching the regexp described into field documentation"},{"param":"lang","msg":"Field email length must be between 1 and 7 characters."}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden: in the case too many reset password requests are done for same email address, a 403 Forbidden error is sent.","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Reset password is forbidden for a guest","errorDetailsCode":403532}}},"404":{"description":"Resource Not Found: in the case no user was found for the given email parameter,\na 404 Resource Not Found error is sent.","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"No user found with email userdoesnotexist@company.com, not able to send reset password email","errorDetailsCode":404100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/notifications/emails/self-register":{"post":{"tags":["Notifications Emails"],"summary":"Self-register email","description":"This API allows to send a self-register email to a user. A temporary user token is generated and send in the email body. This token is required in the self register validation workflow (see documentation of related API: ([POST /api/rainbow/enduser/v1.0/users/self-register][0]) for more information).\n\n[0]: #api-enduser_users-enduser_SelfRegisterUsers","operationId":"sendSelfRegisterEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendSelfRegisterEmail"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendSelfRegisterEmailSuccess"},"examples":{"application/json":{"status":"Self-register email successfully sent","data":{"email":"user@company.com"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"email","msg":"Field email is mandatory."},{"param":"email","msg":"Field email length must be between 3 and 255 characters."},{"param":"email","msg":"Invalid field email. Expected an email string matching the regexp described into field documentation"},{"param":"lang","msg":"Field email length must be between 1 and 7 characters."}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden: in the case the given email parameter is black-listed, a 403 Forbidden error is sent.","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":{"errorMsg":"Registration associated to user@company.com email is temporary blocked until 2017-06-01T17:47:07.904Z","date":"2017-06-01T17:47:07.904Z"},"errorDetailsCode":403530}}},"409":{"description":"Conflict: in the case a user already exist with the given email parameter, a 409 Conflict error is sent.","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"A user with email user@company.com already exist, not able to send self register email","errorDetailsCode":409600}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/change-password":{"put":{"tags":["Password"],"summary":"Update user password","description":"This API can be used to update password of logged in user. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nNote than when user password is changed, all its previously generated JWT are revoked and jid_password of its jid_im and jid_tel is updated with a new password. All connected jid_im and jid_tel resources are also disconnected.   \nTherefore, clients have to login again with this user in order to retrieve a new valid JWT and its new jid_password.   \n  \nThe following XMPP message is sent to user's jid_im to warn that the password has changed: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\" type=\"management\"\n    from=\"pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532\"\n    to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"\n    xmlns=\"jabber:client\">\n    <userpassword action=\"update\" xmlns=\"jabber:iq:configuration\"\n</message>\n```\n","operationId":"changePassword","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)."},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/changePassword"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/changePasswordSuccess"},"examples":{"application/json":{"status":"Password successfully updated for user 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"newPassword","msg":"Invalid field newPassword. Expected a password matching the following rules: length must be between 8 and 64 characters, and contain at least 1 lowercase, 1 uppercase, 1 number and 1 special character","value":"invalidpassword"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/reset-password":{"put":{"tags":["Password"],"summary":"Reset user password","description":"This API can be used by a user to reset his password (i.e. change his password when he does not remember his current password).   \nThis API requires a temporary user token to validate that this is well the user who reset his password.   \nClients have to first call POST /api/rainbow/enduser/v1.0/notifications/emails/reset-password so that user receive an email with a temporary token.   \nUser enters this token and his new password, and Clients have to call PUT /api/rainbow/enduser/v1.0/users/:userId/reset-password with this code and the new password.   \n  \nNote than when user password is reset, all user's previously generated JWT are revoked and jid_password of its jid_im and jid_tel is updated with a new password. All connected jid_im and jid_tel resources are also disconnected.   \nTherefore, clients have to login again with this user in order to retrieve a new valid JWT and its new jid_password.   \n  \nThe following XMPP message is sent to user's jid_im to warn that the password has changed: \n\n    \n```html\n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\" type=\"management\"\n    from=\"pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532\"\n    to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"\n    xmlns=\"jabber:client\">\n    <userpassword action=\"update\" xmlns=\"jabber:iq:configuration\"\n</message>\n```\n","operationId":"resetPassword","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/resetPassword"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/resetPasswordSuccess"},"examples":{"application/json":{"status":"Password successfully updated for user 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":"Temporary token must be renewed","errorDetailsCode":401601}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id user1@company.com does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/{presenceReqId}/accept":{"post":{"tags":["Presences"],"summary":"Accept to share my presence with somebody of my network","description":"This API can be used to accept the request from another Rainbow user of my network, to share XMPP presence.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nOnce the proposal is accepted: \n\n* The roster of the two users is updated to take in account the presence sharing.\n* The presence request is updated in the database\n* Both users are notified with an XMPP message that the presence sharing has been accepted.   \nFor requesting user, type is `sent`.   \nFor requested user, type is `received`.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"update\" type='received' status='accepted' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/presences/57cd5922d341df5812bbcb72/accept","operationId":"acceptPresenceSharing","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"presenceReqId","in":"path","required":true,"type":"string","description":"PresenceReq unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/acceptPresenceSharingSuccess"},"examples":{"application/json":{"data":{"requestDate":"2018-04-03T11:43:28.463Z","acceptationDate":"2018-04-03T11:45:20.463Z","status":"accepted","fromUserId":"57ff50a8f83ddab225994bee","toUserId":"57ff4cdff83ddab225994bea","id":"5ac368e07512636e7ac02810"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Presence request 57cd5922d341df5812bbcb72 is already accepted, not able to accept it","errorDetailsCode":409663}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/{presenceReqId}/cancel":{"post":{"tags":["Presences"],"summary":"Cancel a presence request submitted to a user of my network","description":"This API can be used by a user to cancel a submitted request to share the XMPP presence with another user of his network.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL) \n\n* Presence request can only be canceled when it is pending and belongs to the logged in user.\n* It is removed in the database\n* Requesting and requested user are notified with an XMPP message that the presence request has been declined.   \n  \nRequesting and requested user are notified with an XMPP message that the presence request has been canceled.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='sent' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nThe asked user is also notified that the presence request has been canceled with the following message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='received' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/presences/57cd5922d341df5812bbcb72/cancel","operationId":"cancelSubmittedPresenceSharingRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"presenceReqId","in":"path","required":true,"type":"string","description":"PresenceReq unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/cancelSubmittedPresenceSharingRequestSuccess"},"examples":{"application/json":{"data":{"requestDate":"2018-04-03T11:42:28.541Z","acceptationDate":null,"status":"canceled","fromUserId":"57ff50a8f83ddab225994bee","toUserId":"57ff4ff1f83ddab225994bec","id":"5ac368a47512636e7ac0280f"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"PresenceRequest with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/{presenceReqId}/decline":{"post":{"tags":["Presences"],"summary":"Decline to share my presence with somebody of my network","description":"This API can be used to decline the request from another Rainbow user of my network, to share XMPP presence.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL) \n\n* Presence request can only be declined when it is pending and submitted to the logged in user.\n* It is removed in the database\n* Requesting and requested user are notified with an XMPP message that the presence request has been declined.   \nThe logged in user is notified that the presence request has been declined (multi-device purpose) with the following message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='received' status='declined' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nThe requesting user get the message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='sent' status='declined' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/presences/57cd5922d341df5812bbcb72/decline","operationId":"declinePresenceSharingRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"presenceReqId","in":"path","required":true,"type":"string","description":"PresenceReq unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/declinePresenceSharingRequestSuccess"},"examples":{"application/json":{"data":{"requestDate":"2018-04-03T11:34:01.205Z","acceptationDate":null,"status":"declined","fromUserId":"57ff50a8f83ddab225994bee","toUserId":"57ff4e54f83ddab225994beb","id":"5ac366a97512636e7ac0280e"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/{presenceReqId}":{"get":{"tags":["Presences"],"summary":"Get presence request between two users","description":"This API can be used to get a presence request, sent or received, by or from another Rainbow user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nThe user can only retrieve presence request for which he is the submitter or the receiver.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/presences/57cd5922d341df5812bbcb72","operationId":"getPresenceSharingRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"presenceReqId","in":"path","required":true,"type":"string","description":"PresenceReq unique identifier (like 57b44e9c0c32e0b425252f9e)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getPresenceSharingRequestSuccess"},"examples":{"application/json":{"data":{"id":"57cd5922d341df5812bbcb72","fromUserId":"573b46a305a4c22a19b216ce","toUserId":"5703d4829ccf39843c7ef89b","requestDate":"2016-09-28T16:31:36.881Z","declinationDate":null,"cancellationDate":null,"status":"pending"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"presenceReqId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"PresenceRequest with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/received":{"get":{"tags":["Presences"],"summary":"Get all presence requests received from users of my network","description":"This API can be used to retrieve the list of presence requests received by the user from other users of his network.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \nBy default results are sorted by the 'requestDate' field.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/5703d4829ccf39843c7ef89b/presences/received?status=pending","operationId":"getReceivedPresenceSharingRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 573b46a305a4c22a19b216ce)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all presence requests having the provided status(es) When the presence request is canceled or declined, it is deleted in the database, then `canceled` an `declined` status are not available."},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less presence request details in response. > - `small`: id, fromUserId, toUserId, status, requestDate > - `medium`: id, fromUserId, toUserId, status, requestDate, acceptationDate > - `full`: all presence request fields"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getReceivedPresenceSharingRequestsSuccess"},"examples":{"application/json":{"data":[{"id":"57cd5922d341df5812bbcb72","fromUserId":"573b46a305a4c22a19b216ce","toUserId":"5703d4829ccf39843c7ef89b","requestDate":"2016-09-28T16:31:36.881Z","acceptationDate":null,"status":"pending"}],"limit":100,"offset":0,"total":1}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"status[0]","msg":"Invalid field status[0]. Expected a string being one of the following values:  [ 'pending', 'accepted' ]","value":"declined"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/sent":{"get":{"tags":["Presences"],"summary":"Get all presence requests sent to users of my network","description":"This API can be used to retrieve the list of presence requests sent by the user to other users of his network.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \nBy default results are sorted by the 'requestDate' field.   \n  \nExample 1: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/invitations/sent?status=pending","operationId":"getSentPresenceSharingRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 573b46a305a4c22a19b216ce)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"status","in":"query","required":false,"type":"string","description":"List all invitations having the provided status(es) When the presence request is canceled or declined, it is deleted in the database, then `canceled` an `declined` status are not available."},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less presence request details in response. > - `small`: id, fromUserId, toUserId, status, requestDate > - `medium`: id, fromUserId, toUserId, status, requestDate, acceptationDate > - `full`: all presence request fields"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getSentPresenceSharingRequestsSuccess"},"examples":{"application/json":{"data":[{"id":"57cd5922d341df5812bbcb72","fromUserId":"573b46a305a4c22a19b216ce","toUserId":"5703d4829ccf39843c7ef89b","requestDate":"2016-09-28T16:31:36.881Z","acceptationDate":null,"status":"pending"}],"limit":100,"offset":0,"total":1}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"status[0]","msg":"Invalid field status[0]. Expected a string being one of the following values:  [ 'pending', 'accepted' ]","value":"declined"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences":{"post":{"tags":["Presences"],"summary":"Create a presence requests to a users of my network","description":"This API allows logged in user to ask another user of his network to share their XMPP presence.   \nRequesting and requested user are notified with an XMPP message that the presence request has been submitted.   \n  \nRequesting user receives the following message. \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"create\" type='sent' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n  \nRequested user is also notified that a presence request is pending with the following message: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"create\" type='received' status='pending' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n","operationId":"sendPresenceSharingRequest","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendPresenceSharingRequest"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendPresenceSharingRequestSuccess"},"examples":{"application/json":{"data":{"fromUserId":"57ff50a8f83ddab225994bee","toUserId":"57ff4e54f83ddab225994beb","requestDate":"2018-04-03T11:34:01.205Z","acceptationDate":null,"status":"pending","id":"5ac366a97512636e7ac0280e"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User Id with id 57ff50a8f83ddab225994123 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"A Presence request to jon@openrainbow.net has been already sent by logged in user, do not send request again","errorDetailsCode":409661}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/presences/{presenceReqId}/interrupt":{"post":{"tags":["Presences"],"summary":"Stop sharing my presence with somebody of my network","description":"This API can be used to stop sharing XMPP presence after having accepted the request from another Rainbow user of my network, to share my presence.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nOnce the proposal is accepted: \n\n* The roster of the two users is updated to take in account the stop of presence sharing.\n* The presence request is deleted in the database\n* Both users are notified with an XMPP message that the presence sharing has been interrupted.   \nFor requesting user, type is `sent`.   \nFor requested user, type is `received`.   \nThe XMPP message is the following: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='received' status='interrupted' xmlns='jabber:iq:configuration'/>\n  \n </message>\n```\n\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/573b46a305a4c22a19b216ce/presences/57cd5922d341df5812bbcb72/accept","operationId":"stopPresenceSharing","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"presenceReqId","in":"path","required":true,"type":"string","description":"PresenceReq unique identifier (like 57b44e9c0c32e0b425252f9e)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/stopPresenceSharingSuccess"},"examples":{"application/json":{"data":{"requestDate":"2018-04-03T11:43:28.463Z","acceptationDate":"2018-04-03T11:45:20.463Z","status":"interrupted","fromUserId":"57ff50a8f83ddab225994bee","toUserId":"57ff4cdff83ddab225994bea","id":"5ac368e07512636e7ac02810"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"UserInvite with id 569ce8c8f9336c471b98eda1 does not exist, not able to update it.","errorDetailsCode":404001}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Presence request 57cd5922d341df5812bbcb72 is always pending, not able to interrupt it","errorDetailsCode":409663}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/profiles":{"get":{"tags":["Profile"],"summary":"Get user profiles","description":"This API can be used to get user profiles.   \n  \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/profiles","operationId":"getUserProfiles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserProfilesSuccess"},"examples":{"application/json":{"data":[{"subscriptionId":"5808b655a55a36d354f75cbe","offerId":"58079ed2041fa586e92337cd","offerName":"Essential","profileId":"580777f56fbd22a442d4fb57","profileName":"Essential 01","status":"active","isDefault":true,"assignationDate":"2016-10-12T09:54:12.634Z"},{"subscriptionId":"5808afeb4372eb19547e90cf","offerId":"58072f646237427a3687dc90","offerName":"Professional","profileId":"57cd90ddc04fd92e232ae258","profileName":"Professional 01","status":"active","isDefault":false,"assignationDate":"2016-10-24T14:11:50.641Z"}]}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 57b44e9c0c32e0b425252f9a does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/profiles/features":{"get":{"tags":["Profile"],"summary":"Get user profiles features","description":"This API can be used to get features associated to the user through its profiles.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nUser can be assigned to several profiles (if his company has subscribed to commercial offers linked to these profiles, and if an admin has assigned these profiles to the user).   \nBy default, user is at least assigned to the subscription of his company to the default offer (i.e. Essential).   \n  \nEach profile has his own list of features with his own values.   \nThis API allows to aggregate all features from all user's profiles.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/profiles/features","operationId":"getUserProfilesFeatures","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserProfilesFeaturesSuccess"},"examples":{"application/json":{"data":[{"featureId":"580773787853994e42d90f0b","featureUniqueRef":"COMPANY_ADMIN_ALLOWED_NB","featureName":"Company admin","featureType":"number","limitMax":10,"addedDate":"2017-02-16T11:22:54.270Z","lastUpdateDate":"2017-02-16T11:22:54.270Z"},{"featureId":"580e02660f3cce8315072656","featureUniqueRef":"PBX_TRANSFER_ENABLED","featureName":"PBX Transfer","featureType":"boolean","isEnabled":true,"addedDate":"2017-02-16T11:23:29.296Z","lastUpdateDate":"2017-02-16T11:23:29.296Z"}]}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"No profiles found for user  57b44e9c0c32e0b425252f9a","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/profiles/{profileId}":{"get":{"tags":["Rainbow Profiles"],"summary":"Get a profile","description":"This API allows to retrieve details about a given profile.   \n  \nUsers can only retrieve profile on which they are assigned.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/profiles/5745b147f0674c7c43417997","operationId":"getRainbowProfileById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"profileId","in":"path","required":true,"type":"string","description":"Profile unique identifier."},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRainbowProfileByIdSuccess"},"examples":{"application/json":{"data":{"id":"57cd90ddc04fd92e232ae258","name":"Professional","description":"Professional profile","creationDate":"2016-10-17T16:45:42.451","featuresList":[{"featureId":"5745b14694397864437b84a8","featureName":"Company admin","featureUniqueRef":"COMPANY_ADMIN_ALLOWED_NB","featureType":"number","addedDate":"2016-10-17T16:46:52.414","lastUpdateDate":"2016-10-17T16:46:52.414","limit_max":100},{"featureId":"5745b147f0674c7c43417997","featureName":"PBX Conference","featureUniqueRef":"PBX_CONFERENCE_ENABLED","featureType":"boolean","addedDate":"2016-10-17T16:48:12.251","lastUpdateDate":"2016-10-17T16:48:12.251","isEnabled":true}]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/avatar":{"delete":{"tags":["Rooms Avatar"],"summary":"Delete room avatar","description":"This API can be used to delete avatar image for the given roomId.   \nThis API can only be used by one room's moderator.   \n  \nWhen an avatar is deleted, the field `lastAvatarUpdateDate` of the room is set to null.   \nUser vCard is also updated: the `PHOTO` element is removed and the `LASTAVATARUPDATE` element is set to empty.   \n  \nA message stanza with the attribute lastAvatarUpdateDate:null is sent to all room users. This allow clients to be notified the avatar is no more available when they join the room: \n\n    &lt;message\n               \n       from= 'a portal client connected'\n               \n       to='room user jid'\n               \n       id='lh2bs617'\n               \n       type='management'\n               \n       xmlns: 'jabber :client' &gt;\n               \n       &lt;room&gt;\n               \n           roomid=\"mongoid of the room\"\n               \n           roomjid=\"jid of the room\"\n               \n           lastAvatarUpdateDate=null\n               \n           xmlns=\"jabber:iq:configuration\"\n               \n           action=\"delete\"\n               \n       /&gt;\n               \n       &lt;/message&gt;\n             \n\n","operationId":"deleteRoomAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteRoomAvatarSuccess"},"examples":{"application/json":{"status":"Avatar successfully deleted for room 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user alice.smith@al-enterprise.com does not have 'administrator' role (user) or 'moderator' privilege inside the room (user)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"No avatar found for user 56c5c19f94141765119f896c","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"post":{"tags":["Rooms Avatar"],"summary":"Upload room avatar","description":"This API can be used to upload avatar image for the given roomId. This API can only be used by one room's moderator.   \nRules: \n\n* Avatar file has to be sent directly in http body (no JSon).\n* Only **jpeg, jpg and png** files are supported. Appropriate content-type has to be set (image/jpeg or image/png).\n* If room already has an avatar, the existing one is overwritten.\n* By default, avatar file size is limited to 4194304 bytes (4 MB) (this limit can be changed by integration team in enduser portal config file).\n* When an avatar is uploaded, the field `lastAvatarUpdateDate` of the room is updated to the current date.\n* A message stanza with the lastAvatarUpdateDate is sent to all room users. This allow clients to be notified of the up-to-date room avatar when they join the room: \n\n    \n```html\n<message\n           \n       from= 'a portal client connected'\n           \n       to='room user jid'\n           \n       id='lh2bs617'\n           \n       type='management'\n           \n       xmlns: 'jabber :client' >\n           \n       <room>\n           \n           roomid=\"mongoid of the room\"\n           \n           roomjid=\"jid of the room\"\n           \n           lastAvatarUpdateDate=\"Fri Aug 18 2017 15:36:12 GMT+0200 (CEST)\"\n           \n           xmlns=\"jabber:iq:configuration\"\n           \n           action=\"update\"\n           \n       />\n           \n       </message>\n         \n```\n","operationId":"uploadRoomAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/uploadRoomAvatarSuccess"},"examples":{"application/json":{"status":"Avatar successfully set for room 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":"Avatar format not managed. Got file with type bmp, supported file types: jpeg,jpg,png","errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user alice.smith@al-enterprise.com does not have 'administrator' role (user) or 'moderator' privilege inside the room (user)","errorDetailsCode":403000}}},"413":{"description":"Request Entity Too Large","examples":{"application/json":{"errorCode":413,"errorMsg":"Request Entity Too Large","errorDetails":"File too large. Max size allowed for this file is 4194304 bytes","errorDetailsCode":413000,"maxSize":4194304}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/room-avatar/{roomId}":{"get":{"tags":["Rooms Avatar"],"summary":"Get room's avatar","description":"This API can be used to retrieve room's avatar.   \nExample: GET https://openrainbow.com/api/room-avatar/56c5c19f94141765119f896c?size=128   \n  \nClients can request avatars in a given size by specifying size query string parameter.   \nAvatar file can be resized from 1px to its original resolution, with a maximum of 512px: \n\n* If no size option is requested, avatar is returned by default with resolution of 80px.\n* Max requestable size is 512. If a higher resolution is requested, the default size is returned instead, i.e. 80px.\n* Original avatars resolution can't be increased. If uploaded avatar size is 128 x 128 px, even is client request avatar with size 256, the original avatar file will be returned (128px).\n\n","operationId":"getRoomAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"size","in":"query","required":false,"type":"number","description":"Specify avatar size in pixels (square size x size)."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRoomAvatarSuccess"}},"404":{"description":"Not found"}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/conferences/{confId}":{"get":{"tags":["Rooms Conference"],"summary":"Get shared conference data","description":"If the logged in user is not register into the wanted room , a forbidden error is sent. Gives less data than the [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}][0]). \n\n[0]: /conf-provision/#api-conferences-GetConference","operationId":"getSharedConference","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"confId","in":"path","required":true,"type":"string","description":"Conference unique identifier"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getSharedConferenceSuccess"},"examples":{"application/json":{"data":{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"confEndUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not registered inside the roomId(56fa95147b48e0c956103b9c)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room Conf endPoint with id 57ff5022f83ddab225994001 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"delete":{"tags":["Rooms Conference"],"summary":"Stop sharing a conference","description":"Only an active moderator is allowed to remove it from the room. (privilege='moderator', status='active')  \nIf the conference to delete is not registered, a (404) conflict error is sent.  \n  \nA message stanza is sent to room users as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's display name stop to share an end point in the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'conferenceRemove'\n  \n             userId: 'userId of the owner of the conference end point' />\n  \n</message>\n```\n","operationId":"stopConferenceSharing","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"name":"confId","in":"path","required":true,"type":"string","description":"Conference unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"mediaType","in":"query","required":true,"type":"string","description":"{pstnAudio, webrtc} : If not defined a pstnAudio is taken as default value"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/stopConferenceSharingSuccess"},"examples":{"application/json":{"status":"Conference 56f9777e0e5e7d7535a48fa2 successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"confEndUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not the owner of the conference end point (57ff5022f83ddab225994000)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room Conf endPoint with id 57ff5022f83ddab225994001 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/conferences/{confId}/invitations":{"post":{"tags":["Rooms Conference"],"summary":"Notify users to join a conference","description":"Send a notification for users to join a conference. Mainly the notification is a mail indicating the conference phone number. Furthermore an XMPP event could be sent.","operationId":"sendJoinConferenceInvitationEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"confId","in":"path","required":true,"type":"string","description":"Conference unique identifier"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendJoinConferenceInvitationEmail"}}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess"},"examples":{"application/json":{"status":"Invitations successfully sent","failed":{"invalidUsers":["56c5229f94141744119f000c"]},"confEndPoint":{"phoneNumbers":[{"location":"Austria, Graz","locationcode":"AUTGRA","number":"+43 316 218 875 044"},{"location":"Belgium, Brussels","locationcode":"BELBSL","number":"+32 2 300 1989"},{"location":"Japan","locationcode":"JPNJPN","number":"0120 451 555"}],"passCodes":[{"name":"ModeratorPassCode","value":"8534260816"},{"name":"ParticipantPassCode","value":"3431467250"},{"name":"SecurityCode","value":null},{"name":"ListenOnlyPassCode","value":"5260332592"}]},"attendees":{"usersRainbow":[{"loginEmail":"alice.denice@al-enterprise.com","jid_im":"9aeae4b30c394a5ba458fad09d7924f3@francky-all-in-one-dev-1.opentouch.cloud","lastName":"DENICE","firstName":"Alice","language":"fr","country":"FRA","displayName":"Alice DENICE","id":"5988590c66e532b662f570d0"}],"guests":[{"loginEmail":"myguest@yopmail.com"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"confEndUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not registered inside the roomId(56fa95147b48e0c956103b9c)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room Conf endPoint with id 57ff5022f83ddab225994001 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"delete":{"tags":["Rooms Conference"],"summary":"Notify users cancel conference","description":"Send a notification to users that a scheduled meeting is cancelled. The notification is a mail. ","operationId":"sendScheduledMeetingCancelationEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"confId","in":"path","required":true,"type":"string","description":"Conference unique identifier"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmail"}},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"content-type","in":"header","required":true,"type":"string","description":"application/json"},{"name":"noMail","in":"query","required":false,"type":"boolean","description":"Bypass emails delivery. Supply instead all data available to build custom emails"}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess"},"examples":{"application/json":{"status":"Cancellation successfully sent","failed":{"invalidUsers":["56c5229f94141744119f000c"]},"attendees":{"usersRainbow":[{"loginEmail":"alice.denice@al-enterprise.com","jid_im":"9aeae4b30c394a5ba458fad09d7924f3@francky-all-in-one-dev-1.opentouch.cloud","lastName":"DENICE","firstName":"Alice","language":"fr","country":"FRA","displayName":"Alice DENICE","id":"5988590c66e532b662f570d0"}],"guests":[{"loginEmail":"myguest@yopmail.com"}]}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"confEndUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not registered inside the roomId(56fa95147b48e0c956103b9c)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room Conf endPoint with id 57ff5022f83ddab225994001 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/conferences":{"post":{"tags":["Rooms Conference"],"summary":"Share a conference","description":"If the logged in user is not registed into the wanted room a (403) forbidden error is sent.  \nIf the conference end point to add is already registered, a (409) conflict error is sent.  \nIf the conference end point to add is already present in another room, it is detached from this room and attached to the room in the current request.   \nA message stanza is sent to all users of the room as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's display name shares an end point in the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'conferenceAdd'\n  \n             userId: 'userId of the owner of the conference end point' />\n  \n</message>\n```\n","operationId":"shareConference","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/shareConference"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/shareConferenceSuccess"},"examples":{"application/json":{"data":{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}}}},"400":{"description":"Bad request"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/custom-data":{"put":{"tags":["Rooms Custom Data"],"summary":"Manage custom data","description":"**Only a moderator is allowed to set or reset custom data**","operationId":"updateRoomCustomData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateRoomCustomData"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateRoomCustomDataSuccess"},"examples":{"application/json":{"data":{"id":"569ce8c8f9336c471b98eda1","customData":{"key1":123,"key2":"a string","key3":true,"key4":"an object"}}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"customData","msg":"Invalid field customData. Expected an object with value length at most 512 char(s)"}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Company with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/invitations/cancel":{"post":{"tags":["Rooms Invitation"],"summary":"Notify users about a canceled invitation to join a room","description":"Room invitation cancelling. Depending on the purpose of the invitation to cancel, we can have two different behaviors. \n\n* **pstn-conference scenario** : Send a notification to users that a scheduled pstn conference is cancelled. The notification is an email. When some of them are known as Guest users (doesn't have created an account yet), the email of these guest is removed from the list of guest attached to the room. All active users in the room are notified about the new list of guest emails left.\n* **chat, video-conference scenario** : This case is mainly to dismiss some guest users attached to the room. The main reason is a bad email spelling. The email of these guest is removed from the list of guest attached to the room. When you use the chat or video-conference scenario, only a list of emails is wanted in the body. (\"emails\" : [\"guest1@mycompany.com\", \"guest2@mycompany\"]) All active users in the room are notified about the new list of guest emails left.\n\n","operationId":"sendUserRoomInvitationCancelation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendUserRoomInvitationCancelation"}}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendUserRoomInvitationCancelationSuccess"},"examples":{"application/json":{"scenario":"video-conference","status":"Cancellations successfully sent","guestEmails":["guest1@gmail.com"]},"text/xml":"<message type=\"management\" id=\"0346d8d5-40ff-4363-9a25-bf724de5040a_5\"\n to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n     <room roomid=\"5841475f9f4ceb902756326e\"\n             roomjid=\"room_db7c5cdd97bd4bed833e81f5c65f3c92@muc.francky-all-in-one-dev-1.opentouch.cloud\"\n             xmlns=\"jabber:iq:configuration\">\n         <guests action=\"update\">\n             <email>guest1@gmail.com</email>\n         </guests>\n     </room>\n</message>"}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"A list of emails is mandatory to revoke guests from a chat or video conference bubble.","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not registered inside the roomId(56fa95147b48e0c956103b9c)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room Conf endPoint with id 57ff5022f83ddab225994001 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/invitations":{"post":{"tags":["Rooms Invitation"],"summary":"Notify users to join a room","description":"Common room invitation mechanism for chat only/pstn conference/video conference * Send notifications and/or emails to rainbow users, to join a room for a chat or conference session.\n* Send mails to foreign users, inviting to create a rainbow account before joining a room and starting a chat or conference session.\n* For pstn conference invitation, the notification is a mail indicating the conference phone number.\n\nThree scenario are available: * **chat** : In this scenario, we try to move a set of users known by their email only, to a CHAT room. The room is already created and some Rainbow users are already invited. The goal is to carry on the users embedding using a list of emails. Rainbow users not yet invited to join the room are added. Other are considered as foreign users, then they receive an email inviting them to create their Rainbow account and join the room. In details the scenario:\n  * Ignore 'users' list (see body content)\n  * Search rainbow users from 'emails' list (see body content)\n  * Those found are invited to join the room\n  * Those not found receive an email to create their account before joining automatically the room. Emails address of foreign users are stored in the room data (new field: guestEmails)\n* **pstn-conference** : In this scenario, we try to notify a set of users known by their rainbowId or their email, to join a pstn conference. The room is already created and some Rainbow users are already invited. The goal is also to carry on the users embedding using a list of emails. Another goal is to send a notification for all invited users to join the conference.**The notification is a mail indicating the conference phone numbers and access code.** Furthermore an XMPP event could be sent. As for the 'chat scenario', Rainbow users not yet invited to join the room are added. Other are considered as foreign users, then they receive an email inviting them to create their Rainbow account and join the room. The mail indicates the conference phone numbers and access code. In details the scenario: \n  * Read 'users' list to built a list of users to notify(see body content)\n  * Search rainbow users from 'emails' list (see body content)\n  * Those found are invited to join the room and receive an email and/or an XMPP event. No event is sent in case of instant meeting.\n  * Those not found receive an email to create their account before joining automatically the room. Emails address of foreign users are stored in the room data (new field: guestEmails)\n  * No mail is sent if wanted (see body content 'noMail' flag).\n* **video-conference** : In this scenario, we try to notify a set of users known by their rainbowId or their email, to join a video conference. The room is already created and some Rainbow users are already invited. The goal is also to carry on the users embedding using a list of emails. Another goal is to send an XMPP event to all rainbow user to join the video conference. The last goal is to send an email to foreign users, inviting them to create their Rainbow account and join the video conference room. In details the scenario: \n  * Read 'users' list to built a list of users to notify(see body content)\n  * Search rainbow users from 'emails' list (see body content)\n  * Those found are invited to join the room and receive an XMPP event to join the video conference\n  * Those not found receive an email to create their account before joining automatically the room. Emails address of foreign users are stored in the room data (new field: guestEmails)\n\n","operationId":"sendUsersJoinRoomInvitation","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendUsersJoinRoomInvitation"}}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendUsersJoinRoomInvitationSuccess"},"examples":{"application/json":{"data":{"scenario":"video-conference","status":"Invitations successfully sent","guestEmails":["bob@laposte.net","carole@pgu.net"],"failed":{"invalidUsers":["56c5229f94141744119f000c"]}}},"text/xml":"<message type=\"management\" id=\"0346d8d5-40ff-4363-9a25-bf724de5040a_5\"\n to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n     <room roomid=\"5841475f9f4ceb902756326e\"\n             roomjid=\"room_db7c5cdd97bd4bed833e81f5c65f3c92@muc.francky-all-in-one-dev-1.opentouch.cloud\"\n             xmlns=\"jabber:iq:configuration\">\n         <guests action=\"update\">\n             <email>bob@laposte.net</email>\n             <email>carole@pgu.net</email>\n         </guests>\n     </room>\n</message>"}},"400":{"description":"Bad request","examples":{"application/json":{"param":"confEndUserId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":{"errorMsg":"Forecast a maximum quota reached for feature BUBBLE_PARTICIPANT_COUNT. Current value 22 / Max value 20 (unit number)","feature":"BUBBLE_PARTICIPANT_COUNT","maxValue":20,"currentValue":22,"unit":" user"},"errorDetailsCode":403621}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room with id 56f3f51a76e0bf767ed45324 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/open-invites":{"post":{"tags":["Rooms Open Invite"],"summary":"Join a room using an openInviteId","description":"From 1.83.0 release, a Rainbow user may have a public links that will help their coworkers to join rooms. So that he just has to create a room and create a public link so called **'public URL'**. Each user can create on demand a public URL to one of his rooms([users public link][0]). The public URL format is designed by the Rainbow application programmer and must contain at least an 'openInviteId'. This openInviteId is an UUID-V4 value. \n\n* https://meet.openrainbow.com/d4bb04c2a2254cd3bebb28e449ce7de3\n\nThe goal of this api is to embed on the fly a user in the room bind with the given openInviteId (body parameter). Many error cases may occur: \n\n* The openInviteId is not valid HTTP error 404 Not Found (detail: 40400)\n* If no room is currently binded or when the room to join is no more active (deleted or archived), an HTTP error 404 Not Found (detail: 404116) is returned.\n* If the room is locked (autoRegister = 'lock'), a user not yet registered inside this room is rejected. An HTTP error 403 (detail: 403621 - Forecast a maximum quota reached..) is returned\n* If the maximum of users for a room is reached, an HTTP error 403 (detail: 403621 - Forecast a maximum quota reached..) is returned\n\n  \nA message stanza is sent to added user. This allow clients to be notified and join the room: \n\n    \n```html\n<message\n  \n       from='inviter user's jid'\n  \n       to='invited user's jid '>\n  \n        <x xmlns='jabber:x:conference'\n  \n             jid: 'room jid'\n  \n             reason: 'reason given in body parameter' />\n  \n</message>\n```\n  \nA message stanza is sent to moderators as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's invited display name has been invited to join the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'invitation'\n  \n             jid: 'invited user's jid' />\n  \n</message>\n```\n\n[0]: #api-users_rooms_public_link","operationId":"sendJoinRoomInvitationUsingOpenInviteiId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/sendJoinRoomInvitationUsingOpenInviteiId"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/sendJoinRoomInvitationUsingOpenInviteiIdSuccess"},"examples":{"application/json":{"data":{"roomId":"569ce8c8f9336c471b98eda1","hasAlreadyJoinThisRoom":false}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden: in the case the the maximum of users in the room is reached.","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":{"errorMsg":"Forecast a maximum quota reached for feature BUBBLE_PARTICIPANT_COUNT. Current value 22 / Max value 20 (unit number)","feature":"BUBBLE_PARTICIPANT_COUNT","maxValue":20,"currentValue":22,"unit":" user"},"errorDetailsCode":403621}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Impossible to join a room using an Open invite (detail : [lack of room / room closed / room deleted/ room locked/ invalid openInviteId])","errorDetailsCode":404116}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/users":{"post":{"tags":["Rooms Users"],"summary":"Add a user","description":"If the logged in user is not register into the wanted room, and if he hasn't a 'moderator' privilege, a (403) forbidden error is sent.   \nCreating a user with the privilege 'moderator' is sometimes barred (feature BUBBLE_PROMOTE_MEMBER)   \nIf the user to add is already registered (declared in the room and `status` is not `deleted`), a (409) conflict error is sent.   \nIf not the user is either created or updated with `status` being `invited`.","operationId":"addUserToRoom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/addUserToRoom"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/addUserToRoomSuccess"},"examples":{"application/json":{"data":{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-29T12:17:17.984Z","privilege":"moderator","status":"accepted"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"privilege","msg":"Invalid field privilege. Expected a string being one of the following values:  [ 'user', 'moderator', 'guest' ]","value":"observer"}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"User's profile(s) don't allow feature BUBBLE_PROMOTE_MEMBER. Current value false","errorDetailsCode":403622,"errorDetailsData":{"feature":"BUBBLE_PROMOTE_MEMBER","unit":"boolean","currentValue":false}}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Can't find resource UserId with given id 56fa724d5de5ae5d4bdf3b8f.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Room User with userId = 56e05bb83456faf3384272ee already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Rooms Users"],"summary":"Get all active users from a room","description":"get active users from a room. A user is considered as 'active' when his status is 'invited' or 'accepted' Example: GET /api/rainbow/enduser/v1.0/rooms/5841475f9f4ceb902756326e/users?format=full&sortField=lastName","operationId":"getRoomActiveUsers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"- room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less user details in response, besides specifics data about room users like (privilege, status and additionDate)   \n- `small`: userId loginEmail displayName jid_im   \n- `medium`: userId loginEmail displayName jid_im status additionDate privilege firstName lastName companyId companyName   \n- `full`: userId loginEmail displayName jid_im status additionDate privilege firstName lastName nickName title jobTitle emails country language timezone companyId companyName roles adminType"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"privilege","in":"query","required":false,"type":"string","description":"Allows to filter users list on the privilege type provided in this option."},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRoomActiveUsersSuccess"},"examples":{"application/json":{"data":{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-29T12:17:17.984Z","privilege":"moderator","status":"accepted"}}}},"400":{"description":"Bad request"},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}/users/{userId}":{"get":{"tags":["Rooms Users"],"summary":"Get a user room data","description":"If the logged in user is not register into the wanted room , a forbidden error is sent.","operationId":"getUserRoomData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserRoomDataSuccess"},"examples":{"application/json":{"data":{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-29T12:17:17.984Z","privilege":"moderator","status":"accepted"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56e05bb83456faf3384272e","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user (bob@al-enterprise.com) is not registered inside the roomId(56fa95147b48e0c956103b9c)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Can't find resource UserId with given id 56fa724d5de5ae5d4bdf3b8f.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"delete":{"tags":["Rooms Users"],"summary":"Delete a user from a room","description":"If the logged in user is not registered (declared in the room and `status` is not `deleted`) into the wanted room, and if he hasn't a 'moderator' privilege, a (403) forbidden error is sent.  \nIf the user to update is not registered, a (404) conflict error is sent.  \nA registered user can delete itself resulting in having it's `status` being `deleted`. A moderator user can delete itself resulting in having it's `status` being `deleted`, but only if another moderator exist to take on. A moderator user can delete another user resulting in deleting the user from the room (not simply `status` being `deleted`).","operationId":"removeUserFromRoom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)   \nA message stanza with the new status is sent to all room users. \n\n    \n```html\n<message\n  \n       from= 'a portal client connected'\n  \n       to='room user jid'\n  \n       id='lh2bs617'\n  \n       type='management'\n  \n       xmlns: 'jabber :client' >\n  \n       <room\n  \n           roomid : mongoid of the room\n  \n           roomjid: jid of the room\n  \n           userjid : jid of the modified user\n  \n           status : new status of the modified user\n  \n       />\n  \n</message>\n```\n  \nA message stanza is sent to room users as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's deleted display name has left the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'leave'\n  \n             jid: 'deleted user's jid' />\n  \n</message>\n```\n"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/removeUserFromRoomSuccess"},"examples":{"application/json":{"status":"UserId 56f9777e0e5e7d7535a48fa2 successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"privilege","msg":"Invalid field privilege. Expected a string being one of the following values:  [ 'user', 'moderator', 'guest' ]","value":"observer"}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Room moderator privilege is forbidden for a guest","errorDetailsCode":403540}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Can't find resource UserId with given id 56fa724d5de5ae5d4bdf3b8f.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Try to remove the Room creator (creator 56e05bb83456faf3384272ee).","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Rooms Users"],"summary":"Change a user data","description":"If the logged in user is not registered (declared in the room and `status` is not `deleted`) into the wanted room, and if he hasn't a 'moderator' privilege, a (403) forbidden error is sent.  \nIf the user to update is not registered, a (404) conflict error is sent.  \nIf the body parameter is missed, a (400) bad request error is sent.  \nIf the body parameter is set to 'empty string', the default privilege 'user' is set.  \nThe logged in user can't update himself. As a result, a 'moderator' can't be downgraded to 'user'.   \nPromoting a user with the privilege 'moderator' is sometimes barred (403) (feature BUBBLE_PROMOTE_MEMBER)","operationId":"updateUserData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateUserData"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateUserDataSuccess"},"examples":{"application/json":{"data":{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-29T12:17:17.984Z","privilege":"moderator","status":"accepted"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"privilege","msg":"Invalid field privilege. Expected a string being one of the following values:  [ 'user', 'moderator', 'guest' ]","value":"observer"}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"User's profile(s) don't allow feature BUBBLE_PROMOTE_MEMBER. Current value false","errorDetailsCode":403622,"errorDetailsData":{"feature":"BUBBLE_PROMOTE_MEMBER","unit":"boolean","currentValue":false}}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Can't find resource UserId with given id 56fa724d5de5ae5d4bdf3b8f.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Room User with userId = 56e05bb83456faf3384272ee already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms":{"post":{"tags":["Rooms"],"summary":"Create a room","description":"Rainbow users/administrator can create/delete rooms based on multi-chat principle and change several room related data fields.   \nWhen a room is created, person that has created the room gets room administration rights. After that he can add other users with the role: `user`, `administrator` or `guest`.   \nUsers with administration rights can: change the topic and the room visibility (public / private); add/remove room users; promote users as administrator; and delete rooms.   \nThe room multi chat jid (MUC JID) is created server side and returned in Json response.   \nCreating a room is sometimes barred (403) (feature BUBBLE_COUNT)","operationId":"createRoom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createRoom"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createRoomSuccess"},"examples":{"application/json":{"data":{"name":"Chat room 1","topic":"Easter holidays","jid":"room1@muc.mycompany.com","creator":"56e05bb83456faf3384272ee","users":[],"confEndpoints":[],"guestEmails":[],"customData":{},"creationDate":"2016-03-28T18:27:10.970Z","visibility":"private","history":"none","disableNotifications":"false","isActive":"true","autoRegister":"unlock","id":"56f9777e0e5e7d7535a48fa2","activeUsersCounter":1}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"visibility","msg":"Invalid field visibility. Expected a string being one of the following values:  [ 'private', 'public' ]","value":"hidden"}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Maximum quota reached for feature BUBBLE_COUNT. Current value 20 / Max value 20 (unit room)","errorDetailsCode":403620,"errorDetailsData":{"feature":"BUBBLE_COUNT","maxValue":20,"currentValue":20,"unit":"room"}}}},"409":{"description":"Conflict"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Rooms"],"summary":"Get all rooms visible by the user requesting it","description":"Display a list of short room description including: **id** - room identifier, **name** - room name  \nGet all rooms visible by the user requesting it (the private rooms the user is part of and the public rooms)  \n","operationId":"getRooms","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"userId","in":"query","required":false,"type":"string","description":"user unique identifier from which to retrieve the list of rooms (like 56f42c1914e2a8a91b99e595)"},{"name":"status","in":"query","required":false,"type":"string","description":"user's status to filter when retrieving the list of user's rooms (like 56f42c1914e2a8a91b99e595) `userId` query parameter can be any userid from Users with `superadmin` role, and only the User's id itself if not.   \nIn this case only the rooms the user is part of are returned  \n"},{"name":"confId","in":"query","required":false,"type":"string","description":"When a room hosts a conference endpoint, retrieve the one hosting the given confEndPointId (like 5980c0aaf698c541468fd1e0). `confId` query parameter used with `userId` query parameter helps filter when retrieving the list of user's rooms.**GET /api/rainbow/enduser/v1.0/rooms?userId=597ef13f36055b298edfaa13&confId=5980c0aaf698c541468fd1e0**"},{"name":"scheduled","in":"query","required":false,"type":"boolean","description":"When a room is/was used for a meeting, select rooms used for an immediate or a scheduled meeting. `scheduled` query parameter used with `userId` query parameter helps filter when retrieving the list of user's rooms. \n\n* scheduled=false : all rooms used for an instant meeting\n* scheduled=true : all rooms used for a scheduled meeting\n\n**GET /api/rainbow/enduser/v1.0/rooms?userId=597ef13f36055b298edfaa13&scheduled=true**"},{"name":"hasConf","in":"query","required":false,"type":"boolean","description":"Select all rooms used for meeting. `hasConf` query parameter used with `userId` query parameter helps filter when retrieving the list of user's rooms. \n\n* hasConf=false : all rooms never used for a meeting\n* hasConf=true : all rooms used for a meeting\n\n**GET /api/rainbow/enduser/v1.0/rooms?userId=597ef13f36055b298edfaa13&hasConf=true**"},{"name":"isActive","in":"query","required":false,"type":"boolean","description":"isActive is a flag of the room. When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server to share the presence. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. \n\n* isActive=false : all rooms not active yet\n* isActive=true : all active rooms\n\n**GET /api/rainbow/enduser/v1.0/rooms?userId=597ef13f36055b298edfaa13&isActive=true**"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less room details in response. > - `small`: id, name, jid, isActive > - `medium`: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive > - `full`: id, name, jid, topic, creator, conference, guestEmails, customData, disableNotifications, users, activeUsersCounter, isActive If `full` format is used, the users list is limited to the first one hundred. Beyond, the number of active users is supplied. The `activeUsersCounter` represents the number of users with the status 'accepted' or 'invited'. Use /api/rainbow/enduser/v1.0/rooms/:roomId/users to Get all active users from a room with paginate options In this case, as a room can have many users (more than 100). We hide users ranked after this threshold. The activeUsersCounter represents the number of users with the status 'accepted' or 'invited'."},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRoomsSuccess"},"examples":{"application/json":{"data":{"name":"Chat room 1","topic":"Easter holidays","jid":"room1@muc.mycompany.com","creator":"56e05bb83456faf3384272ee","users":[{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-28T18:27:11.181Z","privilege":"moderator","status":"accepted"}],"confEndpoints":[{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}],"conference":{"scheduledStartDate":"2017-11-06T08:30:00.000Z","scheduledEndDate":"2017-11-06T09:30:00.000Z","scheduledDuration":60,"mediaType":"pstnAudio","lastUpdateDate":"2017-10-04T09:08:16.232Z","guestEmails":[],"scheduled":true},"guestEmails":[],"customData":{},"creationDate":"2016-03-28T18:27:10.970Z","visibility":"private","history":"none","disableNotifications":"false","autoRegister":"lock","isActive":"true","id":"56f9777e0e5e7d7535a48fa2","activeUsersCounter":1}}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/{roomId}":{"delete":{"tags":["Rooms"],"summary":"Delete a room","description":"This API allows to delete a room.   \nA message stanza is sent to room users as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's deleted display name has closed the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name='close'\n  \n              />\n  \n</message>\n```\n","operationId":"deleteRoom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteRoomSuccess"},"examples":{"application/json":{"status":"Room 56f9777e0e5e7d7535a48fa2 successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"roomId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: user alice.smith@al-enterprise.com does not have 'administrator' role (user) or 'moderator' privilege inside the room (user)","errorDetailsCode":403000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room with id 56f3f51a76e0bf767ed45324 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Rooms"],"summary":"Get a room data from its id","description":"Get a rooms data visible by the user requesting it (a private room the user is part of or a public room)  \n","operationId":"getRoomById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less room details in response. > - `small`: id, name, jid, isActive > - `medium`: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive > - `full`: id, name, jid, topic, creator, conference, guestEmails, customData, disableNotifications, users, activeUsersCounter, isActive If `full` format is used, the users list is limited to the first one hundred. Beyond, the number of active users is supplied. The `activeUsersCounter` represents the number of users with the status 'accepted' or 'invited'. Use /api/rainbow/enduser/v1.0/rooms/:roomId/users to Get all active users from a room with paginate options In this case, as a room can have many users (more than 100). We hide users ranked after this threshold. The activeUsersCounter represents the number of users with the status 'accepted' or 'invited'."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRoomByIdSuccess"},"examples":{"application/json":{"data":{"name":"Chat room 1","topic":"Easter holidays","jid":"room1@muc.mycompany.com","creator":"56e05bb83456faf3384272ee","users":[{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-28T18:27:11.181Z","privilege":"moderator","status":"accepted"}],"confEndpoints":[{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}],"conference":{"scheduledStartDate":"2017-11-06T08:30:00.000Z","scheduledEndDate":"2017-11-06T09:30:00.000Z","scheduledDuration":60,"mediaType":"pstnAudio","lastUpdateDate":"2017-10-04T09:08:16.232Z","guestEmails":[],"scheduled":true},"guestEmails":[],"customData":{},"creationDate":"2016-03-28T18:27:10.970Z","visibility":"private","history":"none","disableNotifications":"false","autoRegister":"lock","isActive":"true","id":"56f9777e0e5e7d7535a48fa2","activeUsersCounter":1}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"roomId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room with id 56f3f51a76e0bf767ed45324 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Rooms"],"summary":"Change room data","description":"This API allows to update room data.   \nA message stanza with the updated room data is sent to all room users. This allow clients to be notified of the up-to-date room data when they join the room: \n\n    \n```html\n<message\n  \n       from= 'a portal client connected'\n  \n       to='room user jid'\n  \n       id='lh2bs617'\n  \n       type='management'\n  \n       xmlns: 'jabber :client' >\n  \n       <room>\n  \n           roomid=\"mongoid of the room\"\n  \n           roomjid=\"jid of the room\"\n  \n           topic=\"new topic of the room\"\n  \n           name=\"new name of the room\"\n  \n           xmlns=\"jabber:iq:configuration\"\n  \n       />\n  \n</message>\n```\n","operationId":"updateRoom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roomId","in":"path","required":true,"type":"string","description":"Room unique identifier (like 56f3f51a76e0bf767ed45325)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateRoom"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateRoomSuccess"},"examples":{"application/json":{"data":{"name":"Chat room 1","topic":"Easter holidays","jid":"room1@muc.mycompany.com","creator":"56e05bb83456faf3384272ee","users":[{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-28T18:27:11.181Z","privilege":"moderator","status":"accepted"}],"confEndpoints":[{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}],"conference":{"scheduledStartDate":"2017-11-06T08:30:00.000Z","scheduledEndDate":"2017-11-06T09:30:00.000Z","scheduledDuration":60,"mediaType":"pstnAudio","lastUpdateDate":"2017-10-04T09:08:16.232Z","guestEmails":[],"scheduled":true},"guestEmails":[],"customData":{},"creationDate":"2016-03-28T18:27:10.970Z","visibility":"private","history":"none","disableNotifications":"false","autoRegister":"lock","isActive":"true","id":"56f9777e0e5e7d7535a48fa2","activeUsersCounter":1}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"visibility","msg":"Invalid field visibility. Expected a string being one of the following values:  [ 'private', 'public' ]","value":"hidden"}],"errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"User's profile(s) don't allow feature BUBBLE_PROMOTE_MEMBER. Current value false","errorDetailsCode":403622,"errorDetailsData":{"feature":"BUBBLE_PROMOTE_MEMBER","unit":"boolean","currentValue":false}}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room with id 56f3f51a76e0bf767ed45324 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/rooms/jids/{jid}":{"get":{"tags":["Rooms"],"summary":"Get a room data from its jid","description":"Get a rooms data visible by the user requesting it (a private room the user is part of or a public room)  \n","operationId":"getRoomByJid","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jid","in":"path","required":true,"type":"string","description":"Room MUC JID (example: room1@muc.mycompany.com)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less room details in response. > - `small`: id, name, jid, isActive > - `medium`: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive > - `full`: id, name, jid, topic, creator, conference, guestEmails, customData, disableNotifications, users, activeUsersCounter, isActive If `full` format is used, the users list is limited to the first one hundred. Beyond, the number of active users is supplied. The `activeUsersCounter` represents the number of users with the status 'accepted' or 'invited'. Use /api/rainbow/enduser/v1.0/rooms/:roomId/users to Get all active users from a room with paginate options In this case, as a room can have many users (more than 100). We hide users ranked after this threshold. The activeUsersCounter represents the number of users with the status 'accepted' or 'invited'."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRoomByJidSuccess"},"examples":{"application/json":{"data":{"name":"Chat room 1","topic":"Easter holidays","jid":"room1@muc.mycompany.com","creator":"56e05bb83456faf3384272ee","users":[{"userId":"56e05bb83456faf3384272ee","additionDate":"2016-03-28T18:27:11.181Z","privilege":"moderator","status":"accepted"}],"confEndpoints":[{"userId":"57ff5022f83ddab225994bed","confEndpointId":"57ff5022f83ddab225994000","mediaType":"pstnAudio"}],"conference":{"scheduledStartDate":"2017-11-06T08:30:00.000Z","scheduledEndDate":"2017-11-06T09:30:00.000Z","scheduledDuration":60,"mediaType":"pstnAudio","lastUpdateDate":"2017-10-04T09:08:16.232Z","guestEmails":[],"scheduled":true},"guestEmails":[],"customData":{},"creationDate":"2016-03-28T18:27:10.970Z","visibility":"private","history":"none","disableNotifications":"false","autoRegister":"lock","isActive":"true","id":"56f9777e0e5e7d7535a48fa2","activeUsersCounter":1}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"roomId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Room with id 56f3f51a76e0bf767ed45324 does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/settings/changelogs":{"get":{"tags":["Settings Rainbow Change Log"],"summary":"Get news about rainbow features","description":"Display a list ICE servers available to start WebRTC audio / vidéo conversations Servers available from Rainbow infrastructure are returned.","operationId":"getRainbowChanges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getRainbowChangesSuccess"},"examples":{"application/json":{"data":{"changeLog":"# Change Log **otliteadminportal  ... markdown format ..."}}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/settings/iceservers":{"get":{"tags":["Settings Webrtc"],"summary":"Get available stun, turn servers","description":"<b>⚠ Retrieving the ICE servers should now be performed from the geolocation portal.\nThe url to request is GET /api/rainbow/geolocation/v1.0/settings/iceservers.</b>","operationId":"GetApiRainbowEnduserV10SettingsIceservers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"}],"deprecated":true,"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetApiRainbowEnduserV10SettingsIceserversSuccess"},"examples":{"application/json":{"data":[{"id":"57347ea14a0327064fcb93fd","credential":"lalala","urls":"turn:turn.1.google.com:19302","username":"alice"},{"urls":"stun:stun.2.google.com:19302","id":"57348758fc51d8d652360f32"}]}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/settings":{"get":{"tags":["Settings"],"summary":"Get user settings","description":"This API can be used to get user settings.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/settings","operationId":"getUserSettings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserSettingsSuccess"},"examples":{"application/json":{"data":{"presence":"dnd","displayNameOrderFirstNameFirst":true,"activeAlarm":"relax1","activeNotif":"notif1","promptForCalendarPresence":true,"protectionAgainstMailTypeOffline":false,"rainbowReadOnly":{"nbDaysBeforeWarningByMail":15,"delayBetweenTwoWarningByMailInDays":7}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 57b44e9c0c32e0b425252f9a does not exist","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Settings"],"summary":"Update user settings","description":"This API can be used to update user settings.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nWhen a setting is updated using this API, all user's XMPP resources will receive the following message indicating them that a setting has been updated: \n\n    \n```html\n<message type=\"management\" id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\"\n  \n        from=\"pcloud@openrainbow.com/172440802160413612281463752830017532\"\n  \n        to=\"85a456023ad249bea7a0cb1d5b4fb34a@openrainbow.com\" xmlns=\"jabber:client\"/>\n  \n    <usersettings action=\"update\" xmlns=\"jabber:iq:configuration\"/>\n  \n </message>\n```\n  \nExample: PUT https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/settings","operationId":"updateUserSettings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateUserSettings"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateUserSettingsSuccess"},"examples":{"application/json":{"data":{"presence":"dnd","displayNameOrderFirstNameFirst":true,"activeAlarm":"relax1","activeNotif":"notif1","promptForCalendarPresence":true,"protectionAgainstMailTypeOffline":false,"rainbowReadOnly":{"nbDaysBeforeWarningByMail":15,"delayBetweenTwoWarningByMailInDays":7}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 57b44e9c0c32e0b425252f9a does not exist, not able to update it.","errorDetailsCode":404001}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/sources":{"post":{"tags":["Sources"],"summary":"Create a source","description":"A client could have one or more mobile devices as a source of contacts with his contacts stored in.   \nAlso a source of contacts could be Microsoft Outlook / Linkedin or Facebook.   \nContacts could be used for constructing recommendation rules.   \n  \nSourceId must be unique for a given user.","operationId":"createSource","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/createSource"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createSourceSuccess"},"examples":{"application/json":{"data":{"sourceId":"358031060148000","os":"Android 5.0.2","id":"56c4aebe31d144d947e385db"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Source with sourceId = 358031060148000 already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Sources"],"summary":"Get all sources by userId","description":"","operationId":"getAllSourcesByUserId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less source details in response. > - `small`: id, sourceId > - `medium`: id, sourceId, os > - `full`: all source fields"},{"name":"sortField","in":"query","required":false,"type":"string","description":"Sort items list based on the given field"},{"name":"limit","in":"query","required":false,"type":"number","description":"Allow to specify the number of items to retrieve."},{"name":"offset","in":"query","required":false,"type":"number","description":"Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned."},{"name":"sortOrder","in":"query","required":false,"type":"number","description":"Specify order when sorting items list."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getAllSourcesByUserIdSuccess"},"examples":{"application/json":{"data":[{"id":"56c4aebe31d144d947e385db"}]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/sources/{sourceId}":{"delete":{"tags":["Sources"],"summary":"Delete a source","description":"","operationId":"deleteSource","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c4aebe31d144d947e385db)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteSourceSuccess"},"examples":{"application/json":{"status":"Source 56d4875c415ce6961e5ac717 successfully deleted","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"sourceDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d473b8415ce6961e5ac71","errorDetailsCode":400000}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Source with id 56d473b8415ce6961e5ac714 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Sources"],"summary":"Get a source data","description":"","operationId":"getSourceData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c4aebe31d144d947e385db)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getSourceDataSuccess"},"examples":{"application/json":{"data":{"sourceId":"358031060148000","os":"Android 5.0.2","id":"56c4aebe31d144d947e385db"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"sourceDBid","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d473b8415ce6961e5ac71","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Source with id 56d473b8415ce6961e5ac714 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Sources"],"summary":"Update a source data","description":"","operationId":"updateSourceData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"sourceId","in":"path","required":true,"type":"string","description":"Source unique identifier (like 56c4aebe31d144d947e385d"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateSourceData"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateSourceDataSuccess"},"examples":{"application/json":{"data":{"sourceId":"358031060148000","os":"Android 5.0.2","id":"56c4aebe31d144d947e385db"}}}},"400":{"description":"Bad request","examples":{"application/json":{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"56d0277a0261b53142a5cab","errorDetailsCode":400000}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56cf30936dca3bc7362b6512, while id of logged in user is 56cf30936dca3bc7362b6513)","errorDetailsCode":403100}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":"Source with sourceId = 358031060148000 already exists.","errorDetailsCode":409000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/avatar":{"delete":{"tags":["Users Avatar"],"summary":"Delete user avatar","description":"This API can be used to delete avatar image for logged in user.   \nThis API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL).   \n  \nWhen an avatar is deleted, the field `lastAvatarUpdateDate` of the user is set to null.   \nUser vCard is also updated: the `PHOTO` element is removed and the `LASTAVATARUPDATE` element is set to empty.   \n  \nA presence stanza is sent to user's resources and users being in user's roster. This allow clients to be notified that this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n  \n    <x xmlns='vcard-temp:x:update'>\n  \n        <avatar/>\n  \n    </x>\n  \n    <actor xmlns='jabber:iq:configuration'/x>\n  \n</presence>\n```\n","operationId":"deleteUserAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteUserAvatarSuccess"},"examples":{"application/json":{"status":"Avatar successfully deleted for user 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"No avatar found for user 56c5c19f94141765119f896c","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"post":{"tags":["Users Avatar"],"summary":"Upload user avatar","description":"This API can be used to upload avatar image for logged in user. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL).   \nRules: \n\n* Avatar file has to be sent directly in http body (no JSon).\n* Only **jpeg, jpg and png** files are supported. Appropriate content-type has to be set (image/jpeg or image/png).\n* If user already has an avatar, the existing one is overwritten.\n* By default, avatar file size is limited to 4194304 bytes (4 MB) (this limit can be changed by integration team in enduser portal config file).\n* When an avatar is uploaded, the field `lastAvatarUpdateDate` of the user is updated to the current date.\n* User vCard is also updated: the `PHOTO` element is set with avatar filename (i.e. user id) in base64 and the `LASTAVATARUPDATE` element is set to the current date.\n* A presence stanza is sent to user's resources and users being in user's roster. This allow clients to be notified that this user has been updated:\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n  \n    <x xmlns='vcard-temp:x:update'>\n  \n        <avatar/>\n  \n    </x>\n  \n    <actor xmlns='jabber:iq:configuration'/x>\n  \n</presence>\n```\n\n","operationId":"uploadUserAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/uploadUserAvatarSuccess"},"examples":{"application/json":{"status":"Avatar successfully set for user 56c5c19f94141765119f896c","data":[]}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":"Avatar format not managed. Got file with type bmp, supported file types: jpeg,jpg,png","errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"413":{"description":"Request Entity Too Large","examples":{"application/json":{"errorCode":413,"errorMsg":"Request Entity Too Large","errorDetails":"File too large. Max size allowed for this file is 4194304 bytes","errorDetailsCode":413000,"maxSize":4194304}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/avatar/{entityId}":{"get":{"tags":["Users Avatar"],"summary":"Get user or company avatar","description":"This API can be used to retrieve users or companies avatar.   \nExample: GET https://openrainbow.com/api/avatar/56c5c19f94141765119f896c?size=128   \n  \nClients can request avatars in a given size by specifying size query string parameter.   \nAvatar file can be resized from 1px to its original resolution, with a maximum of 512px: \n\n* If no size option is requested, avatar is returned by default with resolution of 80px.\n* Max requestable size is 512. If a higher resolution is requested, the default size is returned instead, i.e. 80px.\n* Original avatars resolution can't be increased. If uploaded avatar size is 128 x 128 px, even is client request avatar with size 256, the original avatar file will be returned (128px).\n\n","operationId":"getAvatar","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","required":true,"type":"string","description":"User or Company unique identifier."},{"name":"size","in":"query","required":false,"type":"number","description":"Specify avatar size in pixels (square size x size)."}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getAvatarSuccess"}},"404":{"description":"Not found"}}}},"/api/rainbow/enduser/v1.0/users/{userId}/open-invites/bind":{"put":{"tags":["Users Open Invite"],"summary":"Bind a personal openInviteId with a roomId","description":"use now (<a href=\"#api-users_rooms_public_link\">public links</a>)","operationId":"bindPersonaOpenInviteWithRoomId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/bindPersonaOpenInviteWithRoomId"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"deprecated":true,"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/bindPersonaOpenInviteWithRoomIdSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"The room Open invites (5ab109781caacce5df54436a) is closed","errorDetailsCode":404117}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/open-invites/reset":{"post":{"tags":["Users Open Invite"],"summary":"Create or Reset a personal openInviteId","description":"use now (<a href=\"#api-users_rooms_public_link\">public links</a>)","operationId":"createOrResetPersonalOpenInvite","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"deprecated":true,"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/createOrResetPersonalOpenInviteSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/open-invites":{"get":{"tags":["Users Open Invite"],"summary":"Get my personal openInviteId","description":"use now (<a href=\"#api-users_rooms_public_link\">public links</a>)","operationId":"getPersonalOpenInvite","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"deprecated":true,"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getPersonalOpenInviteSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Open invite doesn't exists for user id 57b44e9c0c32e0b425252f9a.","errorDetailsCode":404115}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/open-invites/unbind":{"put":{"tags":["Users Open Invite"],"summary":"Unbind a personal openInviteId with a roomId","description":"use now (<a href=\"#api-users_rooms_public_link\">public links</a>)","operationId":"unbindOpenInviteWithRoomId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"deprecated":true,"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/unbindOpenInviteWithRoomIdSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Open invite doesn't exists for user id 57b44e9c0c32e0b425252f9a.","errorDetailsCode":404115}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/public-links/bind":{"post":{"tags":["Users Rooms Public Link"],"summary":"Create an openInviteId for a room","description":"A Rainbow user may have a public link that will help somebody to join a room. So that he just has to create a room and create a public link so called **'public URL'**. Each user can create on demand a public URL to one of his rooms. The public URL format is designed by the Rainbow application programmer and must contain at least an 'openInviteId'. This openInviteId is an UUID-V4 value. \n\n* https://meet.openrainbow.com/d4bb04c2a2254cd3bebb28e449ce7de3\n\nEach user may have up to two public URL dedicated to join either a personal audio or video room. A personal audio room is characterized by the flag 'conference.scheduled = false' and 'conference.mediaType = \"pstnAudio\". A personal video room is characterized by the flag 'conference.scheduled = false' and 'conference.mediaType = \"webrtc\". A room is bound if: \n\n* The room exists and is not yet closed\n* The user is one of the room's moderator\n\nA public URL for personal rooms still remains in our database even if the bound room is closed. That is to say the same public URL can be used for each personal room (audio or video) created for this user. It's enough to bind this new room. To join a room using a public URL, the Rainbow application extracts the 'openInviteId' then call the api that allow to register on the fly when necessary a user into the bound room. [POST /api/rainbow/enduser/v1.0/rooms/open-invites][0] To use this feature, a programmer can use a set of API that allows to a user openInviteId(s) management: | Verb | API | Role | |:----:|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | POST | /api/rainbow/enduser/v1.0/users/:userId/public-links/bind body {roomId:\"xxxx\"} | Create an openInviteId Bind it with the given roomId | | PUT | /api/rainbow/enduser/v1.0/users/:userId/public-links/unbind body {roomId:\"xxxx\"} | If the roomId is the personal audio or video room, unbind the given roomId to the openInviteId. That is to say a public URL is invariant when an application decides to re-create a room after each personal audio or video meeting. For other kinds of room (chat, scheduled meeting..) the public URL is deleted. | | PUT | /api/rainbow/enduser/v1.0/users/:userId/public-links/reset body {roomId:\"xxxx\"} | Process another openInvitId. | | GET | /api/rainbow/enduser/v1.0/users/:userId/public-links?type=xxx&roomId=xxx | Get all openInviteId belonging to a user. A filter per type of room (personal-audio-room, personal-video-room, default) is available. | ## Basic workflow ![Failed to load diagram :-(](img/public_link_1.jpg \"Basic workflow\") ## These set of API replaces the former open-invites API set ([users open invite][1])   \nWhen a room is bound with an openInviteId, a message stanza is sent to the user for multi-devices constraints: 1) A new public link is created \n\n    \n```html\n<message type=\"management\" id=\"86be9505-9f31-4935-ae88-d095825ab4ef_0\"\n  \n       to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n  \n        <openinviteid action=\"create\" xmlns=\"jabber:iq:configuration\">\n  \n        <openinviteid>77745cff22e44d56bdb47b49d28f3e0c</openinviteid>\n  \n        <roomid>5ab109781caacce5df54436a</roomid>\n  \n        <roomType>default</roomType>\n  \n        </openinvite>\n  \n</message>\n```\n2) A former public link is updated \n\n    \n```html\n<message type=\"management\" id=\"86be9505-9f31-4935-ae88-d095825ab4ef_0\"\n  \n       to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n  \n        <openinviteid action=\"update\" xmlns=\"jabber:iq:configuration\">\n  \n        <openinviteid>77745cff22e44d56bdb47b49d28f3e0c</openinviteid>\n  \n        <roomid>5ab109781caacce5df54436a</roomid>\n  \n        <roomType>personal_audio_room</roomType>\n  \n        </openinvite>\n  \n</message>\n```\n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links/bind\n\n[0]: #api-rooms_open_invite-sendJoinRoomInvitationUsingOpenInviteiId\n[1]: #api-users_open_invite","operationId":"bindOpenInviteIdWithRoomId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/bindOpenInviteIdWithRoomId"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/bindOpenInviteIdWithRoomIdSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed","roomType":"default"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/public-links":{"get":{"tags":["Users Rooms Public Link"],"summary":"Get all openInviteId per room of a user","description":"Get all openInviteId belonging to a user. Some filters per type of room (personal_audio_room, personal_video_room, default) or by roomId are available.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links&type=personal_audio_room&type=personal_video_room","operationId":"getOpenInviteIdsOfUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"type","in":"query","required":false,"type":"string","description":"to get the public link of personal rooms `type` query parameter used with `personal_audio_room` or `personal_video_room` or `default`.**GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links&type=personal_audio_room**"},{"name":"roomId","in":"query","required":false,"type":"string","description":"Get the public link for a given roomId, managed by the userId `roomId`**GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links&roomId=57cd5922d341df5812bbcb72**"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getOpenInviteIdsOfUserSuccess"},"examples":{"application/json":{"data":[{"userId":"5808b655a55a36d354f75cbe","openInviteId":"d4bb04c2a2254cd3bebb28e449ce7de3","roomId":"57ff5022f83ddab225994bed","roomType":"personal_audio_room"},{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57cd5922d341df5812bbcb72","roomType":"default"}]}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/public-links/reset":{"put":{"tags":["Users Rooms Public Link"],"summary":"Reset the openInviteId for a room","description":"This API can be used by the user himself to initialize or to change his personal open invite id.   \nA message stanza is sent to the user for multi-devices constraints: \n\n    \n```html\n<message type=\"management\" id=\"86be9505-9f31-4935-ae88-d095825ab4ef_0\"\n  \n       to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n  \n        <openinviteid action=\"update\" xmlns=\"jabber:iq:configuration\">\n  \n        <openinviteid>77745cff22e44d56bdb47b49d28f3e0c</openinviteid>\n  \n        <roomid></roomid>\n  \n        <roomType>personal_audio_room</roomType>\n  \n        </openinvite>\n  \n</message>\n```\n  \n  \nExample: POST https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links/reset","operationId":"resetOpenInviteIdOfRoomId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/resetOpenInviteIdOfRoomIdSuccess"},"examples":{"application/json":{"data":{"userId":"5808b655a55a36d354f75cbe","openInviteId":"0fc06e0ce4a849fcbe214ae5e1107417","roomId":"57ff5022f83ddab225994bed","roomType":"default"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}/public-links/unbind":{"put":{"tags":["Users Rooms Public Link"],"summary":"Remove the public link of a room","description":"If the roomId is the personal audio or video room, unbind the given roomId to the openInviteId. That is to say a public URL is invariant when an application decides to re-create a room after each personal audio or video meeting. For other kinds of room (chat, scheduled meeting..) the public URL is deleted. According with the roomType, a message stanza is sent to the user for multi-devices constraints: 1) The public link is removed \n\n    \n```html\n<message type=\"management\" id=\"86be9505-9f31-4935-ae88-d095825ab4ef_0\"\n  \n       to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n  \n        <openinviteid action=\"deleted\" xmlns=\"jabber:iq:configuration\">\n  \n        <openinviteid>77745cff22e44d56bdb47b49d28f3e0c</openinviteid>\n  \n        <roomid>5ab109781caacce5df54436a</roomid>\n  \n        <roomType>default</roomType>\n  \n        </openinvite>\n  \n</message>\n```\n2) The public link still remains. It is just disabled. \n\n    \n```html\n<message type=\"management\" id=\"86be9505-9f31-4935-ae88-d095825ab4ef_0\"\n  \n       to=\"4084a3b277644118be3403720287f978@francky-all-in-one-dev-1.opentouch.cloud\" xmlns=\"jabber:client\">\n  \n        <openinviteid action=\"update\" xmlns=\"jabber:iq:configuration\">\n  \n        <openinviteid>77745cff22e44d56bdb47b49d28f3e0c</openinviteid>\n  \n        <roomid>5ab109781caacce5df54436a</roomid>\n  \n        <roomType>personal_audio_room</roomType>\n  \n        </openinvite>\n  \n</message>\n```\n  \nExample: PUT https://openrainbow.com/api/rainbow/enduser/v1.0/users/56d0277a0261b53142a5cab5/public-links/unbind","operationId":"unbindOpenInviteIdWithRoomId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/unbindOpenInviteIdWithRoomId"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/unbindOpenInviteIdWithRoomIdSuccess"},"examples":{"application/json":{"status":"Public link for roomType personal_audio_room successfully disabled","data":{"openInviteId":"2cdf8a15ca5d41d98eb6db9ef6f7ad13","roomType":"personal_audio_room","userId":"5988919e60c749e5890ff2fc","roomId":null,"id":"5bf17fa207a7165bfbe2372a"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/{userId}":{"delete":{"tags":["Users"],"summary":"Deleted by himself","description":"This API can be used to delete a user.   \nDepending current user initialization, the behaviour to follow may change \n\n* user never initialized and never logged:\n\n  * delete the user from xmpp and database\n\n* user currently initialized or logged at least one time\n\n  * The credentials of the account are destroyed to avoid a malicious reconnection. Then, change loginEmail, change rainbow password, change jid_password. All Rainbow clients connected using this account are disconnected\n  * Cancel pending invites from this user, to join rainbow\n  * set user flag 'isTerminated' and move him to the dedicated company 'Terminated'\n  * Rainbow sends a notification email to the professional email of the deleted account\n  * The deleted account remains visible by other Rainbow users. But It is no more possible to interact with it (no chat, no calls). Messages associated to the deleted user are still visible by other active Rainbow users\n  * A deleted user can't be find in the search\n\n\nThe following XMPP message is sent to all users being in deleted user's roster: \n\n    \n```html\n  \n<message id=\"8413b42e-563c-4437-9a53-06f638b5ab69_0\" type=\"management\"\n  \n    from=\"pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532\"\n  \n    to=\"5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com\"\n  \n    xmlns=\"jabber:client\">\n  \n    <useraccount id=\"56c5c19f94141765119f896c\" action=\"update\" xmlns=\"jabber:iq:configuration\"/>\n  \n</message>\n```\n  \n**Only a migration script is planned to delete permanently a user 'terminated' after a legal delay time.**","operationId":"deleteMyself","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"UserHimself"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/deleteMyselfSuccess"},"examples":{"application/json":{"status":"User 56c5c19f94141765119f896c successfully disabled","data":{"firstLoginDate":"2016-10-26T07:31:05.744Z","activationDate":"2016-10-26T07:23:59.796Z","companyName":"Terminated","initializationDate":"2016-10-26T07:31:33.651Z","accountType":"free","jid_password":"cf1c87a48b7f434fa4d1bdd2895330f8","sponsoring":{"invitationsAcceptedByList":[],"invitationsSentNumber":0},"id":"58105a0f4b1748307345bf58","loggedSince":"2016-10-26T13:57:47.991Z","loginEmail":"ter_1478105583769_alice@mycompany.fr","failedLoginAttempts":0,"firstName":"Alice","isInitialized":true,"profile":{"subscriptionId":"580e2630a6501830067dcb7a","offerId":"580e262ea2bc0f70c000dacd","offerName":"Essential","profileId":"580e262ea2bc0f70c000dacc","profileName":"Essential","assignationDate":"2016-11-02T16:53:04.163Z","status":"active"},"companyId":"5808b7fd0265331550d655d1","roles":["user"],"visibleBy":[],"organisationId":null,"lastUpdateDate":"2016-11-02T16:53:03.979Z","lastName":"De Nice","siteId":null,"lastAvatarUpdateDate":"2016-11-02T16:53:03.979Z","displayName":"Alice De Nice","jid_tel":"tel_81bd130d022f470fa1455dfe8916f2c6@francky-all-in-one-dev-1.opentouch.cloud","createdBySelfRegister":false,"lastExpiredTokenRenewedDate":null,"visibility":"private","phoneNumbers":[],"lastLoginDate":"2016-10-26T13:57:47.991Z","jid_im":"81bd130d022f470fa1455dfe8916f2c6@francky-all-in-one-dev-1.opentouch.cloud","emails":[{"email":"alice@mycompany.fr","type":"work"}],"lastLoginFailureDate":null,"terminatedBy":{"userId":"57e396cdb6173c684e48c6d7","loginEmail":"superadmin@openrainbow.org"},"createdByAdmin":{"userId":"57e3c0376f24fcf959676dba","loginEmail":"admin5@ale-international.com"},"adminType":"undefined","creationDate":"2016-10-26T07:23:59.796Z","isTerminated":true,"terminatedDate":"2016-11-02T16:53:03.769Z","terminatedAccountStatus":"account_deactivated","isActive":true}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"get":{"tags":["Users"],"summary":"Get user data","description":"This API can be used to get a user.   \n  \nAccording to the user found, the fields which can be returned (according to the requested format) are not the same.   \nThis depends on logged in user's visibility on the found user (logged in user himself, user visible by logged in user, or user unknown by logged in user).   \nSee documentation of `format` query string parameter for the details of the fields which can be returned.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/56c5cb38e8078d7512c43985","operationId":"getUserDataById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less user details in response. \n\n* When found user is the logged in user himself, the following fields are returned depending on the requested format:   \n- `small`: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated, isInDefaultCompany, calendars, isADSearchAvailable   \n- `medium`: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, isInDefaultCompany, calendars, isADSearchAvailable   \n- `full`: all user fields + isInDefaultCompany, calendars, isADSearchAvailable\n* When found user is not the logged in user's, but in logged in user's network, logged in user's company or in a company visible by logged in user's company, the following fields are returned depending on the requested format:   \n- `small`: id, displayName, firstName, lastName, companyId, companyName, isTerminated   \n- `medium`: id, displayName, firstName, lastName, jid_im, jid_tel, companyId, companyName, isTerminated, lastAvatarUpdateDate, lastUpdateDate, guestMode   \n- `full`: id, loginEmail, firstName, lastName, displayName, nickName, title, jobTitle, emails, phoneNumbers, country, state, language, timezone, jid_im, jid_tel, companyId, companyName, roles, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, lastOfflineMailReceivedDate\n* When found user is unknown by the the logged in user, the following fields are returned depending on the requested format:   \n- `small`: id, firstName, lastName, companyId, companyName, isTerminated   \n- `medium`: id, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode   \n- `full`: id, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode\n\n"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserDataByIdSuccess"},"examples":{"application/json":{"data":{"id":"56c5cb38e8078d7512c43985","loginEmail":"user1@company.com","firstName":"Other","lastName":"User","displayName":"Other User","nickName":"Nickname","title":"Mr.","jobTitle":"Programmer","tags":["Software Engineer","Rainbow","Paris"],"emails":[{"email":"other.user@company.com","type":"work"},{"email":"other.user@home.com","type":"home"}],"phoneNumbers":[{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","jid_tel":"tel_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","roles":["user"],"lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}},"put":{"tags":["Users"],"summary":"Update user data","description":"This API can be used to update data of logged in user. This API can only be used by user himself (i.e. userId of logged in user = value of userId parameter in URL)   \n  \nA presence stanza is sent to user's resources and users being in user's roster. This allow clients to be notified that this user has been updated: \n\n    \n```html\n<presence from='3ae059e2a91c40d9bdd7df0eedc911ca@openrainbow.com'>\n  \n    <x xmlns='vcard-temp:x:update'>\n  \n        <data/>\n  \n    </x>\n  \n    <actor xmlns='jabber:iq:configuration'/x>\n  \n</presence>\n```\n  \nWhen user flag isInitialized is set from false to true (end of user registration wizard): \n\n* the user will receive a welcome IM from Emily (translated using user language field is set, otherwise in English)\n* if the user used the invitationId from an email invitation sent by a Rainbow user: \n  * invited user and inviting user jid_im are added to mutual rosters\n  * a conversation entry is created between the invited user and this inviting user, and reciprocally\n  * an IM message is sent from the invited user to this inviting user (translated using invited user language field is set, otherwise in English)\n  * the corresponding user invitation is flagged as accepted and both invited user and inviting user are notified with an XMPP message that invitation has been accepted\n* if the user was invited by one or several Rainbow users, but the user didn't use the invitationId from any email invitations (user registered using a token, use case mostly for the case of mobile apps). In that case, all pending registering invites are automatically accepted: \n  * invited user and all inviting users jid_im are added to mutual rosters\n  * conversation entries is created between the invited user and all inviting users, and reciprocally\n  * an IM message is sent from the invited user to each inviting users (translated using invited user language field is set, otherwise in English)\n  * the corresponding user invitations are flagged as auto-accepted and both invited user and inviting users are notified with an XMPP message that invitation has been accepted\n  \nNote that phone numbers linked to a system (pbx) can't be added in user's phoneNumbers using this API. System phone numbers are created by administrators or by PCG and can be linked to Rainbow user using:   \nAdmin API (administrator only): [PUT /api/rainbow/admin/v1.0/systems/{systemId}/phone-numbers/{phoneNumberId}][0]  \nFrom **1.53.0**, a user can be embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration. The self-register API is used to embed this kind of user via an 'invitationId'. A user is created with the flag guestMode = true. This API allows to reset this flag only.\n\n[0]: /admin/#api-systems_phone_numbers-PutSystemPhoneNumbers","operationId":"updateUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/updateUser"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"UserHimself"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/updateUserSuccess"},"examples":{"application/json":{"data":{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","nickName":"Nickname","title":"Mr.","jobTitle":"Research and Development","tags":["Software Engineer","Rainbow","Paris"],"emails":[{"email":"user1@company.com","type":"work"},{"email":"user1@home.com","type":"home"}],"phoneNumbers":[{"shortNumber":"1002","pbxId":"PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246","systemId":"57dc0644f44a97c9155cd462","country":"FRA","number":"0390676767","numberE164":"+33390676767","phoneNumberId":"58876dad81e063e01187dd24","isMonitored":true,"isFromSystem":true,"deviceType":"landline","type":"work"},{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_tel":"tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_password":"3b3f6e2c927940b2875f1ec604c0363b","roles":["user","superadmin"],"adminType":"undefined","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isInDefaultCompany":false,"organisationId":null,"siteId":null,"isActive":true,"isInitialized":true,"initializationDate":"2016-01-18T13:30:44.498Z","activationDate":"2016-01-18T13:29:44.498Z","creationDate":"2016-01-18T12:45:44.498Z","lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","createdBySelfRegister":true,"createdByAdmin":{"userId":"56d69d020c92b35b3041d433","loginEmail":"superadmin@localhost.fr"},"invitedBy":{"invitationId":"574ffe07170a86f3297bc35b","invitationDate":"2016-01-15T13:29:44.498Z","userId":"56d69d020c92b35b3041d533","loginEmail":"user0@company.com"},"firstLoginDate":"2016-01-18T13:29:44.498Z","lastLoginDate":"2016-02-23T09:17:42.523Z","loggedSince":"2016-02-23T09:17:42.523Z","isTerminated":false,"guestMode":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":[{"param":"phoneNumbers.internalNumber","msg":"internalNumber 218001 is already associated to another phoneNumber within the system group to which belongs system 57dc0644f44a97c9155cd462","value":"218001"}],"errorDetailsCode":409552,"errorDetailsData":{"conflictWith":{"id":"598087a294fa7340b7dfa5bd","internalNumber":"218001","shortNumber":"8001","pbxId":"pbxagent_e84bba45aef74331858354a2a0ac653f","systemId":"57dc0620317e17c315b94487","userId":null,"deviceName":"","lastName":"Doe","firstName":"John"}}}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/me":{"get":{"tags":["Users"],"summary":"Get logged in user data","description":"This API can be used to get logged in user data.   \n  \nThis API is especially useful for OAuth authentication, as logged in user data are not sent back to the OAuth client.","operationId":"getConnectedUserData","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getConnectedUserDataSuccess"},"examples":{"application/json":{"data":{"id":"56c5cb38e8078d7512c43985","loginEmail":"user1@company.com","firstName":"Other","lastName":"User","displayName":"Other User","nickName":"Nickname","title":"Mr.","jobTitle":"Programmer","tags":["Software Engineer","Rainbow","Paris"],"emails":[{"email":"other.user@company.com","type":"work"},{"email":"other.user@home.com","type":"home"}],"phoneNumbers":[{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","jid_tel":"tel_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","roles":["user"],"lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/jids/{jid_im}":{"get":{"tags":["Users"],"summary":"Get user data by jid_im","description":"This API can be used to get a user from its jid_im.   \n  \nAccording to the user found, the fields which can be returned (according to the requested format) are not the same.   \nThis depends on logged in user's visibility on the found user (logged in user himself, user visible by logged in user, or user unknown by logged in user).   \nSee documentation of `format` query string parameter for the details of the fields which can be returned.   \n  \nExample: GET https://openrainbow.com/api/rainbow/enduser/v1.0/users/jids/ 64c84652b5784b1c8fcc4b752fb061d8@openrainbow.com","operationId":"getUserByJid","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jid_im","in":"path","required":true,"type":"string","description":"Wanted jid identifier"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less user details in response. \n\n* When found user is the logged in user himself, the following fields are returned depending on the requested format:   \n- `small`: id, loginEmail, firstName, lastName, displayName, companyId, companyName, isTerminated, isInDefaultCompany, calendars, isADSearchAvailable   \n- `medium`: id, loginEmail, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, isInDefaultCompany, calendars, isADSearchAvailable   \n- `full`: all user fields + isInDefaultCompany, calendars, isADSearchAvailable\n* When found user is not the logged in user's, but in logged in user's network, logged in user's company or in a company visible by logged in user's company, the following fields are returned depending on the requested format:   \n- `small`: id, displayName, firstName, lastName, companyId, companyName, isTerminated   \n- `medium`: id, displayName, firstName, lastName, jid_im, jid_tel, companyId, companyName, isTerminated, lastAvatarUpdateDate, lastUpdateDate, guestMode   \n- `full`: id, loginEmail, firstName, lastName, displayName, nickName, title, jobTitle, emails, phoneNumbers, country, state, language, timezone, jid_im, jid_tel, companyId, companyName, roles, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, lastOfflineMailReceivedDate\n* When found user is unknown by the the logged in user, the following fields are returned depending on the requested format:   \n- `small`: id, firstName, lastName, companyId, companyName, isTerminated   \n- `medium`: id, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode   \n- `full`: id, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode\n\n"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserByJidSuccess"},"examples":{"application/json":{"data":{"id":"56c5cb38e8078d7512c43985","loginEmail":"user1@company.com","firstName":"Other","lastName":"User","displayName":"Other User","nickName":"Nickname","title":"Mr.","jobTitle":"Programmer","tags":["Software Engineer","Rainbow","Paris"],"emails":[{"email":"other.user@company.com","type":"work"},{"email":"other.user@home.com","type":"home"}],"phoneNumbers":[{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","jid_tel":"tel_7ca2d0aefb024c949303b508fcecdad2@openrainbow.com","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","roles":["user"],"lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/networks":{"get":{"tags":["Users"],"summary":"Get user network","description":"This API allows to list user's roster.   \n  \nA field showPresence is added in the response for all users to indicate if the presence is shared between logged in user and this user.","operationId":"getUserNetwork","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"},{"name":"format","in":"query","required":false,"type":"string","description":"Allows to retrieve more or less user details in response.   \n- `small`: id, firstName, lastName, displayName, companyId, companyName, isTerminated   \n- `medium`: id, firstName, lastName, displayName, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode   \n- `full`: id, firstName, lastName, displayName, nickName, title, jobTitle, emails, phoneNumbers, country, state, language, timezone, jid_im, jid_tel, companyId, companyName, lastUpdateDate, lastAvatarUpdateDate, isTerminated, guestMode, lastOfflineMailReceivedDate"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUserNetworkSuccess"},"examples":{"application/json":{"data":[{"id":"56c5c19f94141765119f896c","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isTerminated":false,"showPresence":true},{"id":"56c5cb38e8078d7512c43985","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isTerminated":false,"showPresence":false}],"total":2,"limit":100,"offset":0}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}}}}},"/api/rainbow/enduser/v1.0/users/loginemails":{"post":{"tags":["Users"],"summary":"Get users by list of loginemail","description":"This API allows also to search a list of users by loginEmails.   \n  \nOnly basic fields of users are returned in the response (id, loginEmail, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode).   \nTo retrieve more details about the users, use the APIs [GET /api/rainbow/enduser/v1.0/users/:userId][0] or [GET /api/rainbow/enduser/v1.0/users/jids/{jid_im}][1]  \n  \nThe maximum number of loginEmails allowed to be provided is 1000 (an error is returned if more than 1000 emails are provided in loginEmail array).\n\n[0]: #operation/GetUsersId\n[1]: #operation/GetUserJid","operationId":"getUsersByloginEmails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/getUsersByloginEmails"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"superadmin"},{"name":"support"},{"name":"admin"},{"name":"user"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/getUsersByloginEmailsSuccess"},"examples":{"application/json":{"data":[{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false},{"id":"56c5cb38e8078d7512c43985","loginEmail":"user2@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}],"total":2,"limit":100,"offset":0}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/self-register":{"post":{"tags":["Users"],"summary":"Self register a user","description":"This api allows a user to self register in Rainbow application.   \n  \nThis API handles the following use cases: \n\n* User can self-register by himself, without invitation to join Rainbow from another user or a from a company administrator. In this case: \n  * A temporary user token is required to validate that this is well the user who create his account, and that his email address is valid. Field temporaryToken must be used, and invitationId and joinCompanyInvitationId must not be set.\n  * Clients have to first call [POST /api/rainbow/enduser/v1.0/notifications/emails/self-register][0] so that user receive an email with a temporary token.\n  * User enters this token and his data (only loginEmail and password are mandatory), and Clients have to call this API ([POST /api/rainbow/enduser/v1.0/users/self-register][1]) with this code and user data.\n* User can register from an invitation sent by another Rainbow user, in this case: \n  * This API requires the invitation id to validate that this is well the email invited by the inviting user who send the invitation email. Field invitationId must be used, and temporaryToken and joinCompanyInvitationId must not be set.\n  * Inviting Rainbow user has to call [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user][2] so that invited user receives an email with a link containing the invitation id.\n  * Invited user clicks on this URL, enters his data (only loginEmail and password are mandatory), and Clients have to call this API ([POST /api/rainbow/enduser/v1.0/users/self-register][1]) with the invitationId coming from the URL query string.\n  * Once user will finish his initialization (isInitialized false -> true), user will be added in inviting user roster, inviting user will receive the following XMPP message indicating that invitation has been accepted, and both users (invited and inviting) will receive a chat message from each other.\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <userinvite id='57cd5922d341df5812bbcb72' action=\"update\" type='received' status='sent' xmlns='jabber:iq:configuration'/>\n  \n</message>\n```\n  * Note that loginEmail provided by the user can be different than the one being in the invitation.\n* User can register from an invitation sent by a company administrator to join his company in Rainbow, in this case: \n  * This API requires the join company invitation id to validate that this is well the email invited by the company administrator who send the invitation email. Field joinCompanyInvitationId must be used, and temporaryToken and invitationId must not be set.\n  * Company administrator has to call [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][3] so that invited user receives an email with a link containing the join company invitation id.\n  * Invited user clicks on this URL, enters his data (only loginEmail and password are mandatory), and Clients have to call this API ([POST /api/rainbow/enduser/v1.0/users/self-register][1]) with the joinCompanyInvitationId coming from the URL query string.\n  * Once user is created, user will be added in administrator's company. All company administrators receive the following XMPP message indicating that invitation has been accepted: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <joincompanyinvite action=\"update\" id='582048dfe2e68a79f4979624' status='auto-accepted' type='sent' xmlns='jabber:iq:configuration'/>\n  \n</message>\n```\n  * Note that loginEmail provided by the user can be different than the one being in the invitation.\n\n  \nIn every cases, if temporaryToken, invitationId or joinCompanyInvitationId are valid, user is created in rainbow (Jabber identifiers (IM and TEL) are generated, vCard is created, default users are added to his roster, and user is created in mongoDB database).   \n  \nIf joinCompanyInvitationId is used, created user it attached to the company related to this invitation.   \nIf joinCompanyInvitationId is not used and loginEmail of registering user matches a company domain (from userSelfRegisterAllowedDomains), created user it attached to this company.   \nIf joinCompanyInvitationId is not used but a pending join company invitation exit for loginEmail of registering user, created user is attached to this company and all company admins of this company are notified with the XMPP message described above that the invitation has been accepted.   \nOtherwise, created user is attached to a \"Default\" company.   \n  \nIf visibility field is not specified, company visibility is used (company visibility = public => user visibility = public / company visibility = private or organization => user visibility = private)   \nFrom **1.53.0**, a user can be embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration. The self-register API is used to embed this kind of user via an 'invitationId'. A user is created with the flag guestMode = true. Now, in case of loginEmail conflict, the http error 409 supplies this flag. \"errorDetails\": \"User with loginEmail = user1@company.com already exists.\", \"errorDetailsCode\": 409000, \"errorDetailsData\": { \"guestMode\": false } From **1.56.0** release, users can give to their coworkers a public URL to share an INSTANT meeting for chat, pstn-conference, webRTC-conference Sharing an unique URL to join the meeting means: \n\n* Each user has a personal UUID. In the api documentation, this UUID is called **openInviteId**. It can be generated on demand.\n* The public URL is based on this openInviteId (ex: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario=public-url)\n* Refer to /api/rainbow/enduser/v1.0/users/:userId/open-invites/xxxx API(s) to manage the openInviteId\n\nThe goal of this api is to embed on the fly a user not yet created as Rainbow user in the room bind with a given openInviteId (body parameter). Many error cases may occur: \n\n* The openInviteId is not valid HTTP error 404 Not Found (detail: 40400)\n* If no room is currently binded or when the room to join is no more active (deleted or archived), an HTTP error 404 Not Found (detail: 404116) is returned.\n* If the maximum of users for a room is reached, an HTTP error 403 (detail: 403621 - Forecast a maximum quota reached..) is returned\n\n\n[0]: #api-enduser_notifications_emails-EmailSelfRegister\n[1]: #api-enduser_users-enduser_SelfRegisterUsers\n[2]: #api-enduser_notifications_emails-enduser_InviteByEndUser\n[3]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite","operationId":"registerMyself","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/registerMyself"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/registerMyselfSuccess"},"examples":{"application/json":{"data":{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","nickName":"Nickname","title":"Mr.","jobTitle":"Research and Development","tags":["Software Engineer","Rainbow","Paris"],"emails":[{"email":"user1@company.com","type":"work"},{"email":"user1@home.com","type":"home"}],"phoneNumbers":[{"shortNumber":"1002","pbxId":"PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246","systemId":"57dc0644f44a97c9155cd462","country":"FRA","number":"0390676767","numberE164":"+33390676767","phoneNumberId":"58876dad81e063e01187dd24","isMonitored":true,"isFromSystem":true,"deviceType":"landline","type":"work"},{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_tel":"tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_password":"3b3f6e2c927940b2875f1ec604c0363b","roles":["user","superadmin"],"adminType":"undefined","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isInDefaultCompany":false,"organisationId":null,"siteId":null,"isActive":true,"isInitialized":true,"initializationDate":"2016-01-18T13:30:44.498Z","activationDate":"2016-01-18T13:29:44.498Z","creationDate":"2016-01-18T12:45:44.498Z","lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","createdBySelfRegister":true,"createdByAdmin":{"userId":"56d69d020c92b35b3041d433","loginEmail":"superadmin@localhost.fr"},"invitedBy":{"invitationId":"574ffe07170a86f3297bc35b","invitationDate":"2016-01-15T13:29:44.498Z","userId":"56d69d020c92b35b3041d533","loginEmail":"user0@company.com"},"firstLoginDate":"2016-01-18T13:29:44.498Z","lastLoginDate":"2016-02-23T09:17:42.523Z","loggedSince":"2016-02-23T09:17:42.523Z","isTerminated":false,"guestMode":false}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":"Only one of temporaryToken, invitationId or joinCompanyInvitationId parameters must be provided","errorDetailsCode":400451}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":"Invalid join company invitation id 582048dfe2e68a79f4979624","errorDetailsCode":401651}}},"403":{"description":"Forbidden: <ul><li>Either the given email parameter is black-listed</li>\n<li>Or when the maximum of users in the room is reached (openInviteId scenario)</li></ul>","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":{"errorMsg":"Forecast a maximum quota reached for feature BUBBLE_PARTICIPANT_COUNT. Current value 22 / Max value 20 (unit number)","feature":"BUBBLE_PARTICIPANT_COUNT","maxValue":20,"currentValue":22,"unit":" user"},"errorDetailsCode":403621}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"Impossible to join a room using an Open invite (detail : [lack of room / room closed / room deleted/ invalid openInviteId])","errorDetailsCode":404116}}},"409":{"description":"Conflict","examples":{"application/json":{"errorCode":409,"errorMsg":"Conflict","errorDetails":[{"param":"phoneNumbers.internalNumber","msg":"internalNumber 218001 is already associated to another phoneNumber within the system group to which belongs system 57dc0644f44a97c9155cd462","value":"218001"}],"errorDetailsCode":409552,"errorDetailsData":{"conflictWith":{"id":"598087a294fa7340b7dfa5bd","internalNumber":"218001","shortNumber":"8001","pbxId":"pbxagent_e84bba45aef74331858354a2a0ac653f","systemId":"57dc0620317e17c315b94487","userId":null,"deviceName":"","lastName":"Doe","firstName":"John"}}}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/networks/{userId}":{"delete":{"tags":["Users"],"summary":"Remove one contact from the user network","description":"This API allows to remove a contact from the user's network. According with RFC 6121 (XMPP instant messaging and presence) the user receives two stanza to warn it two items of the roster are removed \n\n    \n```html\n<iq xmlns='jabber:client' to='4084a3b277644118be3403720287f978@openrainbow.com/web_win_1.42.3_nbyfPPcN'\n from='4084a3b277644118be3403720287f978@openrainbow.com' type='set'\n id='push6688530438275184641'>\n <query ver='9cc9aac832027d7a7eeaa15432ab3a8165d35e79' xmlns='jabber:iq:roster'>\n <item subscription='remove' jid='tel_9852572291364ec5a7043d68ea72a033@openrainbow.com'>\n </query>\n <iq>\n\n<iq xmlns='jabber:client'\n to='4084a3b277644118be3403720287f978@openrainbow.com/web_win_1.42.3_nbyfPPcN'\n from='4084a3b277644118be3403720287f978@openrainbow.com' type='set'\n id='push11277218838955800577'>\n <query ver='9cc9aac832027d7a7eeaa15432ab3a8165d35e79' xmlns='jabber:iq:roster'>\n <item subscription='remove' jid='9852572291364ec5a7043d68ea72a033@openrainbow.com'>\n </query>\n <iq>\n```\nIf a request to share the contact presence is ongoing, from the user to his contact, it is cancelled and two XMPP events are sent.  \nOne for the user: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='sent' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n</message>\n```\n  \nOne for the contact removed: \n\n    \n```html\n<message type='management' id='122'\n  \n        from='jid_from@openrainbow.com'\n  \n        to='jid_to@openrainbow.com'\n  \n        xmlns='jabber:client'>\n  \n    <presencehandshake id='57cd5922d341df5812bbcb72' action=\"delete\" type='received' status='canceled' xmlns='jabber:iq:configuration'/>\n  \n</message>\n```\nFor more information about presence subscription, refer to : [POST /api/rainbow/enduser/v1.0/users/:userId/presences][0]\n\n[0]: /enduser/#api-presences-enduser_users_PostPresencesReq","operationId":"removeContactFromUserNetwork","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string","description":"User unique identifier (like 56c5c19f94141765119f896c)"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"user"},{"name":"guest"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/removeContactFromUserNetworkSuccess"},"examples":{"application/json":{"status":"User 57ff4e54f83ddab225994beb successfully removed from network","data":{"jid_im":"9852572291364ec5a7043d68ea72a033@openrainbow.com","jid_tel":"tel_9852572291364ec5a7043d68ea72a033@openrainbow.com","id":"57ff4e54f83ddab225994beb"}}}},"400":{"description":"Bad request","examples":{"application/json":{"errorCode":400,"errorMsg":"Bad Request","errorDetails":[{"param":"userId","msg":"Invalid resource identifiers, expected UUID: identifier must be alpha-numeric and have a length of 24 chars","value":"1"}],"errorDetailsCode":400000}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"403":{"description":"Forbidden","examples":{"application/json":{"errorCode":403,"errorMsg":"Forbidden","errorDetails":"Access denied: this API can only be called by user himself (tried to access resource with userId 56d6f05241255dd54b5b61b2, while id of logged in user is 56d6f05241255dd54b5b61b1)","errorDetailsCode":403100}}},"404":{"description":"Not found","examples":{"application/json":{"errorCode":404,"errorMsg":"Resource Not Found","errorDetails":"User with id 569ce8c8f9336c471b98eda1 does not exist.","errorDetailsCode":404000}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/enduser/v1.0/users/jids":{"post":{"tags":["Users"],"summary":"Search a list of users by jid_ims","description":"This API allows also to search a list of users by jid_ims.   \n  \nOnly basic fields of users are returned in the response (id, firstName, lastName, companyId, companyName, jid_im, lastAvatarUpdateDate, lastUpdateDate, isTerminated, guestMode).   \nTo retrieve more details about the users, use the APIs [GET /api/rainbow/enduser/v1.0/users/:userId][0] or [GET /api/rainbow/enduser/v1.0/users/jids/{jid_im}][1]  \n  \nThe maximum number of jid_ims allowed to be provided is 1000 (an error is returned if more than 1000 jids are provided in jid_im array).\n\n[0]: #operation/GetUsersId\n[1]: #operation/GetUserJid","operationId":"searchUsersByJids","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/searchUsersByJids"}}],"security":[{"Bearer":[]}],"x-permissions":[{"name":"superadmin"},{"name":"support"},{"name":"admin"},{"name":"user"},{"name":"guest"},{"name":"public"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/searchUsersByJidsSuccess"},"examples":{"application/json":{"data":[{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false},{"id":"56c5cb38e8078d7512c43985","loginEmail":"user2@company.com","firstName":"Firstname","lastName":"Lastname","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","companyId":"﻿5ac62737a1c37889ac267201","companyName":"My company","lastUpdateDate":"2016-01-19T11:23:10.27Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","isTerminated":false,"guestMode":false}],"total":2,"limit":100,"offset":0}}},"400":{"description":"Bad request"},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}}},"definitions":{"getBotByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Bot service unique identifier."},"name":{"type":"string","description":"Bot title, like 'Emily'."},"jid":{"type":"string","description":"Bot service jid id, should be 'emily.rb.com'. A domain name."},"createdByUserId":{"type":"string","description":"Unique identifier of the bot service owner."},"createdByLoginEmail":{"type":"string","description":"Login of the bot service owner."}},"required":["id","name","jid","createdByUserId","createdByLoginEmail"]}},"required":["data"]},"getBotsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of bot Objects.","items":{"$ref":"#/definitions/getBotsSuccess_data"}}},"required":["data"]},"getBotsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Bot service unique identifier."},"name":{"type":"string","description":"Bot title, like 'Emily'."},"jid":{"type":"string","description":"Bot service jid id, should be 'emily.rb.com'. A domain name."},"createdByUserId":{"type":"string","description":"Unique identifier of the bot service owner."},"createdByLoginEmail":{"type":"string","description":"Login of the bot service owner."}},"required":["id","name","jid","createdByUserId","createdByLoginEmail"]},"DeleteMetricsSuccess":{"type":"object","properties":{"status":{"type":"string","description":"In JSON format, status of the metrics deletion"}},"required":["status"]},"GetMetricsSuccess":{"type":"object","properties":{"metrics":{"type":"string","description":"In JSON format, all the metrics available"}},"required":["metrics"]},"GetApiRainbowEnduserV10AboutSuccess":{"type":"object","properties":{"version":{"type":"string","description":"Version of enduser portal server"},"description":{"type":"string","description":"Description of enduser portal server"}},"required":["version","description"]},"GetApiRainbowPingSuccess":{"type":"object","properties":{"status":{"type":"string","description":"State of enduser portal server   \n`OK` if server status is good"}},"required":["status"]},"PutApiRainbowLogsLevels":{"type":"object","properties":{"console":{"type":"string","description":"Level to set for **console** transport","enum":["debug","info","warn","error"]},"file":{"type":"string","description":"Level to set for **file** transport","enum":["debug","info","warn","error"]},"syslog":{"type":"string","description":"Level to set for **syslog** transport","enum":["debug","info","warning","error"]}}},"PutApiRainbowLogsLevelsSuccess":{"type":"object","properties":{"oldLoggerLevels":{"type":"object","properties":{"console":{"type":"string","description":"Previous log level of **console** transport (if enabled in portal's configuration)"},"file":{"type":"string","description":"Previous log level of **file** transport (if enabled in portal's configuration)"},"syslog":{"type":"string","description":"Previous log level of **syslog** transport (if enabled in portal's configuration)"}}},"newLoggerLevels":{"type":"object","properties":{"console":{"type":"string","description":"New log level of **console** transport (if enabled in portal's configuration)"},"file":{"type":"string","description":"New log level of **file** transport (if enabled in portal's configuration)"},"syslog":{"type":"string","description":"New log level of **syslog** transport (if enabled in portal's configuration)"}}}},"required":["oldLoggerLevels","newLoggerLevels"]},"createCompany":{"type":"object","properties":{"name":{"type":"string","description":"Company name","minLength":1,"maxLength":255},"visibility":{"type":"string","description":"Company visibility (define if users being in this company can be searched by users being in other company).   \nUnder the same organisation, a company can choose the visibility=organisation. That means users belonging to this company are visible for users of foreign companies having the same visibility inside the same organisation.   \nThe visibility=organisation is same as visibility=private outside the organisation. That is to say users can't be searched.","enum":["public","private","organisation"],"default":"public"},"country":{"type":"string","description":"Company country (ISO 3166-1 alpha3 format)","maxLength":3,"minLength":3},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state must be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n","enum":["null","AA","AE","AP","AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY","AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},"slogan":{"type":"string","description":"A free string corresponding to the slogan of the company","minLength":0,"maxLength":255},"description":{"type":"string","description":"A free string that describes the company","minLength":0,"maxLength":2000},"size":{"type":"string","description":" An overview of the number of employees","enum":["self-employed","1-10 employees","11-50 employees","51-200 employees","201-500 employees","501-1000 employees","1001-5000 employees","5001-10,000 employees","10,001+ employees"]},"economicActivityClassification":{"type":"string","description":"* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n","enum":["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U"]},"website":{"type":"string","description":"Company website URL","minLength":0,"maxLength":2000},"avatarShape":{"type":"string","description":"Company's avatar customization","enum":["square","circle"]},"giphyEnabled":{"type":"boolean","description":"Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)"}},"required":["name"]},"createCompanySuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Company unique identifier"},"creationDate":{"type":"string","description":"Company creation date (Read only)","format":"date-time"},"statusUpdatedDate":{"type":"string","description":"Date of last company status update (Read only)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last company avatar update (Read only)","format":"date-time"},"name":{"type":"string","description":"Company name"},"country":{"type":"string","description":"Company country (ISO 3166-1 alpha3 format)"},"street":{"type":"string","description":"Company street","minLength":0,"maxLength":255},"city":{"type":"string","description":"Company city","minLength":0,"maxLength":255},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.","enum":["AK","AL","....","NY","WY"]},"postalCode":{"type":"string","description":"Company postal code","minLength":0,"maxLength":64},"currency":{"type":"string","description":"Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported"},"status":{"type":"string","description":"Company status","enum":["initializing","active","alerting","hold","terminated"]},"visibility":{"type":"string","description":"Company visibility (define if users being in this company can be searched by users being in other company)","enum":["public","private","organisation"]},"visibleBy":{"type":"array","description":"If visibility is private, list of companyIds for which visibility is allowed","items":{"type":"string"}},"adminEmail":{"type":"string","description":"Company contact person email"},"supportEmail":{"type":"string","description":"Company support email"},"companyContactId":{"type":"string","description":"User Id of a Rainbow user which is the contact for this company"},"userSelfRegisterEnabled":{"type":"boolean","description":"Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process"},"userSelfRegisterAllowedDomains":{"type":"array","description":"Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)","items":{"type":"string"}},"slogan":{"type":"string","description":"A free string corresponding to the slogan of the company (255 char length)"},"description":{"type":"string","description":"A free string that describes the company (2000 char length)"},"size":{"type":"string","description":" An overview of the number of employees","enum":["self-employed","1-10 employees","11-50 employees","51-200 employees","201-500 employees","501-1000 employees","1001-5000 employees","5001-10,000 employees","10,001+ employees"]},"economicActivityClassification":{"type":"string","description":"* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n","enum":["NONE","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U"]},"giphyEnabled":{"type":"boolean","description":"Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)"},"website":{"type":"string","description":"Company website URL"},"organisationId":{"type":"string","description":"Optional identifier to indicate the company belongs to an organisation"},"catalogId":{"type":"string","description":"Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe."},"bpId":{"type":"string","description":"Optional identifier which links the company to the corresponding Business partner company"},"adminHasRightToUpdateSubscriptions":{"type":"boolean","description":"In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company."},"adminAllowedUpdateSubscriptionsOps":{"type":"string","description":"In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n","enum":["all","increase_only"]},"isBP":{"type":"boolean","description":"Indicates if the company is a Business partner company","default":"false"},"bpType":{"type":"string","description":"Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n","enum":["IR","VAD","DR"]},"bpBusinessModel":{"type":"string","description":"Indicates BP business model"},"bpApplicantNumber":{"type":"string","description":"Reference of the Business Partner in ALE Finance tools (SAP)"},"bpCRDid":{"type":"string","description":"Reference of the Business Partner in CDR"},"bpHasRightToSell":{"type":"boolean","description":"Indicates if the Business has the right to sell"},"bpHasRightToConnect":{"type":"boolean","description":"When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI"},"bpIsContractAccepted":{"type":"boolean","description":"Indicates if the Business has accepted the contract and can sell Rainbow offers"},"bpContractAcceptationInfo":{"type":"object","properties":{"acceptationDate":{"type":"string","description":"Date of contract acceptation by the BP admin","format":"date-time"},"bpAdminId":{"type":"string","description":"User Id of the BP admin who accepted the contract"},"bpAdminLoginEmail":{"type":"string","description":"User loginEmail of the BP admin who accepted the contract"}},"required":["acceptationDate","bpAdminId","bpAdminLoginEmail"]},"offerType":{"type":"string","description":"Allowed company offer types","enum":["freemium","premium"]},"businessSpecific":{"type":"string","description":"When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)","enum":["HDS"]},"externalReference":{"type":"string","description":"Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.","minLength":0,"maxLength":64},"externalReference2":{"type":"string","description":"Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.","minLength":0,"maxLength":64},"avatarShape":{"type":"string","description":"Company's avatar customization","enum":["square","circle"]},"customData":{"type":"object","properties":{}}},"required":["id","creationDate","statusUpdatedDate","lastAvatarUpdateDate","name","status","visibility","visibleBy","userSelfRegisterEnabled","userSelfRegisterAllowedDomains","size","organisationId","catalogId","bpId","isBP","offerType"]}},"required":["data"]},"getCompaniesSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of company Objects.","items":{"$ref":"#/definitions/getCompaniesSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getCompaniesSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Company unique identifier"},"name":{"type":"string","description":"Company name"}},"required":["id","name"]},"getCompanyAdministratorsSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."}},"required":["id","firstName","lastName","jid_im","companyId","companyName","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode"]},"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"}},"required":["loginEmail","data"]},"getCompanyByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Company unique identifier"},"creationDate":{"type":"string","description":"Company creation date (Read only)","format":"date-time"},"statusUpdatedDate":{"type":"string","description":"Date of last company status update (Read only)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last company avatar update (Read only)","format":"date-time"},"name":{"type":"string","description":"Company name"},"country":{"type":"string","description":"Company country (ISO 3166-1 alpha3 format)"},"street":{"type":"string","description":"Company street","minLength":0,"maxLength":255},"city":{"type":"string","description":"Company city","minLength":0,"maxLength":255},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state should be defined. Else it is not managed.","enum":["AK","AL","....","NY","WY"]},"postalCode":{"type":"string","description":"Company postal code","minLength":0,"maxLength":64},"currency":{"type":"string","description":"Company currency, for payment of premium offers (ISO 4217 format)   \nFor now, only USD and EUR are supported"},"status":{"type":"string","description":"Company status","enum":["initializing","active","alerting","hold","terminated"]},"visibility":{"type":"string","description":"Company visibility (define if users being in this company can be searched by users being in other company)","enum":["public","private","organisation"]},"visibleBy":{"type":"array","description":"If visibility is private, list of companyIds for which visibility is allowed","items":{"type":"string"}},"adminEmail":{"type":"string","description":"Company contact person email"},"supportEmail":{"type":"string","description":"Company support email"},"companyContactId":{"type":"string","description":"User Id of a Rainbow user which is the contact for this company"},"userSelfRegisterEnabled":{"type":"boolean","description":"Allow users with email domain matching 'userSelfRegisterAllowedDomains' to join the company by self-register process"},"userSelfRegisterAllowedDomains":{"type":"array","description":"Allow users with email domain matching one of the values of this array to join the company by self-register process (if userSelfRegisterEnabled is true)","items":{"type":"string"}},"slogan":{"type":"string","description":"A free string corresponding to the slogan of the company (255 char length)"},"description":{"type":"string","description":"A free string that describes the company (2000 char length)"},"size":{"type":"string","description":" An overview of the number of employees","enum":["self-employed","1-10 employees","11-50 employees","51-200 employees","201-500 employees","501-1000 employees","1001-5000 employees","5001-10,000 employees","10,001+ employees"]},"economicActivityClassification":{"type":"string","description":"* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n","enum":["NONE","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U"]},"giphyEnabled":{"type":"boolean","description":"Whether or not giphy feature is enabled for users belonging to this company (possibility to use animated gifs in conversations)"},"website":{"type":"string","description":"Company website URL"},"organisationId":{"type":"string","description":"Optional identifier to indicate the company belongs to an organisation"},"catalogId":{"type":"string","description":"Id of the catalog of Rainbow offers to which the company is linked. The catalog corresponds to the list of offers the company can subscribe."},"bpId":{"type":"string","description":"Optional identifier which links the company to the corresponding Business partner company"},"adminHasRightToUpdateSubscriptions":{"type":"boolean","description":"In the case the company is linked to a Business Partner company, indicates if the `bp_admin` allows the `company_admin` to update the subscriptions of his company (if enable, allowed operations depend of the value of `adminAllowedUpdateSubscriptionsOps`).   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company."},"adminAllowedUpdateSubscriptionsOps":{"type":"string","description":"In the case the company is linked to a Business Partner company and `adminHasRightToUpdateSubscriptions` is enabled, indicates the update operations for which the `bp_admin` allows the `company_admin` to perform on the subscriptions of his company.   \nCan only be set by `superadmin` or `bp_admin`/`bp_finance` of the related company.   \nPossible values: \n\n* `all`: company_admin is allowed to perform all update operations on the subscriptions of his company\n* `increase_only`: company_admin is only allowed to increase `maxNumberUsers` on the subscriptions of his company (decrease is forbidden)\n\n","enum":["all","increase_only"]},"isBP":{"type":"boolean","description":"Indicates if the company is a Business partner company","default":"false"},"bpType":{"type":"string","description":"Indicates BP Company type \n\n* `IR`: Indirect Reseller,\n* `VAD`: Value Added Distributor,\n* `DR`: Direct Reseller.\n\n","enum":["IR","VAD","DR"]},"bpBusinessModel":{"type":"string","description":"Indicates BP business model"},"bpApplicantNumber":{"type":"string","description":"Reference of the Business Partner in ALE Finance tools (SAP)"},"bpCRDid":{"type":"string","description":"Reference of the Business Partner in CDR"},"bpHasRightToSell":{"type":"boolean","description":"Indicates if the Business has the right to sell"},"bpHasRightToConnect":{"type":"boolean","description":"When True, the BP can connect CPE equipment of managed companies. So when False, the \"equipment\" tab should be removed from the admin GUI"},"bpIsContractAccepted":{"type":"boolean","description":"Indicates if the Business has accepted the contract and can sell Rainbow offers"},"bpContractAcceptationInfo":{"type":"object","properties":{"acceptationDate":{"type":"string","description":"Date of contract acceptation by the BP admin","format":"date-time"},"bpAdminId":{"type":"string","description":"User Id of the BP admin who accepted the contract"},"bpAdminLoginEmail":{"type":"string","description":"User loginEmail of the BP admin who accepted the contract"}},"required":["acceptationDate","bpAdminId","bpAdminLoginEmail"]},"offerType":{"type":"string","description":"Allowed company offer types","enum":["freemium","premium"]},"businessSpecific":{"type":"string","description":"When the customer has subscribed to specific business offers, this field is set to the associated specific business (ex: HDS for HealthCare business specific)","enum":["HDS"]},"externalReference":{"type":"string","description":"Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.","minLength":0,"maxLength":64},"externalReference2":{"type":"string","description":"Free field that BP can use to link their customers to their IS/IT tools   \nOnly applicable by `superadmin` or by `bp_admin`/`bp_finance` on one of his customer companies.","minLength":0,"maxLength":64},"avatarShape":{"type":"string","description":"Company's avatar customization","enum":["square","circle"]},"customData":{"type":"object","properties":{}}},"required":["id","creationDate","statusUpdatedDate","lastAvatarUpdateDate","name","status","visibility","visibleBy","userSelfRegisterEnabled","userSelfRegisterAllowedDomains","size","organisationId","catalogId","bpId","isBP","offerType"]},"numberUsers":{"type":"number","description":"Number of Rainbow users being associated to the company"}},"required":["numberUsers","data"]},"DeleteApiRainbowEnduserV10UsersUseridSourcesSourceidContactsContactidSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"getContactSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Contact unique identifier"},"contactId":{"type":"string","description":"Id of the contact coming from the source who created it"},"firstName":{"type":"string","description":"Contact firstName"},"lastName":{"type":"string","description":"Contact lastName"},"displayName":{"type":"string","description":"Contact displayName"},"company":{"type":"string","description":"Contact company"},"jobTitle":{"type":"string","description":"Contact jobTitle"},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/getContactSuccess_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/getContactSuccess_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/getContactSuccess_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/getContactSuccess_otherData"}}},"required":["id","contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]}},"required":["data"]},"getContactSuccess_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number"},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"getContactSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"getContactSuccess_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address"},"street":{"type":"string","description":"Contact street"},"city":{"type":"string","description":"Contact city"},"state":{"type":"string","description":"Contact state"},"postalCode":{"type":"string","description":"Contact postalCode"},"country":{"type":"string","description":"Contact country"}},"required":["type","address","street","city","state","postalCode","country"]},"getContactSuccess_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key"},"value":{"type":"string","description":"Other user data value"}},"required":["key","value"]},"updateContact":{"type":"object","properties":{"contactId":{"type":"string","description":"Contact unique id used by target mobile","minLength":0,"maxLength":255},"firstName":{"type":"string","description":"First name","minLength":0,"maxLength":255},"lastName":{"type":"string","description":"Last name","minLength":0,"maxLength":255},"displayName":{"type":"string","description":"First/last name, some OS don’t mind to have it in two attributes","minLength":0,"maxLength":255},"company":{"type":"string","description":"Company name","minLength":0,"maxLength":255},"jobTitle":{"type":"string","description":"Job title","minLength":0,"maxLength":255},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/updateContact_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/updateContact_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/updateContact_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/updateContact_otherData"}}},"required":["contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]},"updateContact_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number","minLength":1,"maxLength":32},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"updateContact_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email","minLength":1,"maxLength":255},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"updateContact_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address","minLength":0,"maxLength":255},"street":{"type":"string","description":"Contact street","minLength":0,"maxLength":255},"city":{"type":"string","description":"Contact city","minLength":0,"maxLength":255},"state":{"type":"string","description":"Contact state","minLength":0,"maxLength":255},"postalCode":{"type":"string","description":"Contact postalCode","minLength":0,"maxLength":255},"country":{"type":"string","description":"Contact country","minLength":0,"maxLength":255}},"required":["type","address","street","city","state","postalCode","country"]},"updateContact_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key","minLength":0,"maxLength":255},"value":{"type":"string","description":"Other user data value","minLength":0,"maxLength":255}},"required":["key","value"]},"updateContactSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Contact unique identifier"},"contactId":{"type":"string","description":"Id of the contact coming from the source who created it"},"firstName":{"type":"string","description":"Contact firstName"},"lastName":{"type":"string","description":"Contact lastName"},"displayName":{"type":"string","description":"Contact displayName"},"company":{"type":"string","description":"Contact company"},"jobTitle":{"type":"string","description":"Contact jobTitle"},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/updateContactSuccess_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/updateContactSuccess_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/updateContactSuccess_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/updateContactSuccess_otherData"}}},"required":["id","contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]}},"required":["data"]},"updateContactSuccess_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number"},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"updateContactSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"updateContactSuccess_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address"},"street":{"type":"string","description":"Contact street"},"city":{"type":"string","description":"Contact city"},"state":{"type":"string","description":"Contact state"},"postalCode":{"type":"string","description":"Contact postalCode"},"country":{"type":"string","description":"Contact country"}},"required":["type","address","street","city","state","postalCode","country"]},"updateContactSuccess_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key"},"value":{"type":"string","description":"Other user data value"}},"required":["key","value"]},"createContact":{"type":"object","properties":{"contactId":{"type":"string","description":"Contact unique id used by target mobile","minLength":0,"maxLength":255},"firstName":{"type":"string","description":"First name","minLength":0,"maxLength":255},"lastName":{"type":"string","description":"Last name","minLength":0,"maxLength":255},"displayName":{"type":"string","description":"First/last name, some OS don’t mind to have it in two attributes","minLength":0,"maxLength":255},"company":{"type":"string","description":"Company name","minLength":0,"maxLength":255},"jobTitle":{"type":"string","description":"Job title","minLength":0,"maxLength":255},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/createContact_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/createContact_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/createContact_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/createContact_otherData"}}},"required":["contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]},"createContact_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number","minLength":1,"maxLength":32},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"createContact_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email","minLength":1,"maxLength":255},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"createContact_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address","minLength":0,"maxLength":255},"street":{"type":"string","description":"Contact street","minLength":0,"maxLength":255},"city":{"type":"string","description":"Contact city","minLength":0,"maxLength":255},"state":{"type":"string","description":"Contact state","minLength":0,"maxLength":255},"postalCode":{"type":"string","description":"Contact postalCode","minLength":0,"maxLength":255},"country":{"type":"string","description":"Contact country","minLength":0,"maxLength":255}},"required":["type","address","street","city","state","postalCode","country"]},"createContact_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key","minLength":0,"maxLength":255},"value":{"type":"string","description":"Other user data value","minLength":0,"maxLength":255}},"required":["key","value"]},"createContactSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Contact unique identifier"},"contactId":{"type":"string","description":"Id of the contact coming from the source who created it"},"firstName":{"type":"string","description":"Contact firstName"},"lastName":{"type":"string","description":"Contact lastName"},"displayName":{"type":"string","description":"Contact displayName"},"company":{"type":"string","description":"Contact company"},"jobTitle":{"type":"string","description":"Contact jobTitle"},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/createContactSuccess_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/createContactSuccess_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/createContactSuccess_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/createContactSuccess_otherData"}}},"required":["id","contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]}},"required":["data"]},"createContactSuccess_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number"},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"createContactSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"createContactSuccess_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address"},"street":{"type":"string","description":"Contact street"},"city":{"type":"string","description":"Contact city"},"state":{"type":"string","description":"Contact state"},"postalCode":{"type":"string","description":"Contact postalCode"},"country":{"type":"string","description":"Contact country"}},"required":["type","address","street","city","state","postalCode","country"]},"createContactSuccess_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key"},"value":{"type":"string","description":"Other user data value"}},"required":["key","value"]},"getContactsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of contact Objects.","items":{"$ref":"#/definitions/getContactsSuccess_data"}}},"required":["data"]},"getContactsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Contact unique identifier"},"contactId":{"type":"string","description":"Id of the contact coming from the source who created it"},"firstName":{"type":"string","description":"Contact firstName"},"lastName":{"type":"string","description":"Contact lastName"},"displayName":{"type":"string","description":"Contact displayName"},"company":{"type":"string","description":"Contact company"},"jobTitle":{"type":"string","description":"Contact jobTitle"},"phoneNumbers":{"type":"array","description":"Contact phone numbers","items":{"$ref":"#/definitions/getContactsSuccess_phoneNumbers"}},"emails":{"type":"array","description":"Contact emails","items":{"$ref":"#/definitions/getContactsSuccess_emails"}},"addresses":{"type":"array","description":"Contact addresses","items":{"$ref":"#/definitions/getContactsSuccess_addresses"}},"groups":{"type":"array","description":"Contact groups type","enum":["home","work","other"],"items":{"type":"string"}},"otherData":{"type":"array","description":"Other user data – may include birthday date, Skype/Facebook pseudo/profile","items":{"$ref":"#/definitions/getContactsSuccess_otherData"}}},"required":["id","contactId","firstName","lastName","displayName","company","jobTitle","phoneNumbers","emails","addresses","groups","otherData"]},"getContactsSuccess_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"Contact phone number"},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]}},"required":["number","type"]},"getContactsSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"Contact email"},"type":{"type":"string","description":"Contact email type","enum":["home","work","other"]}},"required":["email","type"]},"getContactsSuccess_addresses":{"type":"object","properties":{"type":{"type":"string","description":"Contact address type","enum":["home","work","other"]},"address":{"type":"string","description":"Contact address"},"street":{"type":"string","description":"Contact street"},"city":{"type":"string","description":"Contact city"},"state":{"type":"string","description":"Contact state"},"postalCode":{"type":"string","description":"Contact postalCode"},"country":{"type":"string","description":"Contact country"}},"required":["type","address","street","city","state","postalCode","country"]},"getContactsSuccess_otherData":{"type":"object","properties":{"key":{"type":"string","description":"Other user data key"},"value":{"type":"string","description":"Other user data value"}},"required":["key","value"]},"createConversation":{"type":"object","properties":{"peerId":{"type":"string","description":"ID of another user, ID of a room or ID of a bot, according to value of `type` field: \n\n* **user ID:** id returned in user objects by GET /users and GET /search APIs (like 56d0277a0261b53142a5c000). user ID is also available in user vCard via a proprietary field name 'rainbowId'.\n* **room ID:** id returned in room objects using /rooms APIs.\n* **bot ID:** id returned in bot objects using /bots APIs.\n\n  \npeerId must be an existing userId / roomId / botId, otherwise a 404 Not Found is returned."},"type":{"type":"string","description":"Conversation type: \n\n* user: User to user,\n* room: User to room,\n* bot: User to bot\n\n","enum":["user","room","bot"]},"mute":{"type":"boolean","description":"true if conversation is muted, false otherwise","default":"false"},"isFavorite":{"type":"boolean","description":"Is conversation flagged as favorite.","default":"false"}},"required":["peerId","type"]},"createConversationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation unique identifier."},"creationDate":{"type":"string","description":"Conversation creation date.","format":"date-time"},"peerId":{"type":"string","description":"userId or roomId of the peer involved in the conversation."},"mute":{"type":"boolean","description":"true if conversation is muted, false otherwise","default":"false"},"isFavorite":{"type":"boolean","description":"Is conversation flagged as favorite.","default":"false"},"type":{"type":"string","description":"Type of the conversation peer: \n\n* `user` for User to User conversation type,\n* `room` for User to Room conversation type.\n* `bot` for User to Bot service conversation type.\n\n","enum":["user","room","bot"]},"loginEmail":{"type":"string","description":"If conversation type is `user`, email address (login) of the peer user"},"firstName":{"type":"string","description":"If conversation type is `user`, first name of the peer user"},"lastName":{"type":"string","description":"If conversation type is `user`, last name of the peer user"},"displayName":{"type":"string","description":"If conversation type is `user`, display name of the peer user (firstName + lastName concatenated on server side)"},"jid_im":{"type":"string","description":"User, Room or Bot Jabber IM identifier"},"lastAvatarUpdateDate":{"type":"string","description":"User last avatar update date"},"name":{"type":"string","description":"If conversation type is `room` or `bot`, name of the peer room/bot"},"topic":{"type":"string","description":"If conversation type is `room`, topic of the peer room"},"lastMessageText":{"type":"string","description":"If available, text of the last message for this conversation (otherwise empty string)"},"lastMessageDate":{"type":"string","description":"If available, date of the last message for this conversation (otherwise null)","format":"date-time"},"unreceivedMessageNumber":{"type":"string","description":"If available, number of unreceived messages for this conversation (otherwise 0)"},"unreadMessageNumber":{"type":"string","description":"If available, number of unread messages for this conversation (otherwise 0)"},"call":{"type":"object","properties":{}}},"required":["id","creationDate","peerId","mute","isFavorite","type","loginEmail","firstName","lastName","displayName","jid_im","lastAvatarUpdateDate","name","topic"]}},"required":["data"]},"getConversationsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of conversation Objects.","items":{"$ref":"#/definitions/getConversationsSuccess_data"}},"total":{"type":"number","description":"Total number of items"}},"required":["data","total"]},"getConversationsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation unique identifier."},"creationDate":{"type":"string","description":"Conversation creation date.","format":"date-time"},"peerId":{"type":"string","description":"userId or roomId of the peer involved in the conversation."},"mute":{"type":"boolean","description":"true if conversation is muted, false otherwise","default":"false"},"isFavorite":{"type":"boolean","description":"Is conversation flagged as favorite.","default":"false"},"type":{"type":"string","description":"Type of the conversation peer: \n\n* `user` for User to User conversation type,\n* `room` for User to Room conversation type.\n* `bot` for User to Bot service conversation type.\n\n","enum":["user","room","bot"]},"loginEmail":{"type":"string","description":"If conversation type is `user`, email address (login) of the peer user"},"firstName":{"type":"string","description":"If conversation type is `user`, first name of the peer user"},"lastName":{"type":"string","description":"If conversation type is `user`, last name of the peer user"},"displayName":{"type":"string","description":"If conversation type is `user`, display name of the peer user (firstName + lastName concatenated on server side)"},"jid_im":{"type":"string","description":"User, Room or Bot Jabber IM identifier"},"lastAvatarUpdateDate":{"type":"string","description":"User last avatar update date"},"name":{"type":"string","description":"If conversation type is `room` or `bot`, name of the peer room/bot"},"topic":{"type":"string","description":"If conversation type is `room`, topic of the peer room"},"lastMessageText":{"type":"string","description":"If available, text of the last message for this conversation (otherwise empty string)"},"lastMessageDate":{"type":"string","description":"If available, date of the last message for this conversation (otherwise null)","format":"date-time"},"unreceivedMessageNumber":{"type":"string","description":"If available, number of unreceived messages for this conversation (otherwise 0)"},"unreadMessageNumber":{"type":"string","description":"If available, number of unread messages for this conversation (otherwise 0)"},"call":{"type":"object","properties":{}}},"required":["id","creationDate","peerId","mute","isFavorite","type","loginEmail","firstName","lastName","displayName","jid_im","lastAvatarUpdateDate","name","topic"]},"deleteConversationSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"updateConversation":{"type":"object","properties":{"mute":{"type":"boolean","description":"true if conversation is muted, false otherwise"},"isFavorite":{"type":"boolean","description":"Is conversation flagged as favorite."}}},"updateConversationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation unique identifier."},"creationDate":{"type":"string","description":"Conversation creation date.","format":"date-time"},"peerId":{"type":"string","description":"userId or roomId of the peer involved in the conversation."},"mute":{"type":"boolean","description":"true if conversation is muted, false otherwise","default":"false"},"isFavorite":{"type":"boolean","description":"Is conversation flagged as favorite.","default":"false"},"type":{"type":"string","description":"Type of the conversation peer: \n\n* `user` for User to User conversation type,\n* `room` for User to Room conversation type.\n* `bot` for User to Bot service conversation type.\n\n","enum":["user","room","bot"]}},"required":["id","creationDate","peerId","mute","isFavorite","type"]}},"required":["data"]},"markAllUnreadConversationAsReadSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status message."}},"required":["status"]},"sendConversationContentByEmailSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status message."}},"required":["status"]},"getCountriesSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of countries Objects.","items":{"$ref":"#/definitions/getCountriesSuccess_data"}}},"required":["data"]},"getCountriesSuccess_data":{"type":"object","properties":{"isoAlpha3Code":{"type":"string","description":"Country ISO 3166-1 alpha-3 code"},"fullname":{"type":"string","description":"Country full name"}},"required":["isoAlpha3Code","fullname"]},"createFavorite":{"type":"object","properties":{"peerId":{"type":"string","description":"ID of a user to add, ID of a room or ID of a bot, according to value of `type` field: \n\n* **user ID:** id returned in user objects by GET /users and GET /search APIs (like 56d0277a0261b53142a5c000). user ID is also available in user vCard via a proprietary field name 'rainbowId'.\n* **room ID:** id returned in room objects using /rooms APIs.\n* **bot ID:** id returned in bot objects using /bots APIs.\n\n  \npeerId must be an existing userId / roomId / botId, otherwise a 404 Not Found is returned."},"type":{"type":"string","description":"Favorite type: \n\n* user: User to user,\n* room: User to room,\n* bot: User to bot\n\n","enum":["user","room","bot"]}},"required":["peerId","type"]},"createFavoriteSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Id of the favorite."},"peerId":{"type":"string","description":"userId or roomId of the favorite."},"position":{"type":"integer","description":"position of the favorite in favorite list (first position is 0).","format":"int32"},"type":{"type":"string","description":"Type of the favorite peer: \n\n* `user` for User to User favorite type,\n* `room` for User to Room favorite type.\n* `bot` for User to Bot service favorite type.\n\n","enum":["user","room","bot"]}},"required":["id","peerId","position","type"]}},"required":["data"]},"enduser_users_GetFavoritesSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of favorite Objects.","items":{"$ref":"#/definitions/enduser_users_GetFavoritesSuccess_data"}}},"required":["data"]},"enduser_users_GetFavoritesSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Id of the favorite."},"peerId":{"type":"string","description":"userId or roomId of the favorite."},"position":{"type":"integer","description":"position of the favorite in favorite list (first position is 0).","format":"int32"},"type":{"type":"string","description":"Type of the favorite peer: \n\n* `user` for User to User favorite type,\n* `room` for User to Room favorite type.\n* `bot` for User to Bot service favorite type.\n\n","enum":["user","room","bot"]}},"required":["id","peerId","position","type"]},"updateFavoriteSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Id of the favorite."},"peerId":{"type":"string","description":"userId or roomId of the favorite."},"position":{"type":"integer","description":"position of the favorite in favorite list (first position is 0).","format":"int32"},"type":{"type":"string","description":"Type of the favorite peer: \n\n* `user` for User to User favorite type,\n* `room` for User to Room favorite type.\n* `bot` for User to Bot service favorite type.\n\n","enum":["user","room","bot"]}},"required":["id","peerId","position","type"]}},"required":["data"]},"getUserFavoritesByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Id of the favorite."},"peerId":{"type":"string","description":"userId or roomId of the favorite."},"position":{"type":"integer","description":"position of the favorite in favorite list (first position is 0).","format":"int32"},"type":{"type":"string","description":"Type of the favorite peer: \n\n* `user` for User to User favorite type,\n* `room` for User to Room favorite type.\n* `bot` for User to Bot service favorite type.\n\n","enum":["user","room","bot"]}},"required":["id","peerId","position","type"]}},"required":["data"]},"removeFavoritesSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Id of the favorite."},"peerId":{"type":"string","description":"userId or roomId of the favorite."},"type":{"type":"string","description":"Type of the favorite peer: \n\n* `user` for User to User favorite type,\n* `room` for User to Room favorite type.\n* `bot` for User to Bot service favorite type.\n\n","enum":["user","room","bot"]}},"required":["id","peerId","type"]}},"required":["data"]},"addUserToGroupSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"type":"string"}}},"required":["id","name","comment","isFavorite","owner","creationDate","users"]}},"required":["data"]},"createGroup":{"type":"object","properties":{"name":{"type":"string","description":"Group name.","minLength":1,"maxLength":255},"comment":{"type":"string","description":"Group comment.","minLength":1,"maxLength":255},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite.","default":"false"}},"required":["name"]},"createGroupSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"type":"string"}}},"required":["id","name","comment","isFavorite","owner","creationDate","users"]}},"required":["data"]},"getUserGroupsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of group Objects.","items":{"$ref":"#/definitions/getUserGroupsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getUserGroupsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"type":"string"}}},"required":["id","name","comment","isFavorite","owner","creationDate","users"]},"deleteGroupByIdSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"getUserGroupsByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"}},"required":["id","name","comment","isFavorite","owner","creationDate"]},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"$ref":"#/definitions/getUserGroupsByIdSuccess_users"}}},"required":["users","data"]},"getUserGroupsByIdSuccess_users":{"type":"object","properties":{}},"updateGroupById":{"type":"object","properties":{"name":{"type":"string","description":"Group name.","minLength":1,"maxLength":255},"comment":{"type":"string","description":"Group comment.","minLength":1,"maxLength":255},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite.","default":"false"}}},"updateGroupByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"type":"string"}}},"required":["id","name","comment","isFavorite","owner","creationDate","users"]}},"required":["data"]},"removeUserFromGroupSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier."},"name":{"type":"string","description":"Group name."},"comment":{"type":"string","description":"Group comment."},"isFavorite":{"type":"boolean","description":"Is group flagged as favorite."},"owner":{"type":"string","description":"Rainbow Id of group owner."},"creationDate":{"type":"string","description":"Creation date of the group (read only, set automatically during group creation).","format":"date-time"},"users":{"type":"array","description":"List of Rainbow users being in the group.","items":{"type":"string"}}},"required":["id","name","comment","isFavorite","owner","creationDate","users"]}},"required":["data"]},"acceptUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]}},"required":["data"]},"cancelUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"authorizedReSendInvitationDate":{"type":"string","description":"Date when the inviting user will be allowed to resend again the invitation to the invited user.","format":"date-time"}},"required":["authorizedReSendInvitationDate","data"]},"createUserBulkInvitations":{"type":"object","properties":{"emails":{"type":"array","description":"Array of invited email addresses.   \nEach email address must match the regex /^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/, otherwise the email is considered as invalid.","items":{"type":"string"}},"lang":{"type":"string","description":"Force language of the email notification if not available.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nAlgorithm for choosing language of email: \n\n* invited user language is used if invited user exists in Rainbow and his language is available,\n* else provided language in parameter `lang` is used if provided,\n* else inviting user language is used if language is available,\n* otherwise English is used.\n\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","maxLength":2,"minLength":2},"customMessage":{"type":"string","description":"Custom message that inviting user can add in email body.   \nThe message will be the same for all emails.","minLength":0,"maxLength":100000}}},"createUserBulkInvitationsSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status of the bulk operation.   \n`ongoing`: there is at least 1 email to send   \n`failed`: there is no email to send and errors occurred with the synchronous validation of the provided emails","enum":["ongoing","failed"]},"report":{"type":"object","properties":{"ongoing":{"type":"array","description":"List of emails which will be treated","items":{"$ref":"#/definitions/createUserBulkInvitationsSuccess_ongoing"}},"failed":{"type":"array","description":"List of emails for which the synchronous validation has failed","items":{"$ref":"#/definitions/createUserBulkInvitationsSuccess_failed"}}},"required":["ongoing","failed"]},"counters":{"type":"object","properties":{"total":{"type":"number","description":"Total number of email addresses processed"},"ongoing":{"type":"number","description":"Number of emails that will be treated"},"failed":{"type":"number","description":"Number of emails for which the synchronous validation has failed"}},"required":["total","ongoing","failed"]}},"required":["status","report","counters"]},"createUserBulkInvitationsSuccess_ongoing":{"type":"object","properties":{"email":{"type":"string","description":"Email address to invite"},"index":{"type":"number","description":"Position of the email address to invite in the input emails array"},"errors":{"type":"array","description":"Errors which has occurred during the validation of this email. Should always be empty, otherwise the email would be in the failed array.","items":{"$ref":"#/definitions/createUserBulkInvitationsSuccess_errors"}},"status":{"type":"string","description":"Status of the email invitation. Should always be ongoing, as the treatment is asynchronous and there is currently no way for the client to know the progression of the bulk invitations."}},"required":["email","index","errors","status"]},"createUserBulkInvitationsSuccess_errors":{"type":"object","properties":{"errorCode":{"type":"number","description":"HTTP error code"},"errorMsg":{"type":"string","description":"HTTP error message"},"errorDetails":{"type":"string","description":"Detailed message about the error"},"errorDetailsCode":{"type":"number","description":"Detailed code about the error"},"errorDetailsData":{"type":"object","properties":{}}},"required":["errorCode","errorMsg","errorDetails","errorDetailsCode","errorDetailsData"]},"createUserBulkInvitationsSuccess_failed":{"type":"object","properties":{"email":{"type":"string","description":"Email address which failed validation"},"index":{"type":"number","description":"Position of the email address in the input emails array"},"errors":{"type":"array","description":"Errors which has occurred during the validation of this email.","items":{"$ref":"#/definitions/createUserBulkInvitationsSuccess_errors"}},"status":{"type":"string","description":"Status of the email invitation (failed)."}},"required":["email","index","errors","status"]},"createUserInvitation":{"type":"object","properties":{"email":{"type":"string","description":"Invited email address.   \n  \nOne of `email`, `invitedPhoneNumber` or `invitedUserId` is mandatory.","pattern":"/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/","minLength":3,"maxLength":255},"invitedPhoneNumber":{"type":"string","description":"Invited phone number.   \n  \nOne of `email`, `invitedPhoneNumber` or `invitedUserId` is mandatory."},"invitedUserId":{"type":"string","description":"Invited Rainbow user unique ID   \n  \nOne of `email`, `invitedPhoneNumber` or `invitedUserId` is mandatory."},"lang":{"type":"string","description":"Force language of the email notification if not available.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nAlgorithm for choosing language of email: \n\n* invited user language is used if invited user exists in Rainbow and his language is available,\n* else provided language in parameter `lang` is used if provided,\n* else inviting user language is used if language is available,\n* otherwise English is used.\n\nNot used if parameter `invitedPhoneNumber` is provided (as the SMS is sent by the client, not the server).\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","maxLength":2,"minLength":2},"customMessage":{"type":"string","description":"Custom message that inviting user can add in email body   \nNot used if parameter `invitedPhoneNumber` is provided (as the SMS is sent by the client, not the server).","minLength":0,"maxLength":100000}}},"createUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"authorizedReSendInvitationDate":{"type":"string","description":"Date when the inviting user will be allowed to resend again the invitation to the invited user.","format":"date-time"}},"required":["authorizedReSendInvitationDate","data"]},"declineUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]}},"required":["data"]},"deleteUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]}},"required":["data"]},"getUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"authorizedReSendInvitationDate":{"type":"string","description":"Date when the inviting user will be allowed to resend again the invitation to the invited user.   \nauthorizedReSendInvitationDate is only set if invitation still have the status pending.","format":"date-time"}},"required":["data"]},"getAllReceivedInvitationSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of user invitation Objects.","items":{"$ref":"#/definitions/getAllReceivedInvitationSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getAllReceivedInvitationSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"getAllSentInvitionSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of user invitation Objects.","items":{"$ref":"#/definitions/getAllSentInvitionSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getAllSentInvitionSuccess_data":{"type":"object","properties":{"authorizedReSendInvitationDate":{"type":"string","description":"Date when the inviting user will be allowed to resend again the invitation to the invited user.   \nauthorizedReSendInvitationDate is only set if invitation still have the status pending.","format":"date-time"},"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"resendUserInvitation":{"type":"object","properties":{"customMessage":{"type":"string","description":"Custom message that inviting user can add in email body","minLength":0,"maxLength":100000}}},"resendUserInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation unique Id"},"invitedUserId":{"type":"string","description":"Invited user unique Rainbow Id.   \nOnly available for the inviting user if the invited user has been invited from his userId (parameter invitedUserId in API POST /api/rainbow/enduser/v1.0/users/:userId/invitations) or if the invitation has been accepted."},"invitedPhoneNumber":{"type":"string","description":"Invited user phoneNumber"},"invitedUserEmail":{"type":"string","description":"Invited user email"},"invitingUserId":{"type":"string","description":"Inviting user unique Rainbow Id"},"invitingUserEmail":{"type":"string","description":"Inviting user loginEmail"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"invitingDate":{"type":"string","description":"Date the invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"status":{"type":"string","description":"Invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`* `pending`: invitation has been sent by inviting user and not yet accepted by invited user\n* `accepted`: invitation has been accepted by invited user\n* `auto-accepted`: invitation has been auto-accepted (case of users in same company)\n* `declined`: invitation has been declined by invited user. Only invited user can see that he has declined an invitation. Inviting user still see the invitation as `pending`\n* `canceled`: invitation has been canceled by inviting user. If invited user does not have an account in Rainbow, he can still use this invitationId received by email to create his Rainbow account, but he will not be added to inviting user roster.\n* `failed`: invitation email failed to be sent to invited user (determined by parsing SMTP server logs). It can be the case if the provided invited email address does not exists.\n\n"},"type":{"type":"string","description":"Invitation type: \n\n* `visibility` (invited user exists in Rainbow),\n* `registration` (invited user did not exist in Rainbow when invitation was sent)\n\n"}},"required":["id","invitingUserId","invitingUserEmail","requestedNotificationLanguage","invitingDate","lastNotificationDate","status","type"]},"authorizedReSendInvitationDate":{"type":"string","description":"Date when the inviting user will be allowed to resend again the invitation to the invited user.","format":"date-time"}},"required":["authorizedReSendInvitationDate","data"]},"acceptJoinCompanyInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company invitation unique Id"},"companyId":{"type":"string","description":"Id of the company for which the join company invitation is"},"companyName":{"type":"string","description":"Name of the company for which the join company invitation is (not updated if company name change after invitation creation)"},"invitedUserId":{"type":"string","description":"Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)"},"invitedUserLoginEmail":{"type":"string","description":"Email of the Rainbow user invited to join the company"},"invitingAdminId":{"type":"string","description":"Inviting company admin unique Rainbow Id"},"invitingAdminLoginEmail":{"type":"string","description":"Inviting company admin loginEmail"},"invitationDate":{"type":"string","description":"Date the join company invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"status":{"type":"string","description":"Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`"},"acceptationDate":{"type":"string","description":"Date when the join company invitation has been accepted by the user (if applicable)","format":"date-time"},"declinationDate":{"type":"string","description":"Date when the join company invitation has been declined by the user (if applicable)","format":"date-time"}},"required":["id","companyId","companyName","invitedUserId","invitedUserLoginEmail","invitingAdminId","invitingAdminLoginEmail","invitationDate","lastNotificationDate","requestedNotificationLanguage","status","acceptationDate","declinationDate"]}},"required":["data"]},"declineJoinCompanyInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company invitation unique Id"},"companyId":{"type":"string","description":"Id of the company for which the join company invitation is"},"companyName":{"type":"string","description":"Name of the company for which the join company invitation is (not updated if company name change after invitation creation)"},"invitedUserId":{"type":"string","description":"Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)"},"invitedUserLoginEmail":{"type":"string","description":"Email of the Rainbow user invited to join the company"},"invitingAdminId":{"type":"string","description":"Inviting company admin unique Rainbow Id"},"invitingAdminLoginEmail":{"type":"string","description":"Inviting company admin loginEmail"},"invitationDate":{"type":"string","description":"Date the join company invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"status":{"type":"string","description":"Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`"},"acceptationDate":{"type":"string","description":"Date when the join company invitation has been accepted by the user (if applicable)","format":"date-time"},"declinationDate":{"type":"string","description":"Date when the join company invitation has been declined by the user (if applicable)","format":"date-time"}},"required":["id","companyId","companyName","invitedUserId","invitedUserLoginEmail","invitingAdminId","invitingAdminLoginEmail","invitationDate","lastNotificationDate","requestedNotificationLanguage","status","acceptationDate","declinationDate"]}},"required":["data"]},"getJoinCompanyInvitationByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company invitation unique Id"},"companyId":{"type":"string","description":"Id of the company for which the join company invitation is"},"companyName":{"type":"string","description":"Name of the company for which the join company invitation is (not updated if company name change after invitation creation)"},"invitedUserId":{"type":"string","description":"Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)"},"invitedUserLoginEmail":{"type":"string","description":"Email of the Rainbow user invited to join the company"},"invitingAdminId":{"type":"string","description":"Inviting company admin unique Rainbow Id"},"invitingAdminLoginEmail":{"type":"string","description":"Inviting company admin loginEmail"},"invitationDate":{"type":"string","description":"Date the join company invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"status":{"type":"string","description":"Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`"},"acceptationDate":{"type":"string","description":"Date when the join company invitation has been accepted by the user (if applicable)","format":"date-time"},"declinationDate":{"type":"string","description":"Date when the join company invitation has been declined by the user (if applicable)","format":"date-time"}},"required":["id","companyId","companyName","invitedUserId","invitedUserLoginEmail","invitingAdminId","invitingAdminLoginEmail","invitationDate","lastNotificationDate","requestedNotificationLanguage","status","acceptationDate","declinationDate"]}},"required":["data"]},"getJoinCompanyInvitationsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of join company invitation Objects.","items":{"$ref":"#/definitions/getJoinCompanyInvitationsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getJoinCompanyInvitationsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Join company invitation unique Id"},"companyId":{"type":"string","description":"Id of the company for which the join company invitation is"},"companyName":{"type":"string","description":"Name of the company for which the join company invitation is (not updated if company name change after invitation creation)"},"invitedUserId":{"type":"string","description":"Unique Id of the Rainbow user invited to join the company (only if invited user already exists in Rainbow)"},"invitedUserLoginEmail":{"type":"string","description":"Email of the Rainbow user invited to join the company"},"invitingAdminId":{"type":"string","description":"Inviting company admin unique Rainbow Id"},"invitingAdminLoginEmail":{"type":"string","description":"Inviting company admin loginEmail"},"invitationDate":{"type":"string","description":"Date the join company invitation was created","format":"date-time"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language (used to re-send email request in that language)"},"status":{"type":"string","description":"Join company invitation status: one of `pending`, `accepted`, `auto-accepted`, `declined`, `canceled`, `failed`"},"acceptationDate":{"type":"string","description":"Date when the join company invitation has been accepted by the user (if applicable)","format":"date-time"},"declinationDate":{"type":"string","description":"Date when the join company invitation has been declined by the user (if applicable)","format":"date-time"}},"required":["id","companyId","companyName","invitedUserId","invitedUserLoginEmail","invitingAdminId","invitingAdminLoginEmail","invitationDate","lastNotificationDate","requestedNotificationLanguage","status","acceptationDate","declinationDate"]},"cancelJoinCompanyRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company request unique Id"},"requestingUserId":{"type":"string","description":"Requesting user unique Rainbow Id"},"requestingUserLoginEmail":{"type":"string","description":"Requesting user email"},"requestedCompanyId":{"type":"string","description":"Unique Id of the company the requesting user wants to join"},"requestedCompanyName":{"type":"string","description":"Name of the company the requesting user wants to join"},"status":{"type":"string","description":"Request status: one of `pending`, `accepted`, `declined`, `canceled`"},"requestingDate":{"type":"string","description":"Date the request was created","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedToCompanyAdmin":{"type":"object","properties":{"companyAdminId":{"type":"string","description":""},"companyAdminLoginEmail":{"type":"string","description":""}},"required":["companyAdminId","companyAdminLoginEmail"]},"requestedCompanyInvitationId":{"type":"string","description":"If the request was sent using a JoinCompanyInvite id, this field is set with this Id"}},"required":["id","requestingUserId","requestingUserLoginEmail","requestedCompanyId","requestedCompanyName","status","requestingDate","requestedNotificationLanguage","lastNotificationDate","requestedCompanyInvitationId"]}},"required":["data"]},"getJoinCompanyRequestByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company request unique Id"},"requestingUserId":{"type":"string","description":"Requesting user unique Rainbow Id"},"requestingUserLoginEmail":{"type":"string","description":"Requesting user email"},"requestedCompanyId":{"type":"string","description":"Unique Id of the company the requesting user wants to join"},"requestedCompanyName":{"type":"string","description":"Name of the company the requesting user wants to join"},"status":{"type":"string","description":"Request status: one of `pending`, `accepted`, `declined`, `canceled`"},"requestingDate":{"type":"string","description":"Date the request was created","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedToCompanyAdmin":{"type":"object","properties":{"companyAdminId":{"type":"string","description":""},"companyAdminLoginEmail":{"type":"string","description":""}},"required":["companyAdminId","companyAdminLoginEmail"]},"requestedCompanyInvitationId":{"type":"string","description":"If the request was sent using a JoinCompanyInvite id, this field is set with this Id"}},"required":["id","requestingUserId","requestingUserLoginEmail","requestedCompanyId","requestedCompanyName","status","requestingDate","requestedNotificationLanguage","lastNotificationDate","requestedCompanyInvitationId"]}},"required":["data"]},"getJoinCompanyRequestsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of join company request Objects.","items":{"$ref":"#/definitions/getJoinCompanyRequestsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getJoinCompanyRequestsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Join company request unique Id"},"requestingUserId":{"type":"string","description":"Requesting user unique Rainbow Id"},"requestingUserLoginEmail":{"type":"string","description":"Requesting user email"},"requestedCompanyId":{"type":"string","description":"Unique Id of the company the requesting user wants to join"},"requestedCompanyName":{"type":"string","description":"Name of the company the requesting user wants to join"},"status":{"type":"string","description":"Request status: one of `pending`, `accepted`, `declined`, `canceled`"},"requestingDate":{"type":"string","description":"Date the request was created","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedToCompanyAdmin":{"type":"object","properties":{"companyAdminId":{"type":"string","description":""},"companyAdminLoginEmail":{"type":"string","description":""}},"required":["companyAdminId","companyAdminLoginEmail"]},"requestedCompanyInvitationId":{"type":"string","description":"If the request was sent using a JoinCompanyInvite id, this field is set with this Id"}},"required":["id","requestingUserId","requestingUserLoginEmail","requestedCompanyId","requestedCompanyName","status","requestingDate","requestedNotificationLanguage","lastNotificationDate","requestedCompanyInvitationId"]},"sendJoinCompanyRequest":{"type":"object","properties":{"requestedCompanyId":{"type":"string","description":"Id of the company the user wants to join.   \n  \nOne of `requestedCompanyId`, `requestedCompanyAdminId` or `requestedCompanyLinkId` is mandatory."},"requestedCompanyAdminId":{"type":"string","description":"Id of the company_admin of the company the user wants to join.   \n  \nOne of `requestedCompanyId`, `requestedCompanyAdminId` or `requestedCompanyLinkId` is mandatory."},"requestedCompanyLinkId":{"type":"string","description":"Id of the join company invite associated to the company the user wants to join.   \n  \nOne of `requestedCompanyId`, `requestedCompanyAdminId` or `requestedCompanyLinkId` is mandatory."},"lang":{"type":"string","description":"Language of the email notification to use if language of company admin is not defined.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","default":"en","maxLength":2,"minLength":2}}},"sendJoinCompanyRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company request unique Id"},"requestingUserId":{"type":"string","description":"Requesting user unique Rainbow Id"},"requestingUserLoginEmail":{"type":"string","description":"Requesting user email"},"requestedCompanyId":{"type":"string","description":"Unique Id of the company the requesting user wants to join"},"requestedCompanyName":{"type":"string","description":"Name of the company the requesting user wants to join"},"status":{"type":"string","description":"Request status: one of `pending`, `accepted`, `declined`, `canceled`"},"requestingDate":{"type":"string","description":"Date the request was created","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedToCompanyAdmin":{"type":"object","properties":{"companyAdminId":{"type":"string","description":""},"companyAdminLoginEmail":{"type":"string","description":""}},"required":["companyAdminId","companyAdminLoginEmail"]},"requestedCompanyInvitationId":{"type":"string","description":"If the request was sent using a JoinCompanyInvite id, this field is set with this Id"}},"required":["id","requestingUserId","requestingUserLoginEmail","requestedCompanyId","requestedCompanyName","status","requestingDate","requestedNotificationLanguage","lastNotificationDate","requestedCompanyInvitationId"]}},"required":["data"]},"resendJoinCompanyRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Join company request unique Id"},"requestingUserId":{"type":"string","description":"Requesting user unique Rainbow Id"},"requestingUserLoginEmail":{"type":"string","description":"Requesting user email"},"requestedCompanyId":{"type":"string","description":"Unique Id of the company the requesting user wants to join"},"requestedCompanyName":{"type":"string","description":"Name of the company the requesting user wants to join"},"status":{"type":"string","description":"Request status: one of `pending`, `accepted`, `declined`, `canceled`"},"requestingDate":{"type":"string","description":"Date the request was created","format":"date-time"},"requestedNotificationLanguage":{"type":"string","description":"Requested notification language to use if language of company admin is not defined (used to re-send email request in that language)"},"lastNotificationDate":{"type":"string","description":"Date when the last email notification was sent","format":"date-time"},"requestedToCompanyAdmin":{"type":"object","properties":{"companyAdminId":{"type":"string","description":""},"companyAdminLoginEmail":{"type":"string","description":""}},"required":["companyAdminId","companyAdminLoginEmail"]},"requestedCompanyInvitationId":{"type":"string","description":"If the request was sent using a JoinCompanyInvite id, this field is set with this Id"}},"required":["id","requestingUserId","requestingUserLoginEmail","requestedCompanyId","requestedCompanyName","status","requestingDate","requestedNotificationLanguage","lastNotificationDate","requestedCompanyInvitationId"]}},"required":["data"]},"sendIm":{"type":"object","properties":{"toUserId":{"type":"string","description":"IM recipient user unique identifier (like 56c5c19f94141765119f896c)"},"imSubject":{"type":"string","description":"IM subject","minLength":0,"maxLength":255},"imBody":{"type":"string","description":"IM body","minLength":0,"maxLength":100000}},"required":["toUserId"]},"sendImSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status message."}},"required":["status"]},"sendOfflineUserConnectionRequestByEmail":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"}},"required":["userId"]},"sendOfflineUserConnectionRequestByEmailSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status of the operation"},"data":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to send the notification"}},"required":["email"]}},"required":["status","data"]},"sendResetPasswordEmail":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user requesting a reset-password email with a temporary token","pattern":"/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/","minLength":3,"maxLength":255},"lang":{"type":"string","description":"Language of the email notification if user language value is not available.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nAlgorithm for choosing language of email: \n\n* user language is used if his language is available,\n* else provided language in parameter `lang` is used if provided,\n* otherwise English is used.\n\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","default":"en","minLength":2,"maxLength":5}},"required":["email"]},"sendResetPasswordEmailSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status of the operation"},"data":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to send the reset-password notification"}},"required":["email"]}},"required":["status","data"]},"sendSelfRegisterEmail":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user requesting a self-register email with a temporary token","pattern":"/^[a-zA-Z0-9_\\+-]+(\\.[a-zA-Z0-9_\\+-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.([a-zA-Z]{2,4})$/","minLength":3,"maxLength":255},"lang":{"type":"string","description":"Language of the email notification.   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].   \n  \nIf lang is not provided (of no translation available for provided language), email is sent in English.\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","default":"en","minLength":2,"maxLength":5}},"required":["email"]},"sendSelfRegisterEmailSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Status of the operation"},"data":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to send the self-register email"}},"required":["email"]}},"required":["status","data"]},"changePassword":{"type":"object","properties":{"oldPassword":{"type":"string","description":"Previous user password."},"newPassword":{"type":"string","description":"New user password.   \nRules: more than 8 characters, at least 1 capital letter, 1 number, 1 special character.","minLength":8,"maxLength":64}},"required":["oldPassword","newPassword"]},"changePasswordSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Password update status message."}},"required":["status"]},"resetPassword":{"type":"object","properties":{"loginEmail":{"type":"string","description":"User login email address.","minLength":3,"maxLength":255},"newPassword":{"type":"string","description":"New user password.","minLength":8,"maxLength":64},"temporaryToken":{"type":"string","description":"User temporary token (obtained from POST /api/rainbow/enduser/v1.0/notifications/emails/reset-password API).","maxLength":6,"minLength":6}},"required":["loginEmail","newPassword","temporaryToken"]},"resetPasswordSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Password update status message."}},"required":["status"]},"acceptPresenceSharingSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`, `declined`, `canceled`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n* `declined`: Presence request has been declined by a Rainbow user of my network\n* `canceled`: Presence request has been canceled by a Rainbow user of my network\n* `interrupted`: Once accepted, Presence subscription can be interrupted\n\nWhen the presence request is cancelled or declined, it is deleted in the database, then `canceled``declined` status can't be used for filtering purpose."}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"cancelSubmittedPresenceSharingRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`, `declined`, `canceled`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n* `declined`: Presence request has been declined by a Rainbow user of my network\n* `canceled`: Presence request has been canceled by a Rainbow user of my network\n* `interrupted`: Once accepted, Presence subscription can be interrupted\n\nWhen the presence request is cancelled or declined, it is deleted in the database, then `canceled``declined` status can't be used for filtering purpose."}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"declinePresenceSharingRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`, `declined`, `canceled`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n* `declined`: Presence request has been declined by a Rainbow user of my network\n* `canceled`: Presence request has been canceled by a Rainbow user of my network\n* `interrupted`: Once accepted, Presence subscription can be interrupted\n\nWhen the presence request is cancelled or declined, it is deleted in the database, then `canceled``declined` status can't be used for filtering purpose."}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"getPresenceSharingRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n\n"}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"getReceivedPresenceSharingRequestsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of presence request Objects.","items":{"$ref":"#/definitions/getReceivedPresenceSharingRequestsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getReceivedPresenceSharingRequestsSuccess_data":{"type":"object","properties":{"data":{"type":"object","properties":{}},"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n\n"}},"required":["data","id","fromUserId","toUserId","requestDate","acceptationDate","status"]},"getSentPresenceSharingRequestsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of presence request Objects.","items":{"$ref":"#/definitions/getSentPresenceSharingRequestsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getSentPresenceSharingRequestsSuccess_data":{"type":"object","properties":{"data":{"type":"object","properties":{}},"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n\n"}},"required":["data","id","fromUserId","toUserId","requestDate","acceptationDate","status"]},"sendPresenceSharingRequest":{"type":"object","properties":{"toJid":{"type":"string","description":"User for which we need the presence jid (one of user jid_im or jid_tel).   \n  \nOne of `toJid` or `toUserId` is mandatory."},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id   \n  \nOne of `toJid` or `toUserId` is mandatory."}}},"sendPresenceSharingRequestSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`, `declined`, `canceled`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n* `declined`: Presence request has been declined by a Rainbow user of my network\n* `canceled`: Presence request has been canceled by a Rainbow user of my network\n* `interrupted`: Once accepted, Presence subscription can be interrupted\n\nWhen the presence request is cancelled or declined, it is deleted in the database, then `canceled``declined` status can't be used for filtering purpose."}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"stopPresenceSharingSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Presence Request unique Id"},"fromUserId":{"type":"string","description":"Initiator of the presence request unique Rainbow Id"},"toUserId":{"type":"string","description":"User for which we need the presence unique Rainbow Id"},"requestDate":{"type":"string","description":"Date of presence request creation","format":"date-time"},"acceptationDate":{"type":"string","description":"Date of presence request acceptation","format":"date-time"},"status":{"type":"string","description":"Presence request status: one of `pending`, `accepted`, `declined`, `canceled`* `pending`: Presence request has been sent by inviting user and not yet accepted by invited user\n* `accepted`: Presence request has been accepted by a Rainbow user of my network\n* `declined`: Presence request has been declined by a Rainbow user of my network\n* `canceled`: Presence request has been canceled by a Rainbow user of my network\n* `interrupted`: Once accepted, Presence subscription can be interrupted\n\nWhen the presence request is cancelled or declined, it is deleted in the database, then `canceled``declined` status can't be used for filtering purpose."}},"required":["id","fromUserId","toUserId","requestDate","acceptationDate","status"]}},"required":["data"]},"getUserProfilesSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Id of company subscription to which user profile is assigned (one of the subscriptions available to user's company)"},"offerId":{"type":"string","description":"Id of the Rainbow offer to which company subscription is attached"},"offerName":{"type":"string","description":"Name of the Rainbow offer to which company subscription is attached"},"profileId":{"type":"string","description":"Id of the Rainbow profile to which company subscription is attached"},"profileName":{"type":"string","description":"Name of the Rainbow profile to which company subscription is attached"},"status":{"type":"string","description":"Status of the company subscription to which user profile is assigned"},"isDefault":{"type":"boolean","description":"Indicates if this profile lis linked to user's company's subscription to default offer (i.e. Essential)   \n  \nPossible values: `active`, `alerting`, `hold`, `terminated`"},"assignationDate":{"type":"string","description":"Date when the subscription was attached to user profile"}},"required":["subscriptionId","offerId","offerName","profileId","profileName","status","isDefault","assignationDate"]}},"required":["data"]},"getUserProfilesFeaturesSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of feature Objects.","items":{"$ref":"#/definitions/getUserProfilesFeaturesSuccess_data"}}},"required":["data"]},"getUserProfilesFeaturesSuccess_data":{"type":"object","properties":{"featureId":{"type":"string","description":"Feature unique identifier"},"featureUniqueRef":{"type":"string","description":"Feature unique reference (to be used for controls on limitations linked to this feature in server/client code)"},"featureName":{"type":"string","description":"Feature name"},"featureType":{"type":"string","description":"Feature limitation type (`boolean`, `number`, `string`, `undefined`)"},"isEnabled":{"type":"boolean","description":"In case feature has type boolean (on/off), is the feature enabled"},"limitMin":{"type":"number","description":"In case feature has type number, limit min of the feature (if applicable)"},"limitMax":{"type":"string","description":"In case feature has type number, limit max of the feature (if applicable)"},"addedDate":{"type":"string","description":"Date when the feature was updated for the profile","format":"date-time"},"lastUpdateDate":{"type":"string","description":"Date when the feature was updated for the profile","format":"date-time"}},"required":["featureId","featureUniqueRef","featureName","featureType","isEnabled","limitMin","limitMax","addedDate","lastUpdateDate"]},"getRainbowProfileByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Profile unique identifier"},"name":{"type":"string","description":"Profile name"},"description":{"type":"string","description":"Profile description"},"creationDate":{"type":"string","description":"Profile creation date","format":"date-time"},"featuresList":{"type":"string","description":"List of features associated to this profile, with the associated restriction (if any):   \n`featureId`: Feature unique identified   \n`featureName`: Feature name (automatically filled by server based on name of Feature having provided featureId)   \n`featureUniqueRef`: Feature unique reference (to be used for controls on limitations linked to this feature in server/client code) (automatically filled by server based on uniqueRef of Feature having provided featureId)   \n`featureType`: Feature limitation type (automatically filled by server based on name of Feature having provided featureId)   \n`addedDate`: Date when the feature was updated for the profile   \n`lastUpdateDate`: Date when the feature was updated for the profile   \n`isEnabled`: In case feature has type boolean (on/off), is the feature enabled   \n`limitMin`: In case feature has type number, limit min of the feature (if applicable)   \n`limitMax`: In case feature has type number, limit max of the feature (if applicable)","format":"date-time"}},"required":["id","name","description","creationDate","featuresList"]}},"required":["data"]},"deleteRoomAvatarSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Avatar delete status message."}},"required":["status"]},"uploadRoomAvatarSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Avatar upload status message."}},"required":["status"]},"getRoomAvatarSuccess":{"type":"object","properties":{"Content-Type":{"type":"string","description":"Avatar content-type.","enum":["image/jpeg","image/png"]},"Dims-cached":{"type":"string","description":"Whether or not the resize avatar file has been cached by nginx."},"Last-Modified":{"type":"string","description":"Last avatar update date (same value than the one in user object and in user vCard).","format":"date-time"},"Date":{"type":"string","description":"Request date.","format":"date-time"},"Content":{"type":"string","description":"File to be received","format":"binary"}},"required":["Content-Type","Dims-cached","Last-Modified","Date","Content"]},"getSharedConferenceSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},"confEndpointId":{"type":"string","description":"Conference unique identifier"}},"required":["userId","confEndpointId"]},"mediaType":{"type":"string","description":"Conference media type","enum":["pstnAudio","webrtc"]}},"required":["data","mediaType"]},"stopConferenceSharingSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"sendJoinConferenceInvitationEmail":{"type":"object","properties":{"users":{"type":"array","description":"A list of rainbow userId","items":{"type":"string"}},"emails":{"type":"array","description":"A list of guest user. Persons don't have a Rainbow account.","items":{"type":"string"}},"lang":{"type":"string","description":"Language of the email notification if user language value is not available.","default":"en"},"instantMessage":{"type":"string","description":"When the meeting is an instant meeting nor a scheduled meeting, free message reported to a mail and to an instant message.   \nIn addition with an email, a message stanza is sent to each rainbow users. This allow clients to be notified and join the room, then join the conference: \n\n    \n```html\n<message\n  \n       from='inviter user's jid'\n  \n       to='invited user's jid '>\n  \n        <x xmlns='jabber:x:audioconference'\n  \n             jid: 'room jid'\n  \n             message: 'instantMessage given in body parameter' MAY BE NULL as data is not mandatory\n  \n             confendpointid: 'confId'/>\n  \n</message>\n```\n"}},"required":["users","emails"]},"sendJoinConferenceInvitationEmailSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"attendees":{"type":"object","properties":{}}},"required":["attendees"]},"confEndPoint":{"type":"object","properties":{"phoneNumbers":{"type":"array","description":"List of conference's phoneNumbers available for dial-in","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_phoneNumbers"}},"passCodes":{"type":"array","description":"List of conference's pass codes","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_passCodes"}}},"required":["phoneNumbers","passCodes"]},"status":{"type":"string","description":"If at least, one userId is valid or an email is well formed, status is \"Invitations successfully sent\". Else an error 400 Bad request is returned."},"failed":{"type":"object","properties":{"invalidUsers":{"type":"array","description":"List of invalid userId (not well formed or not Rainbow user)","items":{"type":"string"}}},"required":["invalidUsers"]},"attendees":{"type":"object","properties":{"usersRainbow":{"type":"array","description":"List of Rainbow users invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_usersRainbow"}},"guests":{"type":"array","description":"List of emails invited to the conference that don't match a Rainbow account","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_guests"}}},"required":["usersRainbow","guests"]}},"required":["confEndPoint","status","failed","attendees"]},"sendJoinConferenceInvitationEmailSuccess_phoneNumbers":{"type":"object","properties":{"location":{"type":"string","description":"Location of the dial-in number"},"locationcode":{"type":"string","description":"Location code of the dial-in number"},"number":{"type":"string","description":"Phone number of the dial-in number"}},"required":["location","locationcode","number"]},"sendJoinConferenceInvitationEmailSuccess_passCodes":{"type":"object","properties":{"name":{"type":"string","description":"Name of the pass code"},"value":{"type":"string","description":"Pass code"}},"required":["name","value"]},"sendJoinConferenceInvitationEmailSuccess_usersRainbow":{"type":"object","properties":{"id":{"type":"array","description":"Unique identifier of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_id"}},"loginEmail":{"type":"array","description":"loginEmail of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_loginEmail"}},"jid_im":{"type":"array","description":"jid_im of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_jid_im"}},"lastName":{"type":"array","description":"lastName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_lastName"}},"firstName":{"type":"array","description":"firstName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_firstName"}},"language":{"type":"array","description":"language of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_language"}},"country":{"type":"array","description":"country of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_country"}},"displayName":{"type":"array","description":"displayName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_displayName"}}},"required":["id","loginEmail","jid_im","lastName","firstName","language","country","displayName"]},"sendJoinConferenceInvitationEmailSuccess_id":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_loginEmail":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_jid_im":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_lastName":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_firstName":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_language":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_country":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_displayName":{"type":"object","properties":{}},"sendJoinConferenceInvitationEmailSuccess_guests":{"type":"object","properties":{"loginEmail":{"type":"array","description":"List of emails invited to the conference that don't match a Rainbow account","items":{"$ref":"#/definitions/sendJoinConferenceInvitationEmailSuccess_loginEmail"}}},"required":["loginEmail"]},"sendScheduledMeetingCancelationEmail":{"type":"object","properties":{"users":{"type":"array","description":"A list of rainbow userId","items":{"type":"string"}},"emails":{"type":"array","description":"A list of guest user. Persons don't have a Rainbow account.","items":{"type":"string"}},"lang":{"type":"string","description":"Language of the email notification if user language value is not available.","default":"en","minLength":2,"maxLength":5}},"required":["users","emails"]},"sendScheduledMeetingCancelationEmailSuccess":{"type":"object","properties":{"status":{"type":"string","description":"If at least, one userId is valid or an email is well formed, status is \"Cancellation successfully sent\". Else an error 400 Bad request is returned."},"failed":{"type":"object","properties":{"invalidUsers":{"type":"array","description":"List of invalid userId (not well formed or not Rainbow user)","items":{"type":"string"}}},"required":["invalidUsers"]},"attendees":{"type":"object","properties":{"usersRainbow":{"type":"array","description":"List of Rainbow users invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_usersRainbow"}},"guests":{"type":"array","description":"List of emails invited to the conference that don't match a Rainbow account","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_guests"}}},"required":["usersRainbow","guests"]}},"required":["status","failed","attendees"]},"sendScheduledMeetingCancelationEmailSuccess_usersRainbow":{"type":"object","properties":{"id":{"type":"array","description":"Unique identifier of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_id"}},"loginEmail":{"type":"array","description":"loginEmail of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_loginEmail"}},"jid_im":{"type":"array","description":"jid_im of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_jid_im"}},"lastName":{"type":"array","description":"lastName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_lastName"}},"firstName":{"type":"array","description":"firstName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_firstName"}},"language":{"type":"array","description":"language of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_language"}},"country":{"type":"array","description":"country of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_country"}},"displayName":{"type":"array","description":"displayName of the Rainbow user invited to the conference.","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_displayName"}}},"required":["id","loginEmail","jid_im","lastName","firstName","language","country","displayName"]},"sendScheduledMeetingCancelationEmailSuccess_id":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_loginEmail":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_jid_im":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_lastName":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_firstName":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_language":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_country":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_displayName":{"type":"object","properties":{}},"sendScheduledMeetingCancelationEmailSuccess_guests":{"type":"object","properties":{"loginEmail":{"type":"array","description":"List of emails invited to the conference that don't match a Rainbow account","items":{"$ref":"#/definitions/sendScheduledMeetingCancelationEmailSuccess_loginEmail"}}},"required":["loginEmail"]},"shareConference":{"type":"object","properties":{"confId":{"type":"string","description":"Conference unique identifier"},"mediaType":{"type":"string","description":"{pstnAudio, webrtcSharingOnly, webrtc} : If not defined a pstnAudio is taken as default value"}},"required":["confId","mediaType"]},"shareConferenceSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier (like 56d0277a0261b53142a5cab5)"},"confEndpointId":{"type":"string","description":"Conference unique identifier"}},"required":["userId","confEndpointId"]},"mediaType":{"type":"string","description":"Conference media type","enum":["pstnAudio","webrtc"]}},"required":["data","mediaType"]},"updateRoomCustomData":{"type":"object","properties":{"customData":{"type":"object","properties":{}}},"required":["customData"]},"updateRoomCustomDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"object","properties":{}},"customData":{"type":"object","properties":{}}},"required":["id","customData"]}},"required":["data"]},"sendUserRoomInvitationCancelation":{"type":"object","properties":{"scenario":{"type":"string","description":"Which are the goals of this invitation to cancel.","enum":["chat","pstn-conference","video-conference"],"default":"pstn-conference"},"confId":{"type":"string","description":"Conference unique identifier (only useful for scenario pstn-conference)."},"users":{"type":"string","description":"A list of rainbow userId (only useful for scenario pstn-conference)"},"emails":{"type":"string","description":"A list of guest user. Persons don't have a Rainbow account or can't be found."},"lang":{"type":"string","description":"Language of the email notification if user language value is not available (only useful for scenario pstn-conference).","default":"en"},"noMail":{"type":"boolean","description":"Bypass emails delivery. Supply instead all data available to build custom emails. (only useful for scenario pstn-conference)"}},"required":["confId","users","emails"]},"sendUserRoomInvitationCancelationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"scenario":{"type":"string","description":"The curent scenario used"},"status":{"type":"string","description":"If at least, one userId is valid or an email is well formed, status is \"Cancellation successfully sent\". Else an error 400 Bad request is returned."},"invalidUsers":{"type":"string","description":"List of invalid userId (not well formed or not Rainbow user)"},"guestEmails":{"type":"array","description":"Emails of guest left in the room","items":{"type":"string"}}},"required":["scenario","status","invalidUsers","guestEmails"]}},"required":["data"]},"sendUsersJoinRoomInvitation":{"type":"object","properties":{"scenario":{"type":"string","description":"Which is the goal of this invitation.","enum":["chat","pstn-conference","video-conference"]},"confId":{"type":"string","description":"Conference unique identifier. Only taken in account by the 'pstn-conference' and the 'video-conference' scenario."},"users":{"type":"array","description":"A list of rainbow userId","items":{"type":"string"}},"emails":{"type":"array","description":"A list of guest user. Persons don't have a Rainbow account or can't be found.","items":{"type":"string"}},"lang":{"type":"string","description":"Language of the email notification if user language value is not available.","default":"en"},"instantMessage":{"type":"string","description":"When the meeting is an instant meeting nor a scheduled meeting, free message reported to a mail and to an instant message. **Only taken in account by the 'pstn-conference' and the 'video-conference' scenario.**"},"noMail":{"type":"boolean","description":"Bypass emails delivery. Supply instead all data available to build custom emails. **Only taken in account by the 'pstn-conference' scenario.**"},"update":{"type":"boolean","description":"Allow sending an email explaining this is a meeting update. **Only taken in account by the 'pstn-conference' scenario.**"}},"required":["scenario","confId","users","emails"]},"sendUsersJoinRoomInvitationSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"scenario":{"type":"string","description":"Which is the goal of this invitation.","enum":["chat","pstn-conference","video-conference"]},"status":{"type":"string","description":"If at least, one userId is valid or an email is well formed, status is \"Invitations successfully sent\". Else an error 400 Bad request is returned."},"confEndPoint":{"type":"object","properties":{}},"attendees":{"type":"object","properties":{}},"guestEmails":{"type":"array","description":"List of email address for which an email is sent to invite the receiver to create his Rainbow account before joining the room.","items":{"type":"string"}},"invalidUsers":{"type":"string","description":"List of invalid userId (not well formed or not Rainbow user)"}},"required":["scenario","status","confEndPoint","attendees","guestEmails","invalidUsers"]}},"required":["data"]},"sendJoinRoomInvitationUsingOpenInviteiId":{"type":"object","properties":{"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url'"}},"required":["openInviteId"]},"sendJoinRoomInvitationUsingOpenInviteiIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"roomId":{"type":"string","description":"Room unique identifier."},"hasAlreadyJoinThisRoom":{"type":"boolean","description":"True when the loggedInUser has previously join this room."}},"required":["roomId","hasAlreadyJoinThisRoom"]}},"required":["data"]},"addUserToRoom":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier (like 56f42c1914e2a8a91b99e595)"},"reason":{"type":"string","description":"reason (to be used for XMPP invitation)"},"privilege":{"type":"string","description":"User privilege","enum":["user","moderator","guest"],"default":"user"},"status":{"type":"string","description":"User invitation status   \nA message stanza is sent to added user. This allow clients to be notified and join the room: \n\n    \n```html\n<message\n  \n       from='inviter user's jid'\n  \n       to='invited user's jid '>\n  \n        <x xmlns='jabber:x:conference'\n  \n             jid: 'room jid'\n  \n             reason: 'reason given in body parameter' />\n  \n</message>\n```\n  \nA message stanza is sent to moderators as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's invited display name has been invited to join the bubble </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'invitation'\n  \n             jid: 'invited user's jid' />\n  \n</message>\n```\n","enum":["invited","accepted","unsubscribed"]}},"required":["userId","reason","status"]},"addUserToRoomSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]}},"required":["data"]},"getRoomActiveUsersSuccess":{"type":"object","properties":{"data":{"type":"array","description":"- Collection of users","items":{"$ref":"#/definitions/getRoomActiveUsersSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getRoomActiveUsersSuccess_data":{"type":"object","properties":{"jid_im":{"type":"string","description":"- User Jabber IM identifier"},"loginEmail":{"type":"string","description":"- user login"},"displayName":{"type":"string","description":"- user display name"},"companyId":{"type":"string","description":"- user rainbow company id"},"companyName":{"type":"string","description":"- user rainbow name"},"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["jid_im","loginEmail","displayName","companyId","companyName","userId","additionDate","privilege","status"]},"getUserRoomDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]}},"required":["data"]},"removeUserFromRoomSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"updateUserData":{"type":"object","properties":{"privilege":{"type":"string","description":"User privilege","enum":["user","moderator","guest"]},"status":{"type":"string","description":"User invitation status   \nA message stanza with the new status is sent to all room users (if a user's status is modified). \n\n    \n```html\n<message\n  \n       from= 'a portal client connected'\n  \n       to='room user jid'\n  \n       id='lh2bs617'\n  \n       type='management'\n  \n       xmlns: 'jabber :client' >\n  \n       <room\n  \n           roomid : mongoid of the room\n  \n           roomjid: jid of the room\n  \n           userjid : jid of the modified user\n  \n           status : new status of the modified user\n  \n       />\n  \n</message>\n```\n  \nA message stanza is sent to room users as a private room message. This allow clients to display notifications: \n\n    \n```html\n<message\n  \n       from='room jid'\n  \n       to='room jid/user's nic'>\n  \n        <x body  user's updated display name has been invited to join the bubble or welcome </body&gt\n  \n        <x event xmlns='jabber:iq:configuration'\n  \n             name: 'join' or 'welcome' or 'leave'\n  \n             jid: 'updated user's jid' />\n  \n</message>\n```\n","enum":["invited","accepted","unsubscribed","rejected"]}},"required":["privilege","status"]},"updateUserDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]}},"required":["data"]},"createRoom":{"type":"object","properties":{"name":{"type":"string","description":"Room name","minLength":1,"maxLength":255},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"],"default":"private"},"topic":{"type":"string","description":"Room topic","minLength":1,"maxLength":255},"history":{"type":"string","description":"previous messages history to provide to a new room user","enum":["none","all","number"],"default":"none"},"number":{"type":"number","description":"to use when history=number","default":"0"},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)","default":"false"},"mediaType":{"type":"string","description":"Defines at creation the room will host a conference.","enum":["pstnAudio","webrtc"]},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack' (value not authorized yet): If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link","enum":["unlock","lock"],"default":"unlock"}},"required":["name"]},"createRoomSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Room unique identifier (like 56d0277a0261b53142a5cab5)"},"name":{"type":"string","description":"Room name."},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"]},"topic":{"type":"string","description":"Room topic"},"jid":{"type":"string","description":"Room MUC JID"},"creationDate":{"type":"string","description":"Creation date of the room (read only, set automatically during room creation)","format":"date-time"},"creator":{"type":"string","description":"Rainbow Id of creator"},"users":{"type":"array","description":"List of users members of the room. Empty at room creation","items":{"$ref":"#/definitions/createRoomSuccess_users"}},"customData":{"type":"object","properties":{}},"confEndpoints":{"type":"array","description":"Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room.","items":{"$ref":"#/definitions/createRoomSuccess_confEndpoints"}},"guestEmails":{"type":"array","description":"Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later","items":{"type":"string"}},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)"},"activeUsersCounter":{"type":"integer","description":"The number of users with the status 'accepted' or 'invited'. Only available when format=full","format":"int32"},"isActive":{"type":"boolean","description":"When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. This flag is read-only."},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack': If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link"}},"required":["id","name","visibility","topic","jid","creationDate","creator","users","customData","confEndpoints","guestEmails","disableNotifications","activeUsersCounter","isActive","autoRegister"]}},"required":["data"]},"createRoomSuccess_users":{"type":"object","properties":{}},"createRoomSuccess_confEndpoints":{"type":"object","properties":{}},"getRoomsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of room Objects.","items":{"$ref":"#/definitions/getRoomsSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getRoomsSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":"Room unique identifier (like 56d0277a0261b53142a5cab5)"},"name":{"type":"string","description":"Room name."},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"]},"topic":{"type":"string","description":"Room topic"},"jid":{"type":"string","description":"Room MUC JID"},"creationDate":{"type":"string","description":"Creation date of the room (read only, set automatically during room creation)","format":"date-time"},"creator":{"type":"string","description":"Rainbow Id of creator"},"users":{"type":"array","description":"List of users members of the room.","items":{"$ref":"#/definitions/getRoomsSuccess_users"}},"customData":{"type":"object","properties":{}},"confEndpoints":{"type":"array","description":"Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room.","items":{"$ref":"#/definitions/getRoomsSuccess_confEndpoints"}},"conference":{"type":"object","properties":{"scheduled":{"type":"boolean","description":"Kind of meeting (false: instant meeting, true: scheduled meeting)"},"scheduledStartDate":{"type":"string","description":"Scheduled meeting start date","format":"date-time"},"scheduledEndDate":{"type":"string","description":"Scheduled meeting end date","format":"date-time"},"scheduledDuration":{"type":"integer","description":"Scheduled meeting duration","format":"int32"},"mediaType":{"type":"string","description":"Conference type [pstnAudio, webrtc]"},"lastUpdateDate":{"type":"string","description":"Scheduled meeting creation or update date","format":"date-time"},"guestEmails":{"type":"array","description":"Array of non rainbow users email","items":{"type":"string"}}},"required":["scheduled","scheduledStartDate","scheduledEndDate","scheduledDuration","mediaType","lastUpdateDate","guestEmails"]},"guestEmails":{"type":"array","description":"Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later","items":{"type":"string"}},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)"},"activeUsersCounter":{"type":"integer","description":"The number of users with the status 'accepted' or 'invited'. Only available when format=full","format":"int32"},"isActive":{"type":"boolean","description":"When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. This flag is read-only."},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack': If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link"}},"required":["id","name","visibility","topic","jid","creationDate","creator","users","customData","confEndpoints","conference","guestEmails","disableNotifications","activeUsersCounter","isActive","autoRegister"]},"getRoomsSuccess_users":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]},"getRoomsSuccess_confEndpoints":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier the user owning the confEndPoint"},"confEndPointId":{"type":"string","description":"Identifier of the conference end point"},"mediaType":{"type":"string","description":"User identifier see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}][0])\n\n[0]: /conf-provision/#api-conferences-GetConference","enum":["pstnAudio","webrtc"]}},"required":["userId","confEndPointId","mediaType"]},"deleteRoomSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"getRoomByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Room unique identifier (like 56d0277a0261b53142a5cab5)"},"name":{"type":"string","description":"Room name."},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"]},"topic":{"type":"string","description":"Room topic"},"jid":{"type":"string","description":"Room MUC JID"},"creationDate":{"type":"string","description":"Creation date of the room (read only, set automatically during room creation)","format":"date-time"},"creator":{"type":"string","description":"Rainbow Id of creator"},"users":{"type":"array","description":"List of users members of the room.","items":{"$ref":"#/definitions/getRoomByIdSuccess_users"}},"customData":{"type":"object","properties":{}},"confEndpoints":{"type":"array","description":"Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room.","items":{"$ref":"#/definitions/getRoomByIdSuccess_confEndpoints"}},"conference":{"type":"object","properties":{"scheduled":{"type":"boolean","description":"Kind of meeting (false: instant meeting, true: scheduled meeting)"},"scheduledStartDate":{"type":"string","description":"Scheduled meeting start date","format":"date-time"},"scheduledEndDate":{"type":"string","description":"Scheduled meeting end date","format":"date-time"},"scheduledDuration":{"type":"integer","description":"Scheduled meeting duration","format":"int32"},"mediaType":{"type":"string","description":"Conference type [pstnAudio, webrtc]"},"lastUpdateDate":{"type":"string","description":"Scheduled meeting creation or update date","format":"date-time"},"guestEmails":{"type":"array","description":"Array of non rainbow users email","items":{"type":"string"}}},"required":["scheduled","scheduledStartDate","scheduledEndDate","scheduledDuration","mediaType","lastUpdateDate","guestEmails"]},"guestEmails":{"type":"array","description":"Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later","items":{"type":"string"}},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)"},"activeUsersCounter":{"type":"integer","description":"The number of users with the status 'accepted' or 'invited'. Only available when format=full","format":"int32"},"isActive":{"type":"boolean","description":"When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. This flag is read-only."},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack': If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link"}},"required":["id","name","visibility","topic","jid","creationDate","creator","users","customData","confEndpoints","conference","guestEmails","disableNotifications","activeUsersCounter","isActive","autoRegister"]}},"required":["data"]},"getRoomByIdSuccess_users":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]},"getRoomByIdSuccess_confEndpoints":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier the user owning the confEndPoint"},"confEndPointId":{"type":"string","description":"Identifier of the conference end point"},"mediaType":{"type":"string","description":"User identifier see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}][0])\n\n[0]: /conf-provision/#api-conferences-GetConference","enum":["pstnAudio","webrtc"]}},"required":["userId","confEndPointId","mediaType"]},"updateRoom":{"type":"object","properties":{"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"],"default":"private"},"topic":{"type":"string","description":"Room topic","minLength":1,"maxLength":255},"name":{"type":"string","description":"Room name","minLength":1,"maxLength":255},"owner":{"type":"string","description":"User unique identifier; New room owner must be a moderator and current owner must have valid licence (feature BUBBLE_PROMOTE_MEMBER)","minLength":1,"maxLength":255},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack' (value not authorized yet): If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link","enum":["unlock","lock"],"default":"unlock"}}},"updateRoomSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Room unique identifier (like 56d0277a0261b53142a5cab5)"},"name":{"type":"string","description":"Room name."},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"]},"topic":{"type":"string","description":"Room topic"},"jid":{"type":"string","description":"Room MUC JID"},"creationDate":{"type":"string","description":"Creation date of the room (read only, set automatically during room creation)","format":"date-time"},"creator":{"type":"string","description":"Rainbow Id of creator"},"users":{"type":"array","description":"List of users members of the room.","items":{"$ref":"#/definitions/updateRoomSuccess_users"}},"customData":{"type":"object","properties":{}},"confEndpoints":{"type":"array","description":"Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room.","items":{"$ref":"#/definitions/updateRoomSuccess_confEndpoints"}},"conference":{"type":"object","properties":{"scheduled":{"type":"boolean","description":"Kind of meeting (false: instant meeting, true: scheduled meeting)"},"scheduledStartDate":{"type":"string","description":"Scheduled meeting start date","format":"date-time"},"scheduledEndDate":{"type":"string","description":"Scheduled meeting end date","format":"date-time"},"scheduledDuration":{"type":"integer","description":"Scheduled meeting duration","format":"int32"},"mediaType":{"type":"string","description":"Conference type [pstnAudio, webrtc]"},"lastUpdateDate":{"type":"string","description":"Scheduled meeting creation or update date","format":"date-time"},"guestEmails":{"type":"array","description":"Array of non rainbow users email","items":{"type":"string"}}},"required":["scheduled","scheduledStartDate","scheduledEndDate","scheduledDuration","mediaType","lastUpdateDate","guestEmails"]},"guestEmails":{"type":"array","description":"Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later","items":{"type":"string"}},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)"},"activeUsersCounter":{"type":"integer","description":"The number of users with the status 'accepted' or 'invited'. Only available when format=full","format":"int32"},"isActive":{"type":"boolean","description":"When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. This flag is read-only."},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack': If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link"}},"required":["id","name","visibility","topic","jid","creationDate","creator","users","customData","confEndpoints","conference","guestEmails","disableNotifications","activeUsersCounter","isActive","autoRegister"]}},"required":["data"]},"updateRoomSuccess_users":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]},"updateRoomSuccess_confEndpoints":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier the user owning the confEndPoint"},"confEndPointId":{"type":"string","description":"Identifier of the conference end point"},"mediaType":{"type":"string","description":"User identifier see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}][0])\n\n[0]: /conf-provision/#api-conferences-GetConference","enum":["pstnAudio","webrtc"]}},"required":["userId","confEndPointId","mediaType"]},"getRoomByJidSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Room unique identifier (like 56d0277a0261b53142a5cab5)"},"name":{"type":"string","description":"Room name."},"visibility":{"type":"string","description":"Public/private group visibility for search","enum":["private","public"]},"topic":{"type":"string","description":"Room topic"},"jid":{"type":"string","description":"Room MUC JID"},"creationDate":{"type":"string","description":"Creation date of the room (read only, set automatically during room creation)","format":"date-time"},"creator":{"type":"string","description":"Rainbow Id of creator"},"users":{"type":"array","description":"List of users members of the room.","items":{"$ref":"#/definitions/getRoomByJidSuccess_users"}},"customData":{"type":"object","properties":{}},"confEndpoints":{"type":"array","description":"Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room.","items":{"$ref":"#/definitions/getRoomByJidSuccess_confEndpoints"}},"conference":{"type":"object","properties":{"scheduled":{"type":"boolean","description":"Kind of meeting (false: instant meeting, true: scheduled meeting)"},"scheduledStartDate":{"type":"string","description":"Scheduled meeting start date","format":"date-time"},"scheduledEndDate":{"type":"string","description":"Scheduled meeting end date","format":"date-time"},"scheduledDuration":{"type":"integer","description":"Scheduled meeting duration","format":"int32"},"mediaType":{"type":"string","description":"Conference type [pstnAudio, webrtc]"},"lastUpdateDate":{"type":"string","description":"Scheduled meeting creation or update date","format":"date-time"},"guestEmails":{"type":"array","description":"Array of non rainbow users email","items":{"type":"string"}}},"required":["scheduled","scheduledStartDate","scheduledEndDate","scheduledDuration","mediaType","lastUpdateDate","guestEmails"]},"guestEmails":{"type":"array","description":"Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later","items":{"type":"string"}},"disableNotifications":{"type":"boolean","description":"When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end)"},"activeUsersCounter":{"type":"integer","description":"The number of users with the status 'accepted' or 'invited'. Only available when format=full","format":"int32"},"isActive":{"type":"boolean","description":"When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server. This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence. This flag is read-only."},"autoRegister":{"type":"string","description":"A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link][0]). According with autoRegister value, if another person uses the link to join the room: \n\n* autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.\n* autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.\n* autoRegister = 'unlock_ack': If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment.\n\n\n[0]: #api-users_rooms_public_link"}},"required":["id","name","visibility","topic","jid","creationDate","creator","users","customData","confEndpoints","conference","guestEmails","disableNotifications","activeUsersCounter","isActive","autoRegister"]}},"required":["data"]},"getRoomByJidSuccess_users":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier"},"additionDate":{"type":"string","description":"Date when the user has been added in the room"},"privilege":{"type":"string","description":"Privilege of the user in the room","enum":["guest","user","moderator"]},"status":{"type":"string","description":"Status of the user in the room","enum":["invited","accepted","unsubscribed","rejected","deleted"]}},"required":["userId","additionDate","privilege","status"]},"getRoomByJidSuccess_confEndpoints":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier the user owning the confEndPoint"},"confEndPointId":{"type":"string","description":"Identifier of the conference end point"},"mediaType":{"type":"string","description":"User identifier see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}][0])\n\n[0]: /conf-provision/#api-conferences-GetConference","enum":["pstnAudio","webrtc"]}},"required":["userId","confEndPointId","mediaType"]},"getRainbowChangesSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{}},"changeLog":{"type":"string","description":""}},"required":["data","changeLog"]},"GetApiRainbowEnduserV10SettingsIceserversSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of current iceservers.","items":{"$ref":"#/definitions/GetApiRainbowEnduserV10SettingsIceserversSuccess_data"}}},"required":["data"]},"GetApiRainbowEnduserV10SettingsIceserversSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":""},"credential":{"type":"string","description":""},"urls":{"type":"string","description":""},"username":{"type":"string","description":""}},"required":["id","urls"]},"getUserSettingsSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"presence":{"type":"string","description":"Setting for manual user presence (used to go back to this presence when user logs in, instead of default (online))   \n  \nPossible values: `online`, `away`, `invisible`, `dnd`"},"displayNameOrderFirstNameFirst":{"type":"boolean","description":"Setting for user display name order \n\n* true: firstname first\n* false: lastname first\n\n"},"activeAlarm":{"type":"string","description":"Setting for active user alarm sound"},"activeNotif":{"type":"string","description":"Setting for active user notification sound"},"promptForCalendarPresence":{"type":"boolean","description":"Setting to bypass calendar presence popup"},"protectionAgainstMailTypeOffline":{"type":"boolean","description":"Never receive unsolicited emails of type 'offLine'"},"rainbowReadOnly":{"type":"object","properties":{"nbDaysBeforeWarningByMail":{"type":"integer","description":"Notifying offline user by mail, allowed after n days after last login","format":"int32"},"delayBetweenTwoWarningByMailInDays":{"type":"integer","description":"Retry notifying offline user by mail, allowed after n days after last attempt","format":"int32"}},"required":["nbDaysBeforeWarningByMail","delayBetweenTwoWarningByMailInDays"]}},"required":["presence","displayNameOrderFirstNameFirst","activeAlarm","activeNotif","promptForCalendarPresence","protectionAgainstMailTypeOffline","rainbowReadOnly"]}},"required":["data"]},"updateUserSettings":{"type":"object","properties":{"presence":{"type":"string","description":"Setting for manual user presence (used to go back to this presence when user logs in, instead of default (online))","enum":["online","away","invisible","dnd"],"default":"online"},"displayNameOrderFirstNameFirst":{"type":"boolean","description":"Setting for user display name order \n\n* true: firstname first\n* false: lastname first\n\n","default":"true"},"activeAlarm":{"type":"string","description":"Setting for active user alarm sound","default":"relax1","minLength":0,"maxLength":32},"activeNotif":{"type":"string","description":"Setting for active user notification sound","default":"notif1","minLength":0,"maxLength":32},"protectionAgainstMailTypeOffline":{"type":"boolean","description":"Allow never receiving unsolicited emails of type 'offLine'","default":"false"}}},"updateUserSettingsSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"presence":{"type":"string","description":"Setting for manual user presence (used to go back to this presence when user logs in, instead of default (online))   \n  \nPossible values: `online`, `away`, `invisible`, `dnd`"},"displayNameOrderFirstNameFirst":{"type":"boolean","description":"Setting for user display name order \n\n* true: firstname first\n* false: lastname first\n\n"},"activeAlarm":{"type":"string","description":"Setting for active user alarm sound"},"activeNotif":{"type":"string","description":"Setting for active user notification sound"},"promptForCalendarPresence":{"type":"boolean","description":"Setting to bypass calendar presence popup"},"protectionAgainstMailTypeOffline":{"type":"boolean","description":"Never receive unsolicited emails of type 'offLine'"},"rainbowReadOnly":{"type":"object","properties":{"nbDaysBeforeWarningByMail":{"type":"integer","description":"Notifying offline user by mail, allowed after n days after last login","format":"int32"},"delayBetweenTwoWarningByMailInDays":{"type":"integer","description":"Retry notifying offline user by mail, allowed after n days after last attempt","format":"int32"}},"required":["nbDaysBeforeWarningByMail","delayBetweenTwoWarningByMailInDays"]}},"required":["presence","displayNameOrderFirstNameFirst","activeAlarm","activeNotif","promptForCalendarPresence","protectionAgainstMailTypeOffline","rainbowReadOnly"]}},"required":["data"]},"createSource":{"type":"object","properties":{"sourceId":{"type":"string","description":"Id of source, that could be IMEI or factory number for mobiles , email for Outlook or account number for Facebook. Only one sourceId must exist _by user_."},"os":{"type":"string","description":"Operating system name and version."}},"required":["sourceId","os"]},"createSourceSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Source unique identifier"},"os":{"type":"string","description":"Operating system name and version"},"sourceId":{"type":"string","description":"Id of source that could be IMEI or factory number for mobiles, email for Outloock or account number for Facebook"}},"required":["id","os","sourceId"]}},"required":["data"]},"getAllSourcesByUserIdSuccess":{"type":"object","properties":{"data":{"type":"array","description":"sources id list is sent.","items":{"$ref":"#/definitions/getAllSourcesByUserIdSuccess_data"}},"limit":{"type":"number","description":"Number of requested items"},"offset":{"type":"number","description":"Requested position of the first item to retrieve"},"total":{"type":"number","description":"Total number of items"}},"required":["data","limit","offset","total"]},"getAllSourcesByUserIdSuccess_data":{"type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]},"deleteSourceSuccess":{"type":"object","properties":{"Status":{"type":"string","description":"Deletion status"}},"required":["Status"]},"getSourceDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Source unique identifier"},"os":{"type":"string","description":"Operating system name and version"},"sourceId":{"type":"string","description":"Id of source that could be IMEI or factory number for mobiles, email for Outloock or account number for Facebook"}},"required":["id","os","sourceId"]}},"required":["data"]},"updateSourceData":{"type":"object","properties":{"os":{"type":"string","description":"Operating system name and version."}},"required":["os"]},"updateSourceDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Source unique identifier"},"os":{"type":"string","description":"Operating system name and version"},"sourceId":{"type":"string","description":"Id of source that could be IMEI or factory number for mobiles, email for Outloock or account number for Facebook"}},"required":["id","os","sourceId"]}},"required":["data"]},"deleteUserAvatarSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Avatar delete status message."}},"required":["status"]},"uploadUserAvatar":{"type":"object","properties":{"Content":{"type":"string","description":"File to be sent","format":"binary"}},"required":["Content"]},"uploadUserAvatarSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Avatar upload status message."}},"required":["status"]},"getAvatarSuccess":{"type":"object","properties":{"Content-Type":{"type":"string","description":"Avatar content-type.","enum":["image/jpeg","image/png"]},"Dims-cached":{"type":"string","description":"Whether or not the resize avatar file has been cached by nginx."},"Last-Modified":{"type":"string","description":"Last avatar update date (for user: same value than the one in user object and in user vCard).","format":"date-time"},"Date":{"type":"string","description":"Request date.","format":"date-time"},"Content":{"type":"string","description":"File to be received","format":"binary"}},"required":["Content-Type","Dims-cached","Last-Modified","Date","Content"]},"bindPersonaOpenInviteWithRoomId":{"type":"object","properties":{"roomId":{"type":"string","description":"Room unique identifier."}},"required":["roomId"]},"bindPersonaOpenInviteWithRoomIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url'"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"}},"required":["userId","openInviteId","roomId"]}},"required":["data"]},"createOrResetPersonalOpenInviteSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url'"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"}},"required":["userId","openInviteId","roomId"]}},"required":["data"]},"getPersonalOpenInviteSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url'"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"}},"required":["userId","openInviteId","roomId"]}},"required":["data"]},"unbindOpenInviteWithRoomIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url'"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"}},"required":["userId","openInviteId","roomId"]}},"required":["data"]},"bindOpenInviteIdWithRoomId":{"type":"object","properties":{"roomId":{"type":"string","description":"Room unique identifier."}},"required":["roomId"]},"bindOpenInviteIdWithRoomIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://meet.openrainbow.com/0fc06e0ce4a849fcbe214ae5e1107417"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"},"roomType":{"type":"string","description":"Type that classify the public link ('default', 'personal_audio_room', 'personal_video_room')"}},"required":["userId","openInviteId","roomId","roomType"]}},"required":["data"]},"getOpenInviteIdsOfUserSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://meet.openrainbow.com/0fc06e0ce4a849fcbe214ae5e1107417"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"},"roomType":{"type":"string","description":"Type that classify the public link ('default', 'personal_audio_room', 'personal_video_room')"}},"required":["userId","openInviteId","roomId","roomType"]}},"required":["data"]},"resetOpenInviteIdOfRoomIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://meet.openrainbow.com/0fc06e0ce4a849fcbe214ae5e1107417"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"},"roomType":{"type":"string","description":"Type that classify the public link ('default', 'personal_audio_room', 'personal_video_room')"}},"required":["userId","openInviteId","roomId","roomType"]}},"required":["data"]},"unbindOpenInviteIdWithRoomId":{"type":"object","properties":{"roomId":{"type":"string","description":"Room unique identifier."}},"required":["roomId"]},"unbindOpenInviteIdWithRoomIdSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Unbind operation status message."},"data":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier"},"openInviteId":{"type":"string","description":"uuid representing a part of the user's public URL to invite somebody to join a room. Example of public URL: https://meet.openrainbow.com/0fc06e0ce4a849fcbe214ae5e1107417"},"roomId":{"type":"string","description":"Room unique identifier. Field can be empty when the open invite is not bind with a room"},"roomType":{"type":"string","description":"Type that classify the public link ('default', 'personal_audio_room', 'personal_video_room')"}},"required":["userId","openInviteId","roomId","roomType"]}},"required":["status","data"]},"deleteMyselfSuccess":{"type":"object","properties":{"status":{"type":"string","description":"Delete operation status message."}},"required":["status"]},"getUserDataByIdSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are only visible by the user and all users belonging to his organisation/company.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/getUserDataByIdSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/getUserDataByIdSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA', a state can be defined. Else it is not managed.","enum":["ALABAMA","ALASKA","....","NEW_YORK","WYOMING"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"roles":{"type":"array","description":"DEPRECATED (will be removed in a future release).   \nList of user roles (Array of String)","items":{"type":"string"}},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"lastOfflineMailReceivedDate":{"type":"string","description":"The last time the user has received a message to connect to Rainbow from the logged in user","format":"date-time"}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","companyId","companyName","roles","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode","lastOfflineMailReceivedDate"]},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company   \nOnly returned if retrieved user data corresponds to logged in user or if logged in user is admin of the retrieved user"}},"required":["isInDefaultCompany","data"]},"getUserDataByIdSuccess_calendars":{"type":"object","properties":{"email":{"type":"string","description":"Calendar email   \nOnly returned if the requested user is the logged in user."},"enabled":{"type":"boolean","description":"Boolean indicating if the calendar synchronisation from external provider to Rainbow is enabled   \nOnly returned if the requested user is the logged in user."}},"required":["email","enabled"]},"getUserDataByIdSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"getUserDataByIdSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"updateUser":{"type":"object","properties":{"phoneNumbers":{"type":"array","description":"Array of user PhoneNumbers objects   \n  \n_Notes:_* Provided PhoneNumbers data overwrite previous values: \n  * PhoneNumbers which are not known on server side are added,\n  * PhoneNumbers which are changed are updated,\n  * PhoneNumbers which are not provided but existed on server side are deleted.\n  * This does not applies to PhoneNumbers linked to a system(pbx), which can only be updated (addition and deletion of system PhoneNumbers are ignored).\n* When number is present, the server tries to compute the associated E.164 number (`numberE164` field) using provided PhoneNumber country if available, user country otherwise. If `numberE164` can't be computed, an error 400 is returned (ex: wrong phone number, phone number not matching country code, ...)\n* PhoneNumber linked to a system (pbx) can also be updated. In that case, `shortNumber` and `systemId` of the existing system PhoneNumber must be provided with the fields to update (see example bellow).\n* System phoneNumbers can't be created nor deleted using this API, only PCG can create/delete system PhoneNumbers.\n\n","items":{"$ref":"#/definitions/updateUser_phoneNumbers"}},"firstName":{"type":"string","description":"User first name","minLength":1,"maxLength":255},"lastName":{"type":"string","description":"User last name","minLength":1,"maxLength":255},"nickName":{"type":"string","description":"User nickName","minLength":1,"maxLength":255},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)","minLength":1,"maxLength":40},"jobTitle":{"type":"string","description":"User job title","minLength":1,"maxLength":255},"emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address","minLength":3,"maxLength":255},"type":{"type":"string","description":"User email type","enum":["home","work","other"]}},"required":["email","type"]},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)","maxLength":3,"minLength":3},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n","enum":["null","AA","AE","AP","AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY","AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},"language":{"type":"string","description":"User language   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","maxLength":2,"minLength":2},"timezone":{"type":"string","description":"User timezone name   \n  \nAllowed values: one of the timezone names defined in [IANA tz database][0]  \nTimezone name are composed as follow: `Area/Location` (ex: Europe/Paris, America/New_York,...)\n\n[0]: https://www.iana.org/time-zones"},"isInitialized":{"type":"boolean","description":"Is user initialized"},"visibility":{"type":"string","description":"User visibility (define if users can be searched of not, overwrite visibility setting at company level)","enum":["public","private","none"]}}},"updateUser_phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"User phone number (as entered by user).   \nNot mandatory if the PhoneNumber to update is a PhoneNumber linked to a system (pbx)","minLength":1,"maxLength":32},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format).   \n  \nUsed to compute `numberE164` field from number field. If not provided, user country is used by default.","maxLength":3,"minLength":3},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]},"deviceType":{"type":"string","description":"Phone number device type","enum":["landline","mobile","fax","other"]},"shortNumber":{"type":"string","description":"**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nShort phone number (corresponds to the number monitored by PCG).   \nRead only field, only used by server to find the related system PhoneNumber to update (couple `shortNumber`/`systemId`).","minLength":1,"maxLength":32},"systemId":{"type":"string","description":"**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nUnique identifier of the system in Rainbow database to which the system PhoneNumbers belong.   \nRead only field, only used by server to find the related system PhoneNumber to update (couple `shortNumber`/`systemId`).","minLength":1,"maxLength":32},"internalNumber":{"type":"string","description":"**[Only for update of PhoneNumbers linked to a system (pbx)]**  \n  \nInternal phone number. Usable within a PBX group. By default, it is equal to `shortNumber`.   \nAdmins and users can modify this internalNumber field.   \n`internalNumber` must be unique in the whole system group to which the related PhoneNumber belong (an error 409 is raised if someone tries to update internalNumber to a number already used by another PhoneNumber in the same system group).","minLength":1,"maxLength":32}},"required":["number","type","deviceType"]},"updateUserSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"User email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are visible by the user and all users belonging to his organisation/company, and can be used with the search API to search the user based on his tags.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/updateUserSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/updateUserSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.","enum":["AK","AL","....","NY","WY"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"jid_password":{"type":"string","description":"User Jabber IM and TEL password"},"roles":{"type":"array","description":"List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).","items":{"type":"string"}},"adminType":{"type":"string","description":"In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)"},"companyId":{"type":"string","description":"User company unique identifier"},"organisationId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to an organization"},"siteId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to a site"},"companyName":{"type":"string","description":"User company name"},"isActive":{"type":"boolean","description":"Is user active"},"isInitialized":{"type":"boolean","description":"Is user initialized"},"initializationDate":{"type":"string","description":"User initialization date","format":"date-time"},"activationDate":{"type":"string","description":"User activation date","format":"date-time"},"creationDate":{"type":"string","description":"User creation date","format":"date-time"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"createdBySelfRegister":{"type":"boolean","description":"true if user has been created using self register"},"createdByAdmin":{"type":"object","properties":{"userId":{"type":"string","description":"userId of the admin who created this user"},"loginEmail":{"type":"string","description":"loginEmail of the admin who created this user"}},"required":["userId","loginEmail"]},"invitedBy":{"type":"object","properties":{"userId":{"type":"string","description":"userId of the user who invited this user"},"loginEmail":{"type":"string","description":"loginEmail of the user who invited this user"}},"required":["userId","loginEmail"]},"firstLoginDate":{"type":"string","description":"Date of first user login (only set the first time user logs in, null if user never logged in)","format":"date-time"},"lastLoginDate":{"type":"string","description":"Date of last user login (defined even if user is logged out)","format":"date-time"},"loggedSince":{"type":"string","description":"Date of last user login (null if user is logged out)","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"timeToLive":{"type":"number","description":"Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire)."},"authenticationType":{"type":"string","description":"User authentication type (if not set company default authentication will be used)"}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","jid_password","roles","adminType","companyId","organisationId","siteId","companyName","isActive","isInitialized","initializationDate","activationDate","creationDate","lastUpdateDate","lastAvatarUpdateDate","createdBySelfRegister","createdByAdmin","invitedBy","firstLoginDate","lastLoginDate","loggedSince","isTerminated","guestMode","timeToLive","authenticationType"]},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company"}},"required":["isInDefaultCompany","data"]},"updateUserSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"updateUserSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"getConnectedUserDataSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are only visible by the user and all users belonging to his organisation/company.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/getConnectedUserDataSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/getConnectedUserDataSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA', a state can be defined. Else it is not managed.","enum":["ALABAMA","ALASKA","....","NEW_YORK","WYOMING"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"roles":{"type":"array","description":"DEPRECATED (will be removed in a future release).   \nList of user roles (Array of String)","items":{"type":"string"}},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"lastOfflineMailReceivedDate":{"type":"string","description":"The last time the user has received a message to connect to Rainbow from the logged in user","format":"date-time"}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","companyId","companyName","roles","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode","lastOfflineMailReceivedDate"]},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company"}},"required":["isInDefaultCompany","data"]},"getConnectedUserDataSuccess_calendars":{"type":"object","properties":{"email":{"type":"string","description":"Calendar email"},"enabled":{"type":"boolean","description":"Boolean indicating if the calendar synchronisation from external provider to Rainbow is enabled"}},"required":["email","enabled"]},"getConnectedUserDataSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"getConnectedUserDataSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"getUserByJidSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are only visible by the user and all users belonging to his organisation/company.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/getUserByJidSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/getUserByJidSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA', a state can be defined. Else it is not managed.","enum":["ALABAMA","ALASKA","....","NEW_YORK","WYOMING"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"roles":{"type":"array","description":"DEPRECATED (will be removed in a future release).   \nList of user roles (Array of String)","items":{"type":"string"}},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"lastOfflineMailReceivedDate":{"type":"string","description":"The last time the user has received a message to connect to Rainbow from the logged in user","format":"date-time"}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","companyId","companyName","roles","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode","lastOfflineMailReceivedDate"]},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company   \nOnly returned if retrieved user data corresponds to logged in user or if logged in user is admin of the retrieved user"}},"required":["isInDefaultCompany","data"]},"getUserByJidSuccess_calendars":{"type":"object","properties":{"email":{"type":"string","description":"Calendar email   \nOnly returned if the requested user is the logged in user."},"enabled":{"type":"boolean","description":"Boolean indicating if the calendar synchronisation from external provider to Rainbow is enabled   \nOnly returned if the requested user is the logged in user."}},"required":["email","enabled"]},"getUserByJidSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"getUserByJidSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"getUserNetworkSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of user Objects.","items":{"$ref":"#/definitions/getUserNetworkSuccess_data"}}},"required":["data"]},"getUserNetworkSuccess_data":{"type":"object","properties":{"showPresence":{"type":"boolean","description":"True when the user agreed to show his presence"},"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are only visible by the user and all users belonging to his organisation/company.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/getUserNetworkSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/getUserNetworkSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA', a state can be defined. Else it is not managed.","enum":["ALABAMA","ALASKA","....","NEW_YORK","WYOMING"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"roles":{"type":"array","description":"DEPRECATED (will be removed in a future release).   \nList of user roles (Array of String)","items":{"type":"string"}},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"lastOfflineMailReceivedDate":{"type":"string","description":"The last time the user has received a message to connect to Rainbow from the logged in user","format":"date-time"}},"required":["showPresence","id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","companyId","companyName","roles","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode","lastOfflineMailReceivedDate"]},"getUserNetworkSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"getUserNetworkSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"getUsersByloginEmails":{"type":"object","properties":{"loginEmail":{"type":"array","description":"Allows to search users having loginEmail equal to one of the emails provided in this option.","items":{"type":"string"}}},"required":["loginEmail"]},"getUsersByloginEmailsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of user Objects.","items":{"$ref":"#/definitions/getUsersByloginEmailsSuccess_data"}}},"required":["data"]},"getUsersByloginEmailsSuccess_data":{"type":"object","properties":{"loginEmail":{"type":"string","description":"User email address (used for login)"},"id":{"type":"string","description":"User unique identifier"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."}},"required":["loginEmail","id","firstName","lastName","jid_im","companyId","companyName","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode"]},"registerMyself":{"type":"object","properties":{"loginEmail":{"type":"string","description":"User email address (used for login).   \nMust be unique (409 error is returned if a user already exists with the same email address).","minLength":3,"maxLength":255},"password":{"type":"string","description":"User password.   \nRules: more than 8 characters, at least 1 capital letter, 1 number, 1 special character.","minLength":8,"maxLength":64},"temporaryToken":{"type":"string","description":"User temporary token (obtained from [POST /api/rainbow/enduser/v1.0/notifications/emails/self-register][0] API) (do not use if invitationId or joinCompanyInvitationId is specified).\n\n[0]: #api-enduser_notifications_emails-EmailSelfRegister","maxLength":6,"minLength":6},"invitationId":{"type":"string","description":"User invitation unique identifier (like 569ce8c8f9336c471b98eda4) (obtained from [POST /api/rainbow/enduser/v1.0/notifications/emails/invite-by-end-user][0] API) (do not use if temporaryToken or joinCompanyInvitationId is specified).\n\n[0]: #api-enduser_notifications_emails-enduser_InviteByEndUser"},"joinCompanyInvitationId":{"type":"string","description":"Join company invitation unique identifier (like 5819ed7c9547b313509237d6) (obtained from [POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations][0] API) (do not use if temporaryToken or invitationId is specified).\n\n[0]: /admin/#api-join_company_invitations-admin_PostJoinCompanyInvite"},"openInviteId":{"type":"string","description":"A Rainbow user is sharing with co-workers an unique URL to join a meeting. This URL is used by somebody not yet a Rainbow user (doesn't have a Rainbow account). Some explanations about this use case: \n\n* Each user has a personal UUID. In the api documentation, this UUID is called **openInviteId**. It can be generated on demand.\n* The public URL is based on this openInviteId (ex: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario=public-url)\n* Refer to /api/rainbow/enduser/v1.0/users/:userId/open-invites/xxxx API(s) to manage the openInviteId\n\n"},"isInitialized":{"type":"boolean","description":"Is user initialized","default":"false"},"firstName":{"type":"string","description":"User first name","minLength":1,"maxLength":255},"lastName":{"type":"string","description":"User last name","minLength":1,"maxLength":255},"nickName":{"type":"string","description":"User nickName","minLength":1,"maxLength":255},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)","minLength":1,"maxLength":40},"jobTitle":{"type":"string","description":"User job title","minLength":1,"maxLength":255},"emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address","minLength":3,"maxLength":255},"type":{"type":"string","description":"User email type","enum":["home","work","other"]}},"required":["email","type"]},"phoneNumbers":{"type":"object","properties":{"number":{"type":"string","description":"User phone number (as entered by user)","minLength":1,"maxLength":32},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field.   \n  \nIf not provided, user country is used by default.","maxLength":3,"minLength":3},"type":{"type":"string","description":"Phone number type","enum":["home","work","other"]},"deviceType":{"type":"string","description":"Phone number device type","enum":["landline","mobile","fax","other"]}},"required":["number","country","type","deviceType"]},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)","maxLength":3,"minLength":3},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.   \nUSA states code list: `AA`:\"Armed Forces America\",\n`AE`:\"Armed Forces\",\n`AP`:\"Armed Forces Pacific\",\n`AK`:\"Alaska\",\n`AL`:\"Alabama\",\n`AR`:\"Arkansas\",\n`AZ`:\"Arizona\",\n`CA`:\"California\",\n`CO`:\"Colorado\",\n`CT`:\"Connecticut\",\n`DC`:\"Washington DC\",\n`DE`:\"Delaware\",\n`FL`:\"Florida\",\n`GA`:\"Georgia\",\n`GU`:\"Guam\",\n`HI`:\"Hawaii\",\n`IA`:\"Iowa\",\n`ID`:\"Idaho\",\n`IL`:\"Illinois\",\n`IN`:\"Indiana\",\n`KS`:\"Kansas\",\n`KY`:\"Kentucky\",\n`LA`:\"Louisiana\",\n`MA`:\"Massachusetts\",\n`MD`:\"Maryland\",\n`ME`:\"Maine\",\n`MI`:\"Michigan\",\n`MN`:\"Minnesota\",\n`MO`:\"Missouri\",\n`MS`:\"Mississippi\",\n`MT`:\"Montana\",\n`NC`:\"North Carolina\",\n`ND`:\"North Dakota\",\n`NE`:\"Nebraska\",\n`NH`:\"New Hampshire\",\n`NJ`:\"New Jersey\",\n`NM`:\"New Mexico\",\n`NV`:\"Nevada\",\n`NY`:\"New York\",\n`OH`:\"Ohio\",\n`OK`:\"Oklahoma\",\n`OR`:\"Oregon\",\n`PA`:\"Pennsylvania\",\n`PR`:\"Puerto Rico\",\n`RI`:\"Rhode Island\",\n`SC`:\"South Carolina\",\n`SD`:\"South Dakota\",\n`TN`:\"Tennessee\",\n`TX`:\"Texas\",\n`UT`:\"Utah\",\n`VA`:\"Virginia\",\n`VI`:\"Virgin Islands\",\n`VT`:\"Vermont\",\n`WA`:\"Washington\",\n`WI`:\"Wisconsin\",\n`WV`:\"West Virginia\",\n`WY`:\"Wyoming\"   \nCanada states code list:\n`AB`: \"Alberta\",\n`BC`: \"British Columbia\",\n`MB`: \"Manitoba\",\n`NB`: \"New Brunswick\",\n`NL`: \"Newfoundland and Labrador\",\n`NS`: \"Nova Scotia\",\n`NT`: \"Northwest Territories\",\n`NU`: \"Nunavut\",\n`ON`: \"Ontario\",\n`PE`: \"Prince Edward Island\",\n`QC`: \"Quebec\",\n`SK`: \"Saskatchewan\",\n`YT`: \"Yukon\"\n","enum":["null","AA","AE","AP","AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY","AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},"language":{"type":"string","description":"User language   \n  \nLanguage format is composed of locale using format `ISO 639-1`, with optionally the regional variation using `ISO 3166‑1 alpha-2` (separated by hyphen).   \nLocale part is in lowercase, regional part is in uppercase. Examples: en, en-US, fr, fr-FR, fr-CA, es-ES, es-MX, ...   \nMore information about the format can be found on this [link][0].\n\n[0]: https://en.wikipedia.org/wiki/Language_localisation#Language_tags_and_codes","maxLength":2,"minLength":2},"timezone":{"type":"string","description":"User timezone name   \n  \nAllowed values: one of the timezone names defined in [IANA tz database][0]  \nTimezone name are composed as follow: `Area/Location` (ex: Europe/Paris, America/New_York,...)\n\n[0]: https://www.iana.org/time-zones"},"visibility":{"type":"string","description":"User visibility (define if users can be searched of not, overwrite visibility setting at company level)","enum":["public","private","none"]}},"required":["loginEmail","password"]},"registerMyselfSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"User email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"tags":{"type":"array","description":"An Array of free tags associated to the user.   \nA maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.   \n`tags` can only be set by users who have administrator rights on the user. The user can't modify the tags.   \nThe tags are visible by the user and all users belonging to his organisation/company, and can be used with the search API to search the user based on his tags.","items":{"type":"string"}},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/registerMyselfSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/registerMyselfSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"state":{"type":"string","description":"When country is 'USA' or 'CAN', a state can be defined. Else it is not managed.","enum":["AK","AL","....","NY","WY"]},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"jid_password":{"type":"string","description":"User Jabber IM and TEL password"},"roles":{"type":"array","description":"List of user roles (Array of String)   \nNote: `company_support` role is only used for support redirection. If a user writes a #support ticket and have the role `company_support`, the ticket will be sent to ALE's support (otherwise the ticket is sent to user's company's `supportEmail` address is set, ALE otherwise).","items":{"type":"string"}},"adminType":{"type":"string","description":"In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)"},"companyId":{"type":"string","description":"User company unique identifier"},"organisationId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to an organization"},"siteId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to a site"},"companyName":{"type":"string","description":"User company name"},"isActive":{"type":"boolean","description":"Is user active"},"isInitialized":{"type":"boolean","description":"Is user initialized"},"initializationDate":{"type":"string","description":"User initialization date","format":"date-time"},"activationDate":{"type":"string","description":"User activation date","format":"date-time"},"creationDate":{"type":"string","description":"User creation date","format":"date-time"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"createdBySelfRegister":{"type":"boolean","description":"true if user has been created using self register"},"createdByAdmin":{"type":"object","properties":{"userId":{"type":"string","description":"userId of the admin who created this user"},"loginEmail":{"type":"string","description":"loginEmail of the admin who created this user"}},"required":["userId","loginEmail"]},"invitedBy":{"type":"object","properties":{"userId":{"type":"string","description":"userId of the user who invited this user"},"loginEmail":{"type":"string","description":"loginEmail of the user who invited this user"}},"required":["userId","loginEmail"]},"firstLoginDate":{"type":"string","description":"Date of first user login (only set the first time user logs in, null if user never logged in)","format":"date-time"},"lastLoginDate":{"type":"string","description":"Date of last user login (defined even if user is logged out)","format":"date-time"},"loggedSince":{"type":"string","description":"Date of last user login (null if user is logged out)","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."},"timeToLive":{"type":"number","description":"Duration in second to wait before automatically starting a user deletion from the creation date.   \nOnce the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.   \nValue -1 means timeToLive is disable (i.e. user account will not expire)."},"authenticationType":{"type":"string","description":"User authentication type (if not set company default authentication will be used)"}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","tags","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","jid_password","roles","adminType","companyId","organisationId","siteId","companyName","isActive","isInitialized","initializationDate","activationDate","creationDate","lastUpdateDate","lastAvatarUpdateDate","createdBySelfRegister","createdByAdmin","invitedBy","firstLoginDate","lastLoginDate","loggedSince","isTerminated","guestMode","timeToLive","authenticationType"]},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company"}},"required":["isInDefaultCompany","data"]},"registerMyselfSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"registerMyselfSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"removeContactFromUserNetworkSuccess":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"User id"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"}},"required":["id","jid_im","jid_tel"]}},"required":["data"]},"searchUsersByJids":{"type":"object","properties":{"jid_im":{"type":"array","description":"Allows to search users having jid_im equal to one of the jids provided in this option.","items":{"type":"string"}}},"required":["jid_im"]},"searchUsersByJidsSuccess":{"type":"object","properties":{"data":{"type":"array","description":"List of user Objects.","items":{"$ref":"#/definitions/searchUsersByJidsSuccess_data"}}},"required":["data"]},"searchUsersByJidsSuccess_data":{"type":"object","properties":{"loginEmail":{"type":"string","description":"DEPRECATED (will be removed in a future release).   \nUser email address (used for login)"},"id":{"type":"string","description":"User unique identifier"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"companyId":{"type":"string","description":"User company unique identifier"},"companyName":{"type":"string","description":"User company name"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."}},"required":["loginEmail","id","firstName","lastName","jid_im","companyId","companyName","lastUpdateDate","lastAvatarUpdateDate","isTerminated","guestMode"]}},"tags":[{"name":"Bots"},{"name":"Common"},{"name":"Companies"},{"name":"Contacts"},{"name":"Conversations"},{"name":"Groups"},{"name":"Invitations"},{"name":"Join Company Invitations"},{"name":"Join Company Requests"},{"name":"Notifications IM"},{"name":"Notifications Emails"},{"name":"Password"},{"name":"Presences"},{"name":"Profile"},{"name":"Rainbow Profiles"},{"name":"Rooms"},{"name":"Rooms Avatar"},{"name":"Rooms Conference"},{"name":"Rooms Custom Data"},{"name":"Rooms Invitation"},{"name":"Rooms Open Invite"},{"name":"Rooms Users"},{"name":"Settings Rainbow Change Log"},{"name":"Settings WebRTC"},{"name":"Settings"},{"name":"Sources"},{"name":"Users Avatar"},{"name":"Users Open Invite"},{"name":"Users"}],"x-servers":[{"url":"https://openrainbow.com","description":"Production server"},{"url":"https://sandbox.openrainbow.com","description":"Development server"}],"x-tagGroups":[{"name":"Bots","tags":["Bots"]},{"name":"Common","tags":["Common"]},{"name":"Companies","tags":["Companies Avatar","Companies","Join Company Invitations","Join Company Requests"]},{"name":"Contacts","tags":["Contacts"]},{"name":"Notifications","tags":["Notifications IM","Notifications Emails"]},{"name":"Rainbow Profiles","tags":["Rainbow Profiles"]},{"name":"Rooms","tags":["Rooms Avatar","Rooms Conference","Rooms Custom Data","Rooms Invitation","Rooms Open Invite","Rooms Users","Rooms"]},{"name":"Settings","tags":["Settings Rainbow Change Log","Settings WebRTC","Settings"]},{"name":"Users","tags":["Conversations","Groups","Invitations","Password","Presences","Profile","Users","Users Avatar","Users Open Invite"]},{"name":"Sources","tags":["Sources"]}]}