{"openapi":"3.1.0","info":{"title":"Communications Service","version":"1.0.0"},"paths":{"/v1/setting/{settingKey}":{"get":{"tags":["Settings - V1"],"summary":"Get a setting value","parameters":[{"name":"settingKey","in":"path","schema":{"$ref":"#/components/schemas/SettingKey"},"required":true,"description":"The key of the setting to retrieve"}],"responses":{"200":{"description":"Setting value retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"description":"**Permission Required**: [`communications:external:read:setting READ`](https://egs.jaren.wtf/#resource=communications:external:read:setting&action=2)","security":[{"bearer":["communications:external:read:setting READ"]}]}},"/v1/settings":{"post":{"tags":["Settings - V1"],"summary":"Bulk update settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"204":{"description":"Settings successfully updated"}},"description":"**Permission Required**: [`communications:external:create:setting CREATE`](https://egs.jaren.wtf/#resource=communications:external:create:setting&action=1)","security":[{"bearer":["communications:external:create:setting CREATE"]}]}},"/v1/user/{identity}":{"delete":{"tags":["Settings - V1"],"summary":"Delete settings","parameters":[{"name":"identity","in":"path","schema":{"type":"string"},"required":true,"description":"The identity, supposed to be your email, but this is not validated or used for anything"}],"responses":{},"description":"**Permission Required**: [`communications:internal:delete:setting DELETE`](https://egs.jaren.wtf/#resource=communications:internal:delete:setting&action=8)","security":[{"bearer":["communications:internal:delete:setting DELETE"]}]}},"/v1/user/{identity}/setting/{settingKey}":{"get":{"tags":["Settings - V1"],"summary":"Get a setting value","parameters":[{"name":"identity","in":"path","schema":{"type":"string"},"required":true,"description":"The identity, supposed to be your email, but this is not validated or used for anything"},{"name":"settingKey","in":"path","schema":{"$ref":"#/components/schemas/SettingKey"},"required":true,"description":"The key prefix of the settings to retrieve"}],"responses":{"200":{"description":"Setting value retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"description":"**Permission Required**: [`communications:external:read:setting READ`](https://egs.jaren.wtf/#resource=communications:external:read:setting&action=2)","security":[{"bearer":["communications:external:read:setting READ"]}]},"put":{"tags":["Settings - V1"],"summary":"Update a setting value","parameters":[{"name":"identity","in":"path","schema":{"type":"string"},"required":true,"description":"The identity, supposed to be your email, but this is not validated or used for anything"},{"name":"settingKey","in":"path","schema":{"$ref":"#/components/schemas/SettingKey"},"required":true,"description":"The key prefix of the settings to retrieve"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"type":"boolean"}}}}}},"responses":{"204":{"description":"Setting value updated successfully"}},"description":"**Permission Required**: [`communications:external:create:setting CREATE`](https://egs.jaren.wtf/#resource=communications:external:create:setting&action=1)","security":[{"bearer":["communications:external:create:setting CREATE"]}]},"delete":{"tags":["Settings - V1"],"summary":"Delete a setting","parameters":[{"name":"identity","in":"path","schema":{"type":"string"},"required":true,"description":"The identity, supposed to be your email, but this is not validated or used for anything"},{"name":"settingKey","in":"path","schema":{"$ref":"#/components/schemas/SettingKey"},"required":true,"description":"The key prefix of the settings to retrieve"}],"responses":{},"description":"**Permission Required**: [`communications:external:delete:setting DELETE`](https://egs.jaren.wtf/#resource=communications:external:delete:setting&action=8)","security":[{"bearer":["communications:external:delete:setting DELETE"]}]}},"/v1/user/{identity}/setting/{settingKey}/prefix":{"get":{"tags":["Settings - V1"],"summary":"Get settings by prefix","parameters":[{"name":"identity","in":"path","schema":{"type":"string"},"required":true,"description":"The identity, supposed to be your email, but this is not validated or used for anything"},{"name":"settingKey","in":"path","schema":{"$ref":"#/components/schemas/SettingKey"},"required":true,"description":"The key prefix of the settings to retrieve"}],"responses":{"200":{"description":"Settings retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}}}},"description":"**Permission Required**: [`communications:external:read:setting READ`](https://egs.jaren.wtf/#resource=communications:external:read:setting&action=2)","security":[{"bearer":["communications:external:read:setting READ"]}]}},"/v1/user/{identity}/settings":{"post":{"tags":["Settings - V1"],"summary":"Bulk update settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"204":{"description":"Settings successfully updated"}},"description":"**Permission Required**: [`communications:external:create:setting CREATE`](https://egs.jaren.wtf/#resource=communications:external:create:setting&action=1)","security":[{"bearer":["communications:external:create:setting CREATE"]}]}},"/v1/{accountId}/device/{deviceId}/channel/{channel}":{"put":{"tags":["Devices - V1"],"summary":"Register new device","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"An account id"},{"in":"path","name":"deviceId","schema":{"type":"string"},"required":true,"description":"A device id"},{"in":"path","name":"channel","schema":{"type":"string","enum":["fcm"]},"required":true,"description":"A channel"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["deviceType","token"],"properties":{"deviceType":{"$ref":"#/components/schemas/DeviceType"},"token":{"type":"string"}}}}}},"responses":{"204":{"description":"Device registered successfully"}},"description":"**Permission Required**: [`communications:external:register:device CREATE`](https://egs.jaren.wtf/#resource=communications:external:register:device&action=1)","security":[{"bearer":["communications:external:register:device CREATE"]}]},"delete":{"tags":["Devices - V1"],"summary":"Unregister existing device","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"An account id"},{"in":"path","name":"deviceId","schema":{"type":"string"},"required":true,"description":"A device id"},{"in":"path","name":"channel","schema":{"type":"string","enum":["fcm"]},"required":true,"description":"A channel"}],"responses":{"204":{"description":"Device unregistered successfully"}},"description":"**Permission Required**: [`communications:external:deregister:channel DELETE`](https://egs.jaren.wtf/#resource=communications:external:deregister:channel&action=8)","security":[{"bearer":["communications:external:deregister:channel DELETE"]}]}},"/v1/{accountId}/devices":{"get":{"tags":["Devices - V1"],"summary":"Get devices","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"An account id"}],"responses":{},"description":"**Permission Required**: [`communications:external:retrieve:devices READ`](https://egs.jaren.wtf/#resource=communications:external:retrieve:devices&action=2)","security":[{"bearer":["communications:external:retrieve:devices READ"]}]}},"/v2/{accountId}/channel":{"put":{"tags":["Devices - V1"],"summary":"Register new channel","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["deliveryChannel","deviceType","deviceId"],"properties":{"deliveryChannel":{"$ref":"#/components/schemas/DeliveryChannel"},"deviceType":{"$ref":"#/components/schemas/DeviceType"},"deviceId":{"type":"string"}}}}}},"responses":{},"description":"**Permission Required**: [`communications:internal:register:channel CREATE`](https://egs.jaren.wtf/#resource=communications:internal:register:channel&action=1)","security":[{"bearer":["communications:internal:register:channel CREATE"]}]},"delete":{"tags":["Devices - V1"],"summary":"Unregister existing channel","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["deliveryChannel"],"properties":{"deliveryChannel":{"$ref":"#/components/schemas/DeliveryChannel"},"deviceId":{"type":"string"},"emailAddress":{"type":"string","description":"Required if the `deliveryChannel` is `email`"}}}}}},"responses":{},"description":"**Permission Required**: [`communications:internal:deregister:channel DELETE`](https://egs.jaren.wtf/#resource=communications:internal:deregister:channel&action=8)","security":[{"bearer":["communications:internal:deregister:channel DELETE"]}]}},"/v2/{accountId}/device/{deviceId}":{"get":{"tags":["Devices - V2"],"summary":"Get device info for the account","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"},{"in":"path","name":"deviceId","schema":{"type":"string"},"required":true,"description":"A device id"}],"responses":{},"description":"**Permission Required**: [`communications:external:retrieve:channels READ`](https://egs.jaren.wtf/#resource=communications:external:retrieve:channels&action=2)","security":[{"bearer":["communications:external:retrieve:channels READ"]}]}},"/v2/{accountId}/devices":{"get":{"tags":["Devices - V2"],"summary":"Get devices for the account","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"responses":{},"description":"**Permission Required**: [`communications:external:retrieve:devices READ`](https://egs.jaren.wtf/#resource=communications:external:retrieve:devices&action=2)","security":[{"bearer":["communications:external:retrieve:devices READ"]}]}},"/v3/external/devices":{"get":{"tags":["Devices - V3"],"summary":"Get devices","responses":{"403":{"description":"Provided ClientID not permitted to use Trusted Server V3 API"}}},"post":{"tags":["Devices - V3"],"summary":"Register new devices","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["channel","deviceType","deviceId","token"],"properties":{"token":{"type":"string"},"deviceId":{"type":"string"},"deviceType":{"$ref":"#/components/schemas/DeviceType"},"locale":{"type":"string","default":"en"},"channel":{"type":"string","examples":["fcm"]}}}}}},"responses":{"200":{"description":"Device registered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string"},"deviceType":{"$ref":"#/components/schemas/DeviceType"},"locale":{"type":"string","default":"en"},"channel":{"type":"string","examples":["fcm"]}}}}}},"403":{"description":"Provided ClientID not permitted to use V3 API"}}}},"/v3/external/devices/{deviceId}":{"delete":{"tags":["Devices - V3"],"summary":"Unregister existing devices","parameters":[{"in":"path","name":"deviceId","schema":{"type":"string"},"required":true,"description":"A device id"}],"responses":{"204":{"description":"Device unregistered successfully"},"403":{"description":"Provided ClientID not permitted to use V3 API"}}}},"/version":{"get":{"tags":["Version"],"summary":"Get the current version","responses":{"200":{"description":"Version info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}}},"components":{"schemas":{"AccountID":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$","examples":["8b0a23cb43af46cb972806f4025a9cba"],"description":"This represents a unique id for an epic games account"},"Version":{"type":"object","required":["app","serverDate","overridePropertiesVersion","cln","build","moduleName","buildDate","version","branch","modules"],"properties":{"app":{"type":"string"},"serverDate":{"type":"string","format":"date-time"},"overridePropertiesVersion":{"type":"string"},"cln":{"type":"string"},"build":{"type":"string"},"moduleName":{"type":"string"},"buildDate":{"type":"string","format":"date-time"},"version":{"type":"string"},"branch":{"type":"string"},"modules":{"type":"object","additionalProperties":{"type":"object","required":["cln","build","buildDate","version","branch"],"properties":{"cln":{"type":"string"},"build":{"type":"string"},"buildDate":{"type":"string","format":"date-time"},"version":{"type":"string"},"branch":{"type":"string"}}}}}},"DeviceType":{"type":"string","enum":["AND","IOS"]},"SettingKey":{"type":"string","examples":["email","email:egs","email:fortnite","push"]},"UpdateSettingsRequest":{"type":"object","required":["settings"],"properties":{"settings":{"type":"object","additionalProperties":{"type":"boolean"}}}},"Setting":{"type":"object","required":["identity","trackingId","settingKey","updatedAt","settingValue"],"properties":{"identity":{"type":"string","format":"email"},"trackingId":{"type":"string"},"settingKey":{"$ref":"#/components/schemas/SettingKey"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"$ref":"#/components/schemas/AccountID"},"settingValue":{"type":"boolean"}}},"DeliveryChannel":{"type":"string","enum":["email","sms","mobile","websocket","inbox","connect"]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"https://communications-service-prod06.ol.epicgames.com/api"}]}