{"basePath":"\/api","consumes":["application\/json"],"definitions":{"Connection":{"properties":{"connection_id":{"description":"Unique identifier for this connection","type":"string"},"info":{"description":"Extra information about the connection","type":"object"},"name":{"description":"Name for this connection","type":"string"},"on_connect_commands":{"description":"Commands to be run after the connection is established","items":{"type":"string"}},"state":{"description":"Actual connection state","enum":["connected","connecting","disconnected","disconnecting","queued"],"type":"string"},"url":{"description":"Example: irc:\/\/user:@irc.perl.org?nick=superman (Note: Without password)","format":"uri","type":"string"},"wanted_state":{"description":"Wanted connection state","enum":["connected","disconnected"],"type":"string"}},"required":["connection_id","url"],"type":"object"},"ConnectionProfile":{"properties":{"is_default":{"type":"boolean"},"is_forced":{"type":"boolean"},"max_bulk_message_size":{"maximum":32,"minimum":1,"type":"integer"},"max_message_length":{"maximum":2048,"minimum":32,"type":"integer"},"service_accounts":{"items":{"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"},"webirc_password":{"type":"string"}},"required":["url"],"type":"object"},"Conversation":{"properties":{"connection_id":{"description":"Unique identifier for the connection this conversation is part of","type":"string"},"conversation_id":{"description":"Unique identifier for the conversation","type":"string"},"name":{"description":"Name of the room or person","type":"string"},"topic":{"description":"The subjec\/topic for this room","type":"string"},"unread":{"description":"Number of unread messages","type":"integer"}},"required":["connection_id","conversation_id","name","unread"],"type":"object"},"DefaultResponse":{"properties":{"errors":{"items":{"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["message"],"type":"object"},"type":"array"}},"required":["errors"],"type":"object"},"Message":{"properties":{"from":{"description":"Identifier for who sent this message","type":"string"},"message":{"description":"The message","type":"string"},"ts":{"description":"Example: 2015-09-06T13:49:37Z","format":"date-time","type":"string"}},"required":["message","from","ts"],"type":"object"},"Notification":{"properties":{"connection_id":{"description":"Unique identifier for the connection this notification came from","type":"string"},"conversation_id":{"description":"Conversation ID","type":"string"},"from":{"description":"Identifier for who sent this message","type":"string"},"message":{"description":"The message","type":"string"},"ts":{"description":"Example: 2015-09-06T13:49:37Z","format":"date-time","type":"string"}},"required":["message","from","ts"],"type":"object"},"Password":{"description":"User password","minLength":10,"type":"string"},"ServerSettings":{"properties":{"contact":{"minLength":3,"type":"string"},"default_connection":{"format":"uri","type":"string"},"disk_usage":{"properties":{"block_size":{"type":"integer"},"blocks_free":{"type":"integer"},"blocks_total":{"type":"integer"},"blocks_used":{"type":"integer"},"inodes_free":{"type":"integer"},"inodes_total":{"type":"integer"},"inodes_used":{"type":"integer"}},"type":"object"},"forced_connection":{"type":"boolean"},"open_to_public":{"type":"boolean"},"organization_name":{"type":"string"},"organization_url":{"type":"string"},"video_service":{"type":"string"}},"type":"object"},"Success":{"properties":{"message":{"description":"Human readable description","type":"string"}},"type":"object"},"User":{"properties":{"connections":{"items":{"$ref":"#\/definitions\/Connection"}},"conversations":{"items":{"$ref":"#\/definitions\/Conversation"}},"default_connection":{"readOnly":true,"type":"string"},"email":{"description":"Unique email identifying a user in Convos","type":"string"},"forced_connection":{"readOnly":true,"type":"boolean"},"highlight_keywords":{"description":"Extra keywords to highlight on","items":{"type":"string"}},"registered":{"description":"Example: 2015-09-06T10:47:31Z","format":"date-time","type":"string"},"uid":{"type":"string"},"unread":{"description":"Number of unread notifications","type":"integer"},"video_service":{"type":"string"}},"required":["email","unread"],"type":"object"}},"host":"convos.chat","info":{"contact":{"name":"Convos","url":"https:\/\/github.com\/convos-chat\/convos"},"description":"This document describes the API for Convos, a multiuser persistent IRC proxy with web interface.","license":{"name":"Artistic License version 2.0","url":"http:\/\/opensource.org\/licenses\/Artistic-2.0"},"termsOfService":"SSL (HTTPS) is highly suggested, since login credentials and session cookies are transmitted over this API.","title":"Convos API specification","version":"8.07"},"parameters":{"after":{"description":"Find messages after a given ISO 8601 timestamp","format":"date-time","in":"query","name":"after","type":"string"},"around":{"description":"Find messages around a given ISO 8601 timestamp","format":"date-time","in":"query","name":"around","type":"string"},"before":{"description":"Find messages before a given ISO 8601 timestamp","format":"date-time","in":"query","name":"before","type":"string"},"connection_id":{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"},"conversation_id":{"default":"","description":"The name of the person or room","in":"path","name":"conversation_id","required":true,"type":"string","x-mojo-placeholder":"#"},"email_in_path":{"description":"User email","format":"email","in":"path","name":"email","required":true,"type":"string","x-mojo-placeholder":"#"},"ident":{"description":"User email or server identity","in":"path","name":"ident","required":true,"type":"string"}},"paths":{"\/check-for-updates":{"get":{"operationId":"checkForUpdates","responses":{"200":{"description":"Version information","schema":{"properties":{"available":{"type":"number"},"running":{"type":"number"}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Check if a new update is available","x-mojo-to":"url#check_for_updates"}},"\/connection-profiles":{"get":{"operationId":"listConnectionProfiles","responses":{"200":{"description":"List of profiles.","schema":{"properties":{"profiles":{"items":{"$ref":"#\/definitions\/ConnectionProfile"},"type":"array"}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"List all connection profiles.","tags":["connection","connection-profile"],"x-mojo-to":"connection_profile#list"},"post":{"operationId":"saveConnectionProfile","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#\/definitions\/ConnectionProfile"}}],"responses":{"200":{"description":"Success.","schema":{"$ref":"#\/definitions\/ConnectionProfile"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Update or create a profile.","tags":["connection","connection-profile"],"x-mojo-to":"connection_profile#save"}},"\/connection-profiles\/{id}":{"delete":{"operationId":"removeConnectionProfile","parameters":[{"description":"A unique profile identifier","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"Success.","schema":{"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Remove a connection profile.","tags":["connection","connection-profile"],"x-mojo-to":"connection_profile#remove"}},"\/connection\/{connection_id}":{"delete":{"operationId":"removeConnection","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"}],"responses":{"200":{"description":"Remove a connection.","schema":{"$ref":"#\/definitions\/Success"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Delete a connection and all assosiated data.","tags":["connection"],"x-mojo-to":"connection#remove"},"post":{"operationId":"updateConnection","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"properties":{"on_connect_commands":{"description":"Commands to be run after the connection is established","items":{"type":"string"}},"url":{"description":"Example: irc:\/\/user:pass@irc.perl.org?nick=superman","format":"uri","type":"string"},"wanted_state":{"description":"Connection state","enum":["connected","disconnected"],"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Update a connection.","schema":{"$ref":"#\/definitions\/Connection"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Update a connection.","tags":["connection"],"x-mojo-to":"connection#update"}},"\/connection\/{connection_id}\/conversation\/{conversation_id}\/messages":{"get":{"operationId":"conversationMessages","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"},{"default":"","description":"The name of the person or room","in":"path","name":"conversation_id","required":true,"type":"string","x-mojo-placeholder":"#"},{"description":"Find messages after a given ISO 8601 timestamp","format":"date-time","in":"query","name":"after","type":"string"},{"description":"Find messages around a given ISO 8601 timestamp","format":"date-time","in":"query","name":"around","type":"string"},{"description":"Find messages before a given ISO 8601 timestamp","format":"date-time","in":"query","name":"before","type":"string"},{"description":"Max number of messages to retrieve","in":"query","name":"limit","type":"integer"},{"description":"Messages must match this string","in":"query","name":"match","type":"string"}],"responses":{"200":{"description":"List of messages.","schema":{"properties":{"after":{"format":"date-time","type":"string"},"before":{"format":"date-time","type":"string"},"messages":{"items":{"$ref":"#\/definitions\/Message"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get a list of messages. Note: this resource require the user to be authenticated first.","tags":["conversation"],"x-mojo-to":"conversation#messages"}},"\/connection\/{connection_id}\/conversation\/{conversation_id}\/read":{"post":{"operationId":"markConversationAsRead","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"},{"default":"","description":"The name of the person or room","in":"path","name":"conversation_id","required":true,"type":"string","x-mojo-placeholder":"#"}],"responses":{"200":{"description":"Successful response.","schema":{"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Clears unread for a conversation.","tags":["conversation"],"x-mojo-to":"conversation#mark_as_read"}},"\/connection\/{connection_id}\/messages":{"get":{"operationId":"connectionMessages","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"},{"description":"Find messages after a given ISO 8601 timestamp","format":"date-time","in":"query","name":"after","type":"string"},{"description":"Find messages around a given ISO 8601 timestamp","format":"date-time","in":"query","name":"around","type":"string"},{"description":"Find messages before a given ISO 8601 timestamp","format":"date-time","in":"query","name":"before","type":"string"},{"description":"Max number of messages to retrieve","in":"query","name":"limit","type":"integer"},{"description":"Messages must match this string","in":"query","name":"match","type":"string"}],"responses":{"200":{"description":"List of messages.","schema":{"properties":{"after":{"format":"date-time","type":"string"},"before":{"format":"date-time","type":"string"},"messages":{"items":{"$ref":"#\/definitions\/Message"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get a list of messages. Note: this resource require the user to be authenticated first.","tags":["conversation"],"x-mojo-to":"conversation#messages"}},"\/connection\/{connection_id}\/read":{"post":{"operationId":"markConnectionAsRead","parameters":[{"description":"A unique connection identifier","in":"path","name":"connection_id","required":true,"type":"string"}],"responses":{"200":{"description":"Successful response.","schema":{"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Clears unread for a connection.","tags":["connection"],"x-mojo-to":"conversation#mark_as_read"}},"\/connections":{"get":{"operationId":"listConnections","responses":{"200":{"description":"List of connections.","schema":{"properties":{"connections":{"items":{"$ref":"#\/definitions\/Connection"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get all the connections for a user.","tags":["connection"],"x-mojo-to":"connection#list"},"post":{"operationId":"createConnection","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"conversation_id":{"description":"Example: #convos","type":"string"},"on_connect_commands":{"description":"Commands to be run after the connection is established","items":{"type":"string"}},"url":{"description":"Example: irc:\/\/user:pass@irc.perl.org?nick=superman","type":"string"},"wanted_state":{"description":"Connection state","enum":["connected","disconnected"],"type":"string"}},"required":["url"],"type":"object"}}],"responses":{"200":{"description":"Connection information.","schema":{"$ref":"#\/definitions\/Connection"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Add a connection.","tags":["connection"],"x-mojo-to":"connection#create"}},"\/conversations":{"get":{"operationId":"listConversations","responses":{"200":{"description":"List of conversations.","schema":{"properties":{"conversations":{"items":{"$ref":"#\/definitions\/Conversation"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get a list of all conversations.","tags":["conversation"],"x-mojo-to":"conversation#list"}},"\/embed":{"get":{"operationId":"embed","parameters":[{"description":"URL to resource","in":"query","name":"url","required":true,"type":"string"}],"responses":{"200":{"description":"Information about resource."},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get information from a URL","tags":["misc"],"x-mojo-to":["url#info",["format",["html","json","jsonp"]]]}},"\/files":{"get":{"operationId":"getFiles","parameters":[{"description":"Find files after a file ID, can be \"after\", \"prev\" or the last file ID from the response","in":"query","name":"after","type":"string"},{"description":"Max number of files to retrieve","in":"query","name":"limit","type":"integer"}],"responses":{"200":{"description":"Files found","schema":{"properties":{"after":{"description":"Can be used as \"after\" query param to get the current page","type":"string"},"files":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"saved":{"format":"date-time","type":"string"},"size":{"type":"integer"}},"required":["id","name","saved","size"],"type":"object"},"type":"array"},"next":{"description":"Indicates if there is a next page","type":"string"},"prev":{"description":"Can be used as \"after\" query param to go to the previous page","type":"string"}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Retrieve list of uploaded files.","tags":["files"],"x-mojo-to":"files#list"},"post":{"consumes":["application\/x-www-form-urlencoded","multipart\/form-data"],"operationId":"uploadFile","parameters":[{"in":"formData","name":"file","required":true,"type":"file"},{"in":"formData","name":"id","type":"string"},{"in":"formData","name":"write_only","type":"boolean"}],"responses":{"200":{"description":"Successfully uploaded.","schema":{"properties":{"files":{"items":{"properties":{"ext":{"type":"string"},"filename":{"type":"string"},"id":{"type":"string"},"saved":{"format":"date-time","type":"string"},"uid":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["ext","filename","id","saved","uid","url"],"type":"object"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Upload file.","tags":["files"],"x-mojo-to":"files#upload"}},"\/files\/{uid}\/{fid}":{"delete":{"operationId":"deleteFiles","parameters":[{"in":"path","name":"fid","required":true,"type":"string"},{"in":"path","name":"uid","required":true,"type":"string"}],"responses":{"200":{"description":"Successfully deleted.","schema":{"properties":{"deleted":{"type":"integer"}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Delete one (or more) uploaded file.","tags":["files"],"x-mojo-to":"files#remove"},"get":{"operationId":"getFile","parameters":[{"in":"path","name":"fid","required":true,"type":"string"},{"in":"path","name":"uid","required":true,"type":"string"}],"produces":["application\/pdf","application\/zip","audio\/mpeg","audio\/ogg","image\/gif","image\/jpeg","image\/png","text\/html","video\/mp4","video\/ogg","video\/webm"],"responses":{"200":{"description":"File found and served.","schema":{"type":"string"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Retrieve uploaded file.","tags":["files"],"x-mojo-to":"files#get"}},"\/i18n\/{lang}":{"get":{"operationId":"getDictionary","parameters":[{"in":"path","name":"lang","required":true,"type":"string"}],"responses":{"200":{"description":"Dictionary.","schema":{"properties":{"dictionary":{"type":"object"}},"required":["dictionary"],"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Retrieve translations.","tags":["i18n"],"x-mojo-to":"user#dictionary"}},"\/notifications":{"get":{"description":"A notification is added once your name is mentioned in a chat.","operationId":"notificationMessages","responses":{"200":{"description":"List of notifications.","schema":{"properties":{"messages":{"items":{"$ref":"#\/definitions\/Notification"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get list of notications.","tags":["chat"],"x-mojo-to":"notifications#messages"}},"\/notifications\/read":{"post":{"operationId":"markNotificationsAsRead","responses":{"200":{"description":"Successful response.","schema":{"properties":{},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Mark notications as read.","tags":["chat"],"x-mojo-to":"notifications#read"}},"\/search":{"get":{"operationId":"searchMessages","parameters":[{"description":"An ID for a connection","in":"query","name":"connection_id","type":"string"},{"description":"An ID for a conversation","in":"query","name":"conversation_id","type":"string"},{"description":"Find messages after a given ISO 8601 timestamp","format":"date-time","in":"query","name":"after","type":"string"},{"description":"Find messages before a given ISO 8601 timestamp","format":"date-time","in":"query","name":"before","type":"string"},{"description":"Sender must match this string","in":"query","name":"from","type":"string"},{"description":"Max number of messages to retrieve","in":"query","name":"limit","type":"integer"},{"description":"Messages must match this string","in":"query","name":"match","type":"string"}],"responses":{"200":{"description":"List of messages.","schema":{"properties":{"after":{"format":"date-time","type":"string"},"before":{"format":"date-time","type":"string"},"messages":{"items":{"$ref":"#\/definitions\/Message"}}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Search for historic messages.","tags":["search"],"x-mojo-to":"search#messages"}},"\/settings":{"get":{"operationId":"getSettings","responses":{"200":{"description":"ServerSettings.","schema":{"$ref":"#\/definitions\/ServerSettings"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get settings for Convos.","tags":["settings"],"x-mojo-to":"admin#settings_get"},"post":{"operationId":"updateSettings","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#\/definitions\/ServerSettings"}}],"responses":{"200":{"description":"User profile.","schema":{"$ref":"#\/definitions\/ServerSettings"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Update settings for Convos.","tags":["settings"],"x-mojo-to":"admin#settings_update"}},"\/user":{"get":{"operationId":"getUser","parameters":[{"description":"Retrieve connection list.","in":"query","name":"connections","type":"boolean"},{"description":"Retrieve conversation list.","in":"query","name":"conversations","type":"boolean"}],"responses":{"200":{"description":"User profile.","schema":{"$ref":"#\/definitions\/User"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Get user data.","tags":["user"],"x-mojo-to":"user#get"}},"\/user\/login":{"post":{"operationId":"loginUser","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"email":{"description":"User email","format":"email","type":"string"},"password":{"description":"User password","type":"string"}},"required":["email","password"],"type":"object"}}],"responses":{"200":{"description":"User profile.","schema":{"$ref":"#\/definitions\/User"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Log in a user based on email and password.","tags":["user"],"x-mojo-to":"user#login"}},"\/user\/logout":{"get":{"description":"This resource will delete any sessions cookies that might be stored in the client.","operationId":"logoutUser","parameters":[{"in":"query","name":"csrf","required":true,"type":"string"}],"responses":{"302":{"description":"Successfully logged out."},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Logout a user.","tags":["user"],"x-mojo-to":["user#logout",["format",["html","json"]]]}},"\/user\/register":{"post":{"operationId":"registerUser","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"email":{"description":"User email","format":"email","type":"string"},"exp":{"description":"Expire time for a token","type":"string"},"password":{"$ref":"#\/definitions\/Password"},"token":{"description":"Checksum generated by inviteUser","type":"string"}},"required":["email","password"],"type":"object"}}],"responses":{"200":{"description":"User profile.","schema":{"$ref":"#\/definitions\/User"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Register a new user.","tags":["user"],"x-mojo-to":"user#register"}},"\/user\/{email}":{"delete":{"operationId":"deleteUser","parameters":[{"description":"User email","format":"email","in":"path","name":"email","required":true,"type":"string","x-mojo-placeholder":"#"}],"responses":{"200":{"description":"Successfully deleted.","schema":{"$ref":"#\/definitions\/Success"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Delete a user.","tags":["user"],"x-mojo-to":"user#remove"},"post":{"operationId":"updateUser","parameters":[{"description":"User email","format":"email","in":"path","name":"email","required":true,"type":"string","x-mojo-placeholder":"#"},{"in":"body","name":"body","required":true,"schema":{"properties":{"highlight_keywords":{"description":"Extra keywords to highlight on","items":{"type":"string"}},"password":{"$ref":"#\/definitions\/Password"},"roles":{"description":"User roles, such as admin and bot.","items":{"type":"string"},"type":"array"}},"type":"object"}}],"responses":{"200":{"description":"User profile.","schema":{"$ref":"#\/definitions\/User"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Update an existing user.","tags":["user"],"x-mojo-to":"user#update"}},"\/user\/{email}\/invite":{"post":{"operationId":"inviteUser","parameters":[{"description":"User email","format":"email","in":"path","name":"email","required":true,"type":"string","x-mojo-placeholder":"#"}],"responses":{"200":{"description":"User profile.","schema":{"properties":{"existing":{"type":"boolean"},"expires":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Generate invite link for an existing \/ new user.","tags":["user"],"x-mojo-to":["user#generate_invite_link",["format",["html","json"]]]}},"\/users":{"get":{"operationId":"getUsers","parameters":[{"description":"Find users after in pagination","in":"query","name":"after","type":"string"}],"responses":{"200":{"description":"List of users.","schema":{"properties":{"users":{"items":{"$ref":"#\/definitions\/User"},"type":"array"}},"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"List Convos users","tags":["user"],"x-mojo-to":"user#list"}},"\/webhook\/{provider_name}":{"post":{"operationId":"webhook","parameters":[{"description":"Provider name","in":"path","name":"provider_name","required":true,"type":"string"},{"description":"Any webhook payload","in":"body","name":"body","required":true,"schema":{"type":"object"}}],"responses":{"200":{"description":"Webhook response","schema":{"type":"object"}},"400":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"401":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"404":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"500":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}},"501":{"description":"Default response.","schema":{"$ref":"#\/definitions\/DefaultResponse"}}},"summary":"Forwards the webhook payload to the Convos bot","tags":["webhook"],"x-mojo-to":"events#webhook"}}},"produces":["application\/json"],"schemes":["https"],"swagger":"2.0"}