{"openapi":"3.0.3","info":{"title":"7TV","description":"This is the V3 version of 7TV's API.\n\nThis API is in maintenance mode and will not receive any new features.\n\nYou can find our terms of service [here](https://7tv.app/legal/terms).\n\nYou can find our privacy policy [here](https://7tv.app/legal/privacy).\n\nIf you want to report bugs or have any questions, feel free to join our [Discord](https://discord.gg/7tv).\n\nIf you want to contribute to the API, feel free to check out our [GitHub](https://github.com/seventv/seventv).\n","contact":{"email":"support@7tv.app"},"license":{"name":"Apache 2.0 with Commons Clause","url":"https://github.com/SevenTV/SevenTV/blob/main/licenses/CC_APACHE2_LICENSE"},"version":"3.0.0"},"servers":[{"url":"https://7tv.io","description":"Production"}],"paths":{"/v3/auth":{"get":{"tags":["auth"],"operationId":"login","responses":{"303":{"description":"Auth Redirect"}}}},"/v3/auth/logout":{"post":{"tags":["auth"],"operationId":"logout","responses":{"204":{"description":"Logout"}}}},"/v3/auth/manual":{"get":{"tags":["auth"],"operationId":"manual","responses":{"200":{"description":"Manual Auth"}}}},"/v3/chatterino/version/{os}/{branch}":{"get":{"tags":["chatterino"],"operationId":"get_version_info","parameters":[{"name":"os","in":"path","description":"The name of the operating system (win/macos/linux)","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","description":"The update branch (stable/beta)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Chatterino7 versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatterinoVersion"}}}}}}},"/v3/config/{name}":{"get":{"tags":["config"],"operationId":"get_extension_config","parameters":[{"name":"name","in":"path","description":"The name of the extension to get the config for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Extension Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionConfig"}}}}}}},"/v3/docs":{"get":{"tags":["docs"],"operationId":"get_docs","responses":{"200":{"description":"Returns swagger documentation"}}}},"/v3/emote-sets/{id}":{"get":{"tags":["emote-sets"],"operationId":"get_emote_set_by_id","parameters":[{"name":"id","in":"path","description":"The ID of the emote set","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Emote Set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmoteSetModel"}}}}}}},"/v3/emotes":{"post":{"tags":["emotes"],"operationId":"create_emote","parameters":[{"name":"X-Emote-Data","in":"header","description":"The properties of the emote","required":true,"schema":{"$ref":"#/components/schemas/XEmoteData"}}],"requestBody":{"description":"Image Binary Data","content":{"image/*":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"201":{"description":"Emote Created"}}}},"/v3/emotes/{id}":{"get":{"tags":["emotes"],"operationId":"get_emote_by_id","parameters":[{"name":"id","in":"path","description":"The ID of the emote","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Emote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmoteModel"}}}},"404":{"description":"Emote Not Found"}}}},"/v3/entitlements":{"post":{"tags":["entitlements"],"operationId":"create_entitlement","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XEntitlementData"}}},"required":true},"responses":{"201":{"description":"Entitlement Created"}}}},"/v3/gql":{"post":{"tags":["gql"],"operationId":"graphql_handler","responses":{}}},"/v3/gql/playground":{"get":{"tags":["gql"],"operationId":"playground","responses":{}}},"/v3/users/{id}":{"get":{"tags":["users"],"operationId":"get_user_by_id","parameters":[{"name":"id","in":"path","description":"The ID of the user","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserModel"}}}}}},"delete":{"tags":["users"],"operationId":"delete_user_by_id","parameters":[{"name":"id","in":"path","description":"The ID of the user","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"User Deleted"},"404":{"description":"User Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v3/users/{id}/connections/{connection_id}":{"patch":{"tags":["users"],"operationId":"update_user_connection_by_id","parameters":[{"name":"id","in":"path","description":"The ID of the user","required":true,"schema":{"type":"string"}},{"name":"connection_id","in":"path","description":"The ID of the connection","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User Connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnectionModel"}}}},"404":{"description":"User Connection Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v3/users/{id}/presences":{"post":{"tags":["users"],"operationId":"create_user_presence","parameters":[{"name":"id","in":"path","description":"The ID of the user","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User Presence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresenceModel"}}}}}}},"/v3/users/{id}/profile-picture":{"put":{"tags":["users"],"operationId":"upload_user_profile_picture","parameters":[{"name":"id","in":"path","description":"The ID of the user","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Image Binary Data","content":{"image/*":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Success"}}}},"/v3/users/{platform}/{platform_id}":{"get":{"tags":["users"],"operationId":"get_user_by_platform_id","parameters":[{"name":"platform","in":"path","description":"The platform","required":true,"schema":{"type":"string"}},{"name":"platform_id","in":"path","description":"The ID of the user on the platform","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserModel"}}}},"404":{"description":"User Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ActiveEmoteModel":{"type":"object","required":["id","name","flags","timestamp"],"properties":{"actor_id":{"allOf":[{"$ref":"#/components/schemas/UserId"}],"nullable":true},"data":{"allOf":[{"$ref":"#/components/schemas/EmotePartialModel"}],"nullable":true},"flags":{"$ref":"#/components/schemas/ActiveEmoteFlagModel"},"id":{"$ref":"#/components/schemas/EmoteId"},"name":{"type":"string"},"origin_id":{"allOf":[{"$ref":"#/components/schemas/EmoteSetId"}],"nullable":true},"timestamp":{"type":"integer","format":"int64"}},"additionalProperties":false},"EmoteLifecycleModel":{"type":"integer","description":"EmoteLifecycleModel represents the lifecycle of an emote.\n- `Deleted` (-1): The emote has been deleted.\n- `Pending` (0): The emote is pending approval.\n- `Processing` (1): The emote is being processed.\n- `Disabled` (2): The emote has been disabled.\n- `Live` (3): The emote is live.\n- `Failed` (-2): The emote has failed processing.","enum":[-1,0,1,2,3,-2]},"EmoteModel":{"type":"object","properties":{"animated":{"type":"boolean","default":false},"flags":{"allOf":[{"$ref":"#/components/schemas/EmoteFlagsModel"}],"default":0},"host":{"allOf":[{"$ref":"#/components/schemas/ImageHost"}],"default":{"url":"","files":[]}},"id":{"allOf":[{"$ref":"#/components/schemas/EmoteId"}],"default":"01KT2YK40XB5QVSJ55DNCWHH5T"},"lifecycle":{"allOf":[{"$ref":"#/components/schemas/EmoteLifecycleModel"}],"default":0},"listed":{"type":"boolean","default":false},"name":{"type":"string","default":""},"owner":{"allOf":[{"$ref":"#/components/schemas/UserPartialModel"}],"default":null,"nullable":true},"state":{"type":"array","items":{"$ref":"#/components/schemas/EmoteVersionState"},"default":[]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"versions":{"type":"array","items":{"$ref":"#/components/schemas/EmoteVersionModel"},"default":[]}},"additionalProperties":false},"EmotePartialModel":{"type":"object","properties":{"animated":{"type":"boolean","default":false},"flags":{"allOf":[{"$ref":"#/components/schemas/EmoteFlagsModel"}],"default":0},"host":{"allOf":[{"$ref":"#/components/schemas/ImageHost"}],"default":{"url":"","files":[]}},"id":{"allOf":[{"$ref":"#/components/schemas/EmoteId"}],"default":"01KT2YK40X145VZ01CNJ7R40HB"},"lifecycle":{"allOf":[{"$ref":"#/components/schemas/EmoteLifecycleModel"}],"default":0},"listed":{"type":"boolean","default":false},"name":{"type":"string","default":""},"owner":{"allOf":[{"$ref":"#/components/schemas/UserPartialModel"}],"default":null,"nullable":true},"state":{"type":"array","items":{"$ref":"#/components/schemas/EmoteVersionState"},"default":[]},"tags":{"type":"array","items":{"type":"string"},"default":[]}},"additionalProperties":false},"EmoteSetModel":{"type":"object","required":["id","name","flags","tags","immutable","privileged","capacity"],"properties":{"capacity":{"type":"integer","format":"int32"},"emote_count":{"type":"integer","format":"int32"},"emotes":{"type":"array","items":{"$ref":"#/components/schemas/ActiveEmoteModel"}},"flags":{"$ref":"#/components/schemas/EmoteSetFlagModel"},"id":{"$ref":"#/components/schemas/EmoteSetId"},"immutable":{"type":"boolean"},"name":{"type":"string"},"origins":{"type":"array","items":{"$ref":"#/components/schemas/EmoteSetOrigin"}},"owner":{"allOf":[{"$ref":"#/components/schemas/UserPartialModel"}],"nullable":true},"privileged":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"EmoteSetOrigin":{"type":"object","required":["id","weight","slices"],"properties":{"id":{"$ref":"#/components/schemas/EmoteSetId"},"slices":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"weight":{"type":"integer","format":"int32"}},"additionalProperties":false},"EmoteSetPartialModel":{"type":"object","required":["id","name","flags","tags","capacity"],"properties":{"capacity":{"type":"integer","format":"int32"},"flags":{"$ref":"#/components/schemas/EmoteSetFlagModel"},"id":{"$ref":"#/components/schemas/EmoteSetId"},"name":{"type":"string"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserPartialModel"}],"nullable":true},"tags":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"EmoteVersionModel":{"type":"object","properties":{"animated":{"type":"boolean","default":false},"createdAt":{"type":"integer","format":"int64","default":0,"minimum":0},"description":{"type":"string","default":""},"host":{"allOf":[{"$ref":"#/components/schemas/ImageHost"}],"default":null,"nullable":true},"id":{"allOf":[{"$ref":"#/components/schemas/EmoteId"}],"default":"01KT2YK40X1S6XYX6PYYSDQTR2"},"lifecycle":{"allOf":[{"$ref":"#/components/schemas/EmoteLifecycleModel"}],"default":0},"listed":{"type":"boolean","default":false},"name":{"type":"string","default":""},"state":{"type":"array","items":{"$ref":"#/components/schemas/EmoteVersionState"},"default":[]}},"additionalProperties":false},"EmoteVersionState":{"type":"string","enum":["LISTED","PERSONAL","NO_PERSONAL"]},"EntitlementKind":{"type":"string","enum":["BADGE","PAINT","EMOTE_SET"]},"EntitlementModel":{"type":"object","required":["id","kind","user","ref_id"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"kind":{"$ref":"#/components/schemas/EntitlementKind"},"ref_id":{"$ref":"#/components/schemas/Id"},"user":{"$ref":"#/components/schemas/UserPartialModel"}}},"PresenceKind":{"type":"integer","enum":[0,1,2]},"PresenceModel":{"type":"object","required":["id","user_id","timestamp","ttl","kind"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"kind":{"$ref":"#/components/schemas/PresenceKind"},"timestamp":{"type":"integer","format":"int64"},"ttl":{"type":"integer","format":"int64"},"user_id":{"$ref":"#/components/schemas/UserId"}}},"RoleModel":{"type":"object","required":["id","name","position","color","allowed","denied"],"properties":{"allowed":{"type":"string"},"color":{"type":"integer","format":"int32"},"denied":{"type":"string"},"id":{"$ref":"#/components/schemas/RoleId"},"invisible":{"type":"boolean"},"name":{"type":"string"},"position":{"type":"integer","format":"int32"}}},"UserConnectionModel":{"type":"object","required":["id","platform","username","display_name","linked_at","emote_capacity"],"properties":{"display_name":{"type":"string"},"emote_capacity":{"type":"integer","format":"int32"},"emote_set":{"allOf":[{"$ref":"#/components/schemas/EmoteSetModel"}],"nullable":true},"emote_set_id":{"allOf":[{"$ref":"#/components/schemas/EmoteSetId"}],"nullable":true},"id":{"type":"string"},"linked_at":{"type":"integer","format":"int64","minimum":0},"platform":{"$ref":"#/components/schemas/UserConnectionPlatformModel"},"user":{"allOf":[{"$ref":"#/components/schemas/UserModel"}],"nullable":true},"username":{"type":"string"}}},"UserEditorModel":{"type":"object","properties":{"added_at":{"type":"integer","format":"int64","default":0,"minimum":0},"id":{"allOf":[{"$ref":"#/components/schemas/UserId"}],"default":"01KT2YK40XF8C92EJN32XD4S00"},"permissions":{"allOf":[{"$ref":"#/components/schemas/UserEditorModelPermission"}],"default":0},"visible":{"type":"boolean","default":false}},"additionalProperties":false},"UserEditorModelPermission":{"type":"integer","format":"int32","description":"These flags are used to define what permissions a user editor has.\n\n- `ModifyEmotes` (1): Allows modifying emotes in the user's active emote sets\n\n- `UsePrivateEmotes` (2): Allows using the user's private emotes\n\n- `ManageProfile` (4): Allows managing the user's public profile\n\n- `ManageOwnedEmotes` (8): Allows managing the user's owned emotes\n\n- `ManageEmoteSets` (16): Allows managing the user's owned emote sets\n\n- `ManageBilling` (32): Allows managing billing and payments, such as subscriptions\n\n- `ManageEditors` (64): Allows adding or removing editors for the user\n\n- `ViewMessages` (128): Allows viewing the user's private messages, such as inbox"},"UserModel":{"type":"object","properties":{"avatar_url":{"type":"string","default":""},"biography":{"type":"string","default":""},"connections":{"type":"array","items":{"$ref":"#/components/schemas/UserConnectionModel"},"default":[]},"created_at":{"type":"integer","format":"int64","default":0,"minimum":0},"display_name":{"type":"string","default":""},"editors":{"type":"array","items":{"$ref":"#/components/schemas/UserEditorModel"},"default":[]},"emote_sets":{"type":"array","items":{"$ref":"#/components/schemas/EmoteSetPartialModel"},"default":[]},"id":{"allOf":[{"$ref":"#/components/schemas/UserId"}],"default":"01KT2YK40XKJWB60NXQR6E1Q2G"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/RoleId"},"default":[]},"style":{"allOf":[{"$ref":"#/components/schemas/UserStyle"}],"default":{}},"user_type":{"allOf":[{"$ref":"#/components/schemas/UserTypeModel"}],"default":"REGULAR"},"username":{"type":"string","default":""}},"additionalProperties":false},"UserPresenceWriteResponse":{"type":"object","required":["ok","presence"],"properties":{"ok":{"type":"boolean"},"presence":{"$ref":"#/components/schemas/PresenceModel"}}},"XEmoteData":{"type":"object","properties":{"flags":{"allOf":[{"$ref":"#/components/schemas/EmoteFlagsModel"}],"default":0},"name":{"type":"string","default":""},"tags":{"type":"array","items":{"type":"string"},"default":[]}}},"XEntitlementData":{"type":"object"}}}}