{"openapi":"3.0.1","info":{"title":"Chat Config API","description":"Provides methods for configuring chat for an apiSpace","version":"1.0"},"servers":[{"url":"https://{region}-api.dotdigital.com","variables":{"region":{"default":"r1","enum":["r1","r2","r3"],"description":"The Dotdigital region id your account belongs to"}}}],"security":[{"basicAuth":[]}],"paths":{"/cpaas/chat/config":{"get":{"summary":"Retrieves the chat configuration for an apiSpace","responses":{"200":{"description":"The full team details","headers":{"ETag":{"description":"A unique value representing the version of the configuration, optionally used for optimistic concurrency control on PUT and DELETE","schema":{"type":"string"}},"Last-Modified":{"description":"The date the team was last updated in ISO 8601 format","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/configFull"}}}},"404":{"description":"The team was not found","content":{}}}}},"/cpaas/chat/config/teams/{teamId}":{"get":{"summary":"Retrieves the members of a team","parameters":[{"name":"teamId","in":"path","description":"The Team id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The team member details","headers":{"ETag":{"description":"A unique value representing the version of the configuration, optionally used for optimistic concurrency control on PUT and DELETE","schema":{"type":"string"}},"Last-Modified":{"description":"The date the team was last updated in ISO 8601 format","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/teamMembers"}}}},"404":{"description":"The team was not found","content":{}}}},"delete":{"summary":"Removes the config for a team","parameters":[{"name":"teamId","in":"path","description":"The Team ID","required":true,"schema":{"type":"string"}},{"name":"if-match","in":"header","description":"An optional ETag for optimistic concurrency control","schema":{"type":"string"}}],"responses":{"200":{"description":"The config was removed for the team","content":{}},"404":{"description":"The team was not found, or did not have any config already","content":{}},"412":{"description":"The ETag supplied did not match, another update may have taken place","content":{}}}}},"/cpaas/chat/config/teams/{teamId}/appMessaging":{"put":{"summary":"Update the App Messaging config for a team","parameters":[{"name":"teamId","in":"path","description":"The Team id","required":true,"schema":{"type":"string"}},{"name":"if-match","in":"header","description":"An optional ETag for optimistic concurrency control","schema":{"type":"string"}}],"requestBody":{"description":"The App Messaging config to update for the team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/appMessagingConfig"}}},"required":true},"responses":{"200":{"description":"The full team details","headers":{"ETag":{"description":"A unique value representing the version of the configuration, optionally used for optimistic concurrency control on PUT and DELETE","schema":{"type":"string"}},"Last-Modified":{"description":"The date the configuration was last updated in ISO 8601 format","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/appMessagingConfig"}}}},"404":{"description":"The team was not found","content":{}},"412":{"description":"The ETag supplied did not match, another update may have taken place","content":{}}},"x-codegen-request-body-name":"body"},"delete":{"summary":"Removes the App Messaging config for a team","parameters":[{"name":"teamId","in":"path","description":"The Team ID","required":true,"schema":{"type":"string"}},{"name":"if-match","in":"header","description":"An optional ETag for optimistic concurrency control","schema":{"type":"string"}}],"responses":{"200":{"description":"The App Messaging config was removed for the team","content":{}},"404":{"description":"The team was not found, or did not have any config already","content":{}},"412":{"description":"The ETag supplied did not match, another update may have taken place","content":{}}}}},"/cpaas/chat/config/teams/{teamId}/settings":{"put":{"summary":"Update general settings for a team","parameters":[{"name":"teamId","in":"path","description":"The Team id","required":true,"schema":{"type":"string"}},{"name":"if-match","in":"header","description":"An optional ETag for optimistic concurrency control","schema":{"type":"string"}}],"requestBody":{"description":"The settings to update for the team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/settings"}}},"required":true},"responses":{"200":{"description":"The full team details","headers":{"ETag":{"description":"A unique value representing the version of the configuration, optionally used for optimistic concurrency control on PUT and DELETE","schema":{"type":"string"}},"Last-Modified":{"description":"The date the team was last updated in ISO 8601 format","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/settings"}}}},"404":{"description":"The team was not found","content":{}},"412":{"description":"The ETag supplied did not match, another update may have taken place","content":{}}},"x-codegen-request-body-name":"body"},"delete":{"summary":"Removes the settings for a team","parameters":[{"name":"teamId","in":"path","description":"The Team ID","required":true,"schema":{"type":"string"}},{"name":"if-match","in":"header","description":"An optional ETag for optimistic concurrency control","schema":{"type":"string"}}],"responses":{"200":{"description":"The general settings were removed for the team","content":{}},"404":{"description":"The team was not found, or did not have any config already","content":{}},"412":{"description":"The ETag supplied did not match, another update may have taken place","content":{}}}}}},"components":{"schemas":{"teamMembers":{"type":"object","properties":{"_createdOn":{"type":"string","description":"The date (in UTC, ISO 8601 format) that the message was created","format":"date-time","readOnly":true},"_createdBy":{"type":"string","description":"The identity that created the message","readOnly":true},"_updatedOn":{"type":"string","description":"The date (in UTC, ISO 8601 format) that the message was last updated","format":"date-time","readOnly":true},"_updatedBy":{"type":"string","description":"The identity that created the message","readOnly":true},"id":{"type":"string","description":"The teams identifier","readOnly":true},"members":{"type":"array","readOnly":true,"items":{"type":"object","properties":{"username":{"type":"string","description":"The team members profile id / username","readOnly":true}},"description":"A member of the chat team"}},"name":{"type":"string","description":"The teams name","readOnly":true}},"description":"The members of the chat team"},"configFull":{"type":"object","properties":{"teams":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/configSingle"}},"_createdOn":{"type":"string","description":"The date (in UTC, ISO 8601 format) that the message was created","format":"date-time","readOnly":true},"_createdBy":{"type":"string","description":"The identity that created the message","readOnly":true},"_updatedOn":{"type":"string","description":"The date (in UTC, ISO 8601 format) that the message was last updated","format":"date-time","readOnly":true},"_updatedBy":{"type":"string","description":"The identity that created the message","readOnly":true}},"description":"All chat configuration for the apiSpace."},"configSingle":{"type":"object","properties":{"teamId":{"type":"string","description":"The id of the team","readOnly":true},"channels":{"type":"object","properties":{"appMessagingConfig":{"$ref":"#/components/schemas/appMessagingConfig"}}},"settings":{"$ref":"#/components/schemas/settings"}}},"settings":{"type":"object","properties":{"closeMessage":{"type":"string","description":"The chat close message assigned to the team"},"avatarUrl":{"type":"string","description":"The avatar assigned to the team"},"outOfHoursFormTemplateId":{"type":"string","description":"The id of a form to send when out of hours"},"outOfHoursMessage":{"type":"string","description":"The chat out of hours message assigned to the team"},"workingHours":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/workingHoursSingle"}},"outOfHoursMessageEnabled":{"type":"boolean","description":"define if out ouf hours message is enabled"}},"description":"The general settings for the team"},"workingHoursSingle":{"required":["days","from","to"],"type":"object","properties":{"days":{"type":"string","description":"Days for which working hours are defined","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","Weekend","Monday to Friday"]},"from":{"pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]","type":"string","description":"working hours start time"},"to":{"pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]","type":"string","description":"working hours stop time"}},"description":"The working hours configuration for the team"},"appMessagingConfig":{"required":["replyAs"],"type":"object","properties":{"welcomeMessage":{"type":"object","properties":{"timeout":{"type":"integer","description":"The welcome message timeout in seconds"},"text":{"type":"string","description":"The welcome message text"}},"description":"The welcome message config"},"replyAs":{"type":"string","description":"Indicates how replies should appear to the end user","default":"team","enum":["team","individual"]}},"description":"The App Messaging configuration for the team"}},"parameters":{"teamIdParameter":{"name":"teamId","in":"path","description":"The Team id","required":true,"schema":{"type":"string"}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"x-readme":{"samples-languages":["curl","csharp","java","node","php","python","ruby"],"explorer-enabled":true,"proxy-enabled":true}}