UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 421 kB
{"openapi":"3.0.3","servers":[{"description":"Chat Production API","url":"https://chat.stream-io-api.com"}],"info":{"title":"Stream Chat API","version":"v80.2.0","x-origin":[{"format":"openapi","url":"https://stream-openapi.s3.us-east-1.amazonaws.com/chat/openapi-latest.yaml","version":"3.0"}],"x-providerName":"stream-io-api.com"},"externalDocs":{"description":"Stream Chat Documentation","url":"https://getstream.io/chat/docs/"},"security":[{"JWT":[],"api_key":[],"stream-auth-type":[]},{"api_key":[],"stream-auth-type":[]}],"paths":{"/app":{"get":{"description":"This method returns the application settings\n","operationId":"GetApp","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApplicationResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get App Settings","tags":["Settings"],"x-stream-docs-page-id":"app_setting_overview"},"patch":{"description":"This method updates one or more application settings\n","operationId":"UpdateApp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Update App Settings","tags":["Settings"],"x-stream-docs-page-id":"app_setting_overview","x-stream-server-side":true}},"/blocklists":{"get":{"description":"Returns all available block lists\n","operationId":"ListBlockLists","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBlockListResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"List block lists","tags":["Settings","Moderation"],"x-stream-docs-page-id":"block_lists","x-stream-server-side":true},"post":{"description":"Creates a new application blocklist, once created the blocklist can be used by any channel type\n","operationId":"CreateBlockList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlockListRequest"}}},"description":"Block list","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Create block list","tags":["Settings","Moderation"],"x-stream-docs-page-id":"block_lists","x-stream-server-side":true}},"/blocklists/{name}":{"delete":{"description":"Deletes previously created application blocklist\n","operationId":"DeleteBlockList","parameters":[{"content":{"application/json":{"schema":{"description":"Block list name","title":"Name","type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"name","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Delete block list","tags":["Settings","Moderation"],"x-stream-docs-page-id":"block_lists","x-stream-server-side":true},"get":{"description":"Returns block list by given name\n","operationId":"GetBlockList","parameters":[{"content":{"application/json":{"schema":{"description":"Block list name","title":"Name","type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"name","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBlockListResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get block list","tags":["Settings","Moderation"],"x-stream-docs-page-id":"block_lists","x-stream-server-side":true},"put":{"description":"Updates contents of the block list\n","operationId":"UpdateBlockList","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"name","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlockListRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Update block list","tags":["Settings","Moderation"],"x-stream-docs-page-id":"block_lists","x-stream-server-side":true}},"/calls/":{"post":{"description":"Retrieves the token to join a call\n\nRequired permissions:\n- JoinCall\n- ReadChannel\n","operationId":"GetCallToken__1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallTokenRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallTokenResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get Call Token ()","x-stream-docs-page-id":"video","x-stream-permissions":{"JoinCall":"To request the call token","ReadChannel":"To read the channel"}}},"/calls/{call_id}":{"post":{"description":"Retrieves the token to join a call\n\nRequired permissions:\n- JoinCall\n- ReadChannel\n","operationId":"GetCallToken_call_id_0","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"call_id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallTokenRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallTokenResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get Call Token (call_id)","x-stream-docs-page-id":"video","x-stream-permissions":{"JoinCall":"To request the call token","ReadChannel":"To read the channel"}}},"/campaigns":{"get":{"description":"Query campaigns\n","operationId":"QueryCampaigns","parameters":[{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCampaignsRequest","x-stream-index":"001"}}},"in":"query","name":"payload"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCampaignsResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Query campaigns","tags":["Campaigns"],"x-stream-docs-page-id":"campaigns","x-stream-server-side":true},"post":{"description":"Creates a new campaign\n","operationId":"CreateCampaign","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Create campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/campaigns/{id}":{"delete":{"description":"Delete a campaign\n","operationId":"DeleteCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"id","required":true},{"content":{"application/json":{"schema":{"type":"boolean","writeOnly":true,"x-stream-index":"001"}}},"in":"query","name":"recipients"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Delete campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true},"put":{"description":"Update an existing campaign\n","operationId":"UpdateCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Update campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/campaigns/{id}/resume":{"patch":{"description":"Resume a stopped campaign\n","operationId":"ResumeCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001"}}},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Resume campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/campaigns/{id}/schedule":{"patch":{"description":"Schedule a campaign\n","operationId":"ScheduleCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCampaignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Schedule campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/campaigns/{id}/stop":{"patch":{"description":"Stop a running campaign\n","operationId":"StopCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001"}}},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopCampaignResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Stop campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/campaigns/{id}/test":{"post":{"description":"Test a campaign\n","operationId":"TestCampaign","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCampaignResponse"}}},"description":"Test campaign response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Test campaign","tags":["Campaigns"],"x-stream-beta":true,"x-stream-docs-page-id":"campaigns","x-stream-server-side":true}},"/channels":{"post":{"description":"Query channels with filter query\n\nRequired permissions:\n- ReadChannel\n","operationId":"QueryChannels","parameters":[{"content":{"application/json":{"schema":{"type":"string","x-stream-index":"011.002"}}},"in":"query","name":"client_id"},{"content":{"application/json":{"schema":{"type":"string","x-stream-index":"011.003"}}},"in":"query","name":"connection_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryChannelsRequest"}}},"description":"Query Channels Request","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelsResponse"}}},"description":"Channels list"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Query channels","tags":["Channels"],"x-stream-docs-page-id":"query_channels","x-stream-permissions":{"ReadChannel":"To access channels that were requested"}}},"/channels/delete":{"post":{"description":"Allows to delete several channels at once asynchronously\n\nSends events:\n- channel.deleted\n\nRequired permissions:\n- DeleteChannel\n","operationId":"DeleteChannels","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChannelsRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChannelsResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Deletes channels asynchronously","tags":["Channels","GDPR"],"x-stream-docs-page-id":"gdpr","x-stream-events":{"channel.deleted":"When a channel is deleted"},"x-stream-events-v2":{"channel.deleted":{"description":"When a channel is deleted","schema":{"ref":"#/components/schemas/ChannelDeletedEvent"}}},"x-stream-permissions":{"DeleteChannel":"To delete a channel"}}},"/channels/read":{"post":{"description":"Marks channels as read up to the specific message. If no channels is given, mark all channel as read\n\nSends events:\n- message.read\n\nRequired permissions:\n- ReadChannel\n","operationId":"MarkChannelsRead","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkChannelsReadRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Mark channels as read","tags":["Channels","Messages"],"x-stream-events":{"message.read":"When the channel is marked as read"},"x-stream-events-v2":{"message.read":{"description":"When the channel is marked as read","schema":{"ref":"#/components/schemas/MessageReadEvent"}}},"x-stream-permissions":{"ReadChannel":"To mark message read"}}},"/channels/{type}/query":{"post":{"description":"This method creates a channel or returns an existing one with matching attributes\n\nSends events:\n- channel.created\n- member.added\n- member.removed\n- member.updated\n- user.watching.start\n","operationId":"GetOrCreateChannel_type_1","parameters":[{"content":{"application/json":{"schema":{"description":"Channel type","maxLength":64,"title":"Type","type":"string","writeOnly":true,"x-stream-index":"002"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","x-stream-index":"001.002"}}},"in":"query","name":"client_id"},{"content":{"application/json":{"schema":{"type":"string","x-stream-index":"001.003"}}},"in":"query","name":"connection_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelGetOrCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelStateResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get or create channel (type)","tags":["Channels"],"x-stream-docs-page-id":"watch_channel","x-stream-events":{"channel.created":"If channel is created","member.added":"If member is added","member.removed":"If member is removed","member.updated":"If member is updated","user.watching.start":"If `watch: true`"},"x-stream-events-v2":{"channel.created":{"description":"If channel is created","schema":{"ref":"#/components/schemas/ChannelCreatedEvent"}},"member.added":{"description":"If member is added","schema":{"ref":"#/components/schemas/MemberAddedEvent"}},"member.removed":{"description":"If member is removed","schema":{"ref":"#/components/schemas/MemberRemovedEvent"}},"member.updated":{"description":"If member is updated","schema":{"ref":"#/components/schemas/MemberUpdatedEvent"}},"user.watching.start":{"description":"If `watch: true`","schema":{"ref":"#/components/schemas/UserWatchingStartEvent"}}}}},"/channels/{type}/{id}":{"delete":{"description":"Deletes channel\n\nSends events:\n- channel.deleted\n\nRequired permissions:\n- DeleteChannel\n","operationId":"DeleteChannel","parameters":[{"content":{"application/json":{"schema":{"description":"Channel type to interact with","title":"Channel type","type":"string","writeOnly":true,"x-stream-index":"001.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"description":"Channel ID to interact with","title":"Channel ID","type":"string","writeOnly":true,"x-stream-index":"001.002"}}},"in":"path","name":"id","required":true},{"content":{"application/json":{"schema":{"type":"boolean","x-stream-index":"002"}}},"in":"query","name":"hard_delete"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChannelResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Delete channel","tags":["Channels"],"x-stream-docs-page-id":"channel_delete","x-stream-events":{"channel.deleted":"When channel is deleted"},"x-stream-events-v2":{"channel.deleted":{"description":"When channel is deleted","schema":{"ref":"#/components/schemas/ChannelDeletedEvent"}}},"x-stream-permissions":{"DeleteChannel":"To delete a channel"}},"patch":{"description":"Updates certain fields of the channel\n\nSends events:\n- channel.updated\n\nRequired permissions:\n- UpdateChannel\n- UpdateChannelCooldown\n- UpdateChannelFrozen\n","operationId":"UpdateChannelPartial","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelPartialRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelPartialResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Partially update channel","tags":["Channels"],"x-stream-docs-page-id":"channel_update#partial-update","x-stream-events":{"channel.updated":"When channel is updated"},"x-stream-events-v2":{"channel.updated":{"description":"When channel is updated","schema":{"ref":"#/components/schemas/ChannelUpdatedEvent"}}},"x-stream-permissions":{"UpdateChannel":"To update channel data","UpdateChannelCooldown":"To update channel cooldown (slowmode)","UpdateChannelFrozen":"To freeze or unfreeze a channel"}},"post":{"description":"Change channel data\n\nSends events:\n- channel.updated\n- member.added\n- member.removed\n- member.updated\n- message.new\n\nRequired permissions:\n- AddOwnChannelMembership\n- RemoveOwnChannelMembership\n- UpdateChannel\n- UpdateChannelCooldown\n- UpdateChannelFrozen\n- UpdateChannelMembers\n","operationId":"UpdateChannel","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"013.002.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"013.002.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelRequest"}}},"description":"Channel update request","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Update channel","tags":["Channels"],"x-stream-docs-page-id":"channel_update","x-stream-events":{"channel.updated":"When channel is successfully updated","member.added":"When new channel member is added","member.removed":"When new channel member is removed","member.updated":"When new channel member is updated","message.new":"When system `message` is set"},"x-stream-events-v2":{"channel.updated":{"description":"When channel is successfully updated","schema":{"ref":"#/components/schemas/ChannelUpdatedEvent"}},"member.added":{"description":"When new channel member is added","schema":{"ref":"#/components/schemas/MemberAddedEvent"}},"member.removed":{"description":"When new channel member is removed","schema":{"ref":"#/components/schemas/MemberRemovedEvent"}},"member.updated":{"description":"When new channel member is updated","schema":{"ref":"#/components/schemas/MemberUpdatedEvent"}},"message.new":{"description":"When system `message` is set","schema":{"ref":"#/components/schemas/MessageNewEvent"}}},"x-stream-permissions":{"AddOwnChannelMembership":"To add own channel membership (join a channel)","RemoveOwnChannelMembership":"To remove own channel membership (leave a channel)","UpdateChannel":"To update channel data","UpdateChannelCooldown":"To update channel cooldown (slowmode)","UpdateChannelFrozen":"To freeze or unfreeze a channel","UpdateChannelMembers":"To add, remove or modify channel members"}}},"/channels/{type}/{id}/call":{"post":{"description":"Creates a call\n\nRequired permissions:\n- CreateCall\n- ReadChannel\n","operationId":"CreateCall","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Create a call","x-stream-docs-page-id":"video","x-stream-permissions":{"CreateCall":"To create a call","ReadChannel":"To read the channel"}}},"/channels/{type}/{id}/event":{"post":{"description":"Sends event to the channel\n\nSends events:\n- any\n\nRequired permissions:\n- SendCustomEvent\n","operationId":"SendEvent","parameters":[{"content":{"application/json":{"schema":{"description":"Channel type to interact with","title":"Channel type","type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"description":"Channel ID to interact with","title":"Channel ID","type":"string","writeOnly":true,"x-stream-index":"002.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEventRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Send event","tags":["Events"],"x-stream-docs-page-id":"event_object","x-stream-events":{"any":"Any event could be sent through this endpoint"},"x-stream-events-v2":{"any":{"description":"Any event could be sent through this endpoint","schema":{"ref":"#/components/schemas/AnyEvent"}}},"x-stream-permissions":{"SendCustomEvent":"To send custom events"}}},"/channels/{type}/{id}/file":{"delete":{"description":"Deletes previously uploaded file\n\nRequired permissions:\n- DeleteAttachment\n","operationId":"DeleteFile","parameters":[{"content":{"application/json":{"schema":{"description":"File URL to delete","title":"URL","type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"query","name":"url"},{"description":"Automatically added","in":"path","name":"type","required":true,"schema":{"type":"string"}},{"description":"Automatically added","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Delete file","tags":["Messages","Files"],"x-stream-docs-page-id":"file_uploads","x-stream-permissions":{"DeleteAttachment":"To delete a file"}},"post":{"description":"Uploads file\n\nRequired permissions:\n- UploadAttachment\n","operationId":"UploadFile","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileUploadRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Upload file","tags":["Messages","Files"],"x-stream-docs-page-id":"file_uploads","x-stream-permissions":{"UploadAttachment":"To upload a file"}}},"/channels/{type}/{id}/hide":{"post":{"description":"Marks channel as hidden for current user\n\nSends events:\n- channel.hidden\n\nRequired permissions:\n- ReadChannel\n","operationId":"HideChannel","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HideChannelRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HideChannelResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Hide channel","tags":["Channels"],"x-stream-docs-page-id":"channel_delete#hiding-a-channel","x-stream-events":{"channel.hidden":"When channel is hidden"},"x-stream-events-v2":{"channel.hidden":{"description":"When channel is hidden","schema":{"ref":"#/components/schemas/ChannelHiddenEvent"}}},"x-stream-permissions":{"ReadChannel":"To hide specified channel"}}},"/channels/{type}/{id}/image":{"delete":{"description":"Deletes previously uploaded image\n\nRequired permissions:\n- DeleteAttachment\n","operationId":"DeleteImage","parameters":[{"content":{"application/json":{"schema":{"description":"File URL to delete","title":"URL","type":"string","writeOnly":true,"x-stream-index":"001"}}},"in":"query","name":"url"},{"description":"Automatically added","in":"path","name":"type","required":true,"schema":{"type":"string"}},{"description":"Automatically added","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Delete image","tags":["Messages","Files"],"x-stream-docs-page-id":"file_uploads","x-stream-permissions":{"DeleteAttachment":"To delete an image"}},"post":{"description":"Uploads image\n\nRequired permissions:\n- UploadAttachment\n","operationId":"UploadImage","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"001.001.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImageUploadRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Upload image","tags":["Messages","Files"],"x-stream-docs-page-id":"file_uploads","x-stream-permissions":{"UploadAttachment":"To upload an image"}}},"/channels/{type}/{id}/message":{"post":{"description":"Sends new message to the specified channel\n\nSends events:\n- message.new\n- message.updated\n\nRequired permissions:\n- AddLinks\n- CreateMessage\n- PinMessage\n- SkipChannelCooldown\n- SkipMessageModeration\n- UseFrozenChannel\n","operationId":"SendMessage","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"007.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"007.002"}}},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}},"description":"Send Message Request","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageWithPendingMetadataResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Send new message","tags":["Messages"],"x-stream-docs-page-id":"send_message","x-stream-events":{"message.new":"When the message was successfully sent","message.updated":"Parent message gets this event in case the message had been sent to a thread"},"x-stream-events-v2":{"message.new":{"description":"When the message was successfully sent","schema":{"ref":"#/components/schemas/MessageNewEvent"}},"message.updated":{"description":"Parent message gets this event in case the message had been sent to a thread","schema":{"ref":"#/components/schemas/MessageUpdatedEvent"}}},"x-stream-permissions":{"AddLinks":"To send message with URLs","CreateMessage":"To send a message","PinMessage":"To send pinned message","SkipChannelCooldown":"To bypass channel slow mode","SkipMessageModeration":"To bypass automatic message moderation","UseFrozenChannel":"To send a message to frozen channel"}}},"/channels/{type}/{id}/messages":{"get":{"description":"Returns list messages found by IDs\n\nRequired permissions:\n- ReadChannel\n","operationId":"GetManyMessages","parameters":[{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.001"}}},"in":"path","name":"type","required":true},{"content":{"application/json":{"schema":{"type":"string","writeOnly":true,"x-stream-index":"002.002"}}},"in":"path","name":"id","required":true},{"content":{"application/json":{"schema":{"description":"List of comma-separated IDs","items":{"type":"string"},"maximum":50,"minimum":1,"title":"IDs","type":"array","x-stream-index":"001"}}},"in":"query","name":"ids"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetManyMessagesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Too many requests","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Timestamp when number of requests will be reset","schema":{"type":"integer"}}}}},"summary":"Get many messages","tags":["Messages"],"x-stream-permissions":{"ReadChannel":"To read specified messages"}}},"/channels/{type}/{id}/query":{"post":{"description":"This method creates a channel or returns an existing one with matchin