From 797a29d8ef5615c35a21012fe7a28ff362f8e33b Mon Sep 17 00:00:00 2001 From: giuseppeM99 Date: Tue, 12 Jan 2021 01:03:23 +0000 Subject: [PATCH] deploy: cd79fa2f05bfc150fe1e202025f96610ab639ec0 --- .nojekyll | 0 dist/favicon-16x16.png | Bin 0 -> 665 bytes dist/favicon-32x32.png | Bin 0 -> 628 bytes dist/oauth2-redirect.html | 74 + dist/swagger-ui-bundle.js | 3 + dist/swagger-ui-bundle.js.map | 1 + dist/swagger-ui-es-bundle-core.js | 3 + dist/swagger-ui-es-bundle-core.js.map | 1 + dist/swagger-ui-es-bundle.js | 3 + dist/swagger-ui-es-bundle.js.map | 1 + dist/swagger-ui-standalone-preset.js | 3 + dist/swagger-ui-standalone-preset.js.map | 1 + dist/swagger-ui.css | 4 + dist/swagger-ui.css.map | 1 + dist/swagger-ui.js | 3 + dist/swagger-ui.js.map | 1 + icons/favicon-16x16.png | Bin 0 -> 657 bytes icons/favicon-196x196.png | Bin 0 -> 25458 bytes icons/favicon-32x32.png | Bin 0 -> 1578 bytes index.html | 60 + tdlight-api-openapi.yaml | 12107 +++++++++++++++++++++ 21 files changed, 12266 insertions(+) create mode 100644 .nojekyll create mode 100644 dist/favicon-16x16.png create mode 100644 dist/favicon-32x32.png create mode 100644 dist/oauth2-redirect.html create mode 100644 dist/swagger-ui-bundle.js create mode 100644 dist/swagger-ui-bundle.js.map create mode 100644 dist/swagger-ui-es-bundle-core.js create mode 100644 dist/swagger-ui-es-bundle-core.js.map create mode 100644 dist/swagger-ui-es-bundle.js create mode 100644 dist/swagger-ui-es-bundle.js.map create mode 100644 dist/swagger-ui-standalone-preset.js create mode 100644 dist/swagger-ui-standalone-preset.js.map create mode 100644 dist/swagger-ui.css create mode 100644 dist/swagger-ui.css.map create mode 100644 dist/swagger-ui.js create mode 100644 dist/swagger-ui.js.map create mode 100644 icons/favicon-16x16.png create mode 100644 icons/favicon-196x196.png create mode 100644 icons/favicon-32x32.png create mode 100644 index.html create mode 100644 tdlight-api-openapi.yaml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..8b194e617af1c135e6b37939591d24ac3a5efa18 GIT binary patch literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? literal 0 HcmV?d00001 diff --git a/dist/favicon-32x32.png b/dist/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..249737fe44558e679f0b67134e274461d988fa98 GIT binary patch literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 + + + Swagger UI: OAuth2 Redirect + + + + + diff --git a/dist/swagger-ui-bundle.js b/dist/swagger-ui-bundle.js new file mode 100644 index 0000000..4a0e363 --- /dev/null +++ b/dist/swagger-ui-bundle.js @@ -0,0 +1,3 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=547)}([function(e,t,n){"use strict";e.exports=n(128)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function O(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=le(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function le(e){return $(e)?new te(e):V(e)?new oe(e):z(e)?new re(e):void 0}function pe(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new F((function(){var e=o[n?a-i:i];return i++>a?q():U(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function he(e,t){return t?de(t,e,"",{"":e}):me(e)}function de(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return de(e,n,r,t)}))):ve(t)?e.call(r,n,K(t).map((function(n,r){return de(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?K(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ge(o[1],e)&&(n||ge(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var p=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===f}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function _e(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(_e(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?q():U(e,o,n[t?r-o++:o++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new F((function(){var i=r[t?o-a:a];return a++>o?q():U(e,i,n[i])}))},ne.prototype[d]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=W(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=W(this._iterable);if(!V(n))return new F(q);var r=0;return new F((function(){var t=n.next();return t.done?t:U(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return U(e,o,r[o++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return j(e,t,n)?this:new be(this._value,I(t,n)-T(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?q():U(e,a++,i)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(xe,n),t(Ee,xe),t(Se,xe),t(Ce,xe),xe.Keyed=Ee,xe.Indexed=Se,xe.Set=Ce;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>Fe?je(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ie(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function je(e){var t=ze[e];return void 0===t&&(t=Te(e),qe===Ue&&(qe=0,ze={}),qe++,ze[e]=t),t}function Te(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Re,De="function"==typeof WeakMap;De&&(Re=new WeakMap);var Le=0,Be="__immutablehash__";"function"==typeof Symbol&&(Be=Symbol(Be));var Fe=16,Ue=255,qe=0,ze={};function Ve(e){_e(e!==1/0,"Cannot perform this action with an infinite size.")}function We(e){return null==e?ot():He(e)&&!l(e)?e:ot().withMutations((function(t){var n=r(e);Ve(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Je])}t(We,Ee),We.of=function(){var t=e.call(arguments,0);return ot().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},We.prototype.toString=function(){return this.__toString("Map {","}")},We.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},We.prototype.set=function(e,t){return at(this,e,t)},We.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},We.prototype.remove=function(e){return at(this,e,b)},We.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},We.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},We.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,xn(e),t,n);return r===b?void 0:r},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},We.prototype.merge=function(){return ft(this,void 0,arguments)},We.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},We.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},We.prototype.mergeDeep=function(){return ft(this,ht,arguments)},We.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,dt(t),n)},We.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},We.prototype.sort=function(e){return zt(pn(this,e))},We.prototype.sortBy=function(e,t){return zt(pn(this,t,e))},We.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},We.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},We.prototype.asImmutable=function(){return this.__ensureOwner()},We.prototype.wasAltered=function(){return this.__altered},We.prototype.__iterator=function(e,t){return new et(this,e,t)},We.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},We.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},We.isMap=He;var $e,Je="@@__IMMUTABLE_MAP__@@",Ke=We.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return U(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ke);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return $e||($e=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=x(_),i=x(w);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===b?e:(E(s),E(i),new Qe(t,r,[o,a]))}function st(e){return e.constructor===Qe||e.constructor===Xe}function ut(e,t,n,r,o){if(e.keyHash===r)return new Xe(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ge(t,1<>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Ze(e,a+1,i)}function ft(e,t,n){for(var o=[],a=0;a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:C(e);return o[t]=n,o}function bt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s=wt)return ct(e,u,r,o);var f=e&&e===this.ownerID,h=f?u:C(u);return p?s?c===l-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),f?(this.entries=h,this):new Ye(e,h)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[gt(a&o-1)].get(e+v,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=1<=xt)return pt(e,f,c,s,d);if(l&&!d&&2===f.length&&st(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&st(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^u:c|u,_=l?d?yt(f,p,d,m):_t(f,p,m):bt(f,p,d,m);return m?(this.bitmap=g,this.nodes=_,this):new Ge(e,g,_)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+v,t,n,r):r},Ze.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=o===b,c=this.nodes,l=c[s];if(u&&!l)return this;var p=it(l,e,t+v,n,r,o,a,i);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e>>t&y;if(r>=this.array.length)return new Ot([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-v,n))===i&&a)return this}if(a&&!o)return this;var s=Lt(this,e);if(!a)for(var u=0;u>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-v,n))===a&&o===this.array.length-1)return this}var i=Lt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var jt,Tt,It={};function Pt(e,t){var n=e._origin,r=e._capacity,o=qt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):u(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,u=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(u===c)return It;var e=t?--c:u++;return s&&s[e]}}function u(e,o,a){var s,u=e&&e.array,c=a>n?0:n-a>>o,l=1+(r-a>>o);return l>g&&(l=g),function(){for(;;){if(s){var e=s();if(e!==It)return e;s=null}if(c===l)return It;var n=t?--l:c++;s=i(u&&u[n],o-v,a+(n<=e.size||t<0)return e.withMutations((function(e){t<0?Ft(e,t).set(0,n):Ft(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=x(w);return t>=qt(e._capacity)?r=Dt(r,e.__ownerID,0,t,n,a):o=Dt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,o,r):e}function Dt(e,t,n,r,o,a){var i,s=r>>>n&y,u=e&&s0){var c=e&&e.array[s],l=Dt(c,t,n-v,r,o,a);return l===c?e:((i=Lt(e,t)).array[s]=l,i)}return u&&e.array[s]===o?e:(E(a),i=Lt(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Bt(e,t){if(t>=qt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=v;return n}}function Ft(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var u=e._level,c=e._root,l=0;i+l<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=v);l&&(i+=l,o+=l,s+=l,a+=l);for(var p=qt(a),f=qt(s);f>=1<p?new Ot([],r):h;if(h&&f>p&&iv;g-=v){var b=p>>>g&y;m=m.array[b]=Lt(m.array[b],r)}m.array[p>>>v&y]=h}if(s=f)i-=f,s-=f,u=v,c=null,d=d&&d.removeBefore(r,0,i);else if(i>o||f>>u&y;if(_!==f>>>u&y)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,i-l)),c&&fa&&(a=c.size),i(u)||(c=c.map((function(e){return he(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),mt(e,t,r)}function qt(e){return e>>v<=g&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(u){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Wt(r,o)}function Jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=_n,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===R){var r=e.__iterator(t,n);return new F((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===M?N:M,n)},t}function Xt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(R,o);return new F((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return U(r,s,t.call(n,i[1],s,e),o)}))},r}function Qt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Zt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=_n,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=bn(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,u){if(t.call(n,e,a,u))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(R,a),s=0;return new F((function(){for(;;){var a=i.next();if(a.done)return a;var u=a.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return U(o,r?c:s++,l,a)}}))},o}function tn(e,t,n){var r=We().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(l(e)?zt():We()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return mn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),j(t,n,o))return e;var a=T(t,o),i=I(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,u=i-a;u==u&&(s=u<0?0:u);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&ts)return q();var e=o.next();return r||t===M?e:U(t,u-1,t===N?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(R,o),s=!0;return new F((function(){if(!s)return q();var e=i.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,a)?r===R?e:U(r,u,c,e):(s=!1,q())}))},r}function an(e,t,n,r){var o=bn(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,u=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return u++,o(e,r?a:u-1,i)})),u},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(R,a),u=!0,c=0;return new F((function(){var e,a,l;do{if((e=s.next()).done)return r||o===M?e:U(o,c++,o===N?void 0:e.value[1],e);var p=e.value;a=p[0],l=p[1],u&&(u=t.call(n,l,a,i))}while(u);return o===R?e:U(o,a,l,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):ue(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||u(e)&&u(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function un(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function u(e,c){var l=this;e.__iterate((function(e,o){return(!t||c0}function dn(e,t,r){var o=bn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),W(o?e.reverse():e)})),i=0,s=!1;return new F((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?q():U(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ae(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Ve(e.size),A(e)}function yn(e){return s(e)?r:u(e)?o:a}function bn(e){return Object.create((s(e)?K:u(e)?Y:G).prototype)}function _n(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ve(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Vn.prototype.slice=function(e,t){if(j(e,t,this.size))return this;var n=T(e,this.size);if(I(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Kn(r,o)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new F((function(){if(r){var t=r.value;return r=r.next,U(e,n++,t)}return q()}))},Vn.isStack=Wn;var Hn,$n="@@__IMMUTABLE_STACK__@@",Jn=Vn.prototype;function Kn(e,t,n,r){var o=Object.create(Jn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Hn||(Hn=Kn(0))}function Gn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Jn[$n]=!0,Jn.withMutations=Ke.withMutations,Jn.asMutable=Ke.asMutable,Jn.asImmutable=Ke.asImmutable,Jn.wasAltered=Ke.wasAltered,n.Iterator=F,Gn(n,{toArray:function(){Ve(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Jt(this,!0)},toMap:function(){return We(this.toKeyedSeq())},toObject:function(){Ve(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return zt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return jn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(R)},every:function(e,t){Ve(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ve(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ve(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Xt(this,e,t))},reduce:function(e,t,n){var r,o;return Ve(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Qt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(O)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,un(this,e,!0))},fromEntrySeq:function(){return new Gt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=xn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ar)},minBy:function(e,t){return fn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Zn=n.prototype;Zn[p]=!0,Zn[B]=Zn.values,Zn.__toJS=Zn.toArray,Zn.__toStringMapper=rr,Zn.inspect=Zn.toSource=function(){return this.toString()},Zn.chain=Zn.flatMap,Zn.contains=Zn.includes,Gn(r,{flip:function(){return mn(this,Zt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Xn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return C(arguments)}function ar(e,t){return et?-1:0}function ir(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+ur(Oe(e),Oe(t))|0}:function(e,t){r=r+ur(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0}),r)}function sr(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Ae(t^t>>>13,3266489909))^t>>>16)}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[f]=!0,Xn[B]=Zn.entries,Xn.__toJS=Zn.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Gn(o,{toKeyedSeq:function(){return new Jt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Qt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(C(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,un(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function Te(e){return t=e.replace(/\.[^./]*$/,""),J()(H()(t));var t}var Ie=function(e,t){if(e>t)return"Value must be less than ".concat(t)},Pe=function(e,t){if(et)return T()(n="Value must be no longer than ".concat(t," character")).call(n,1!==t?"s":"")},qe=function(e,t){var n;if(e.length2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,a=n.bypassRequiredCheck,i=void 0!==a&&a,s=[],u=e.get("required"),c=Object(ue.a)(e,{isOAS3:o}),l=c.schema,p=c.parameterContentMediaType;if(!l)return s;var f=l.get("required"),h=l.get("maximum"),d=l.get("minimum"),m=l.get("type"),g=l.get("format"),y=l.get("maxLength"),b=l.get("minLength"),_=l.get("pattern");if(m&&(u||f||t)){var w="string"===m&&t,x="array"===m&&B()(t)&&t.length,E="array"===m&&z.a.List.isList(t)&&t.count(),S="array"===m&&"string"==typeof t&&t,C="file"===m&&t instanceof ae.a.File,A="boolean"===m&&(t||!1===t),k="number"===m&&(t||0===t),j="integer"===m&&(t||0===t),T="object"===m&&"object"===U()(t)&&null!==t,I="object"===m&&"string"==typeof t&&t,P=[w,x,E,S,C,A,k,j,T,I],N=v()(P).call(P,(function(e){return!!e}));if((u||f)&&!N&&!i)return s.push("Required field is not provided"),s;if("object"===m&&"string"==typeof t&&(null===p||"application/json"===p))try{JSON.parse(t)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(_){var M=ze(t,_);M&&s.push(M)}if(y||0===y){var R=Ue(t,y);R&&s.push(R)}if(b){var D=qe(t,b);D&&s.push(D)}if(h||0===h){var L=Ie(t,h);L&&s.push(L)}if(d||0===d){var F=Pe(t,d);F&&s.push(F)}if("string"===m){var q;if(!(q="date-time"===g?Be(t):"uuid"===g?Fe(t):Le(t)))return s;s.push(q)}else if("boolean"===m){var V=De(t);if(!V)return s;s.push(V)}else if("number"===m){var W=Ne(t);if(!W)return s;s.push(W)}else if("integer"===m){var H=Me(t);if(!H)return s;s.push(H)}else if("array"===m){var $;if(!E||!t.count())return s;$=l.getIn(["items","type"]),O()(t).call(t,(function(e,t){var n;"number"===$?n=Ne(e):"integer"===$?n=Me(e):"string"===$&&(n=Le(e)),n&&s.push({index:t,error:n})}))}else if("file"===m){var J=Re(t);if(!J)return s;s.push(J)}}return s},We=function(e,t,n){if(e&&(!e.xml||!e.xml.name)){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(oe.memoizedCreateXMLExample)(e,t,n)},He=[{when:/json/,shouldStringifyTypes:["string"]}],$e=["object"],Je=function(e,t,n,r){var o=Object(oe.memoizedSampleFromSchema)(e,t,r),a=U()(o),i=x()(He).call(He,(function(e,t){var r;return t.when.test(n)?T()(r=[]).call(r,d()(e),d()(t.shouldStringifyTypes)):e}),$e);return Q()(i,(function(e){return e===a}))?f()(o,null,2):o},Ke=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return e&&we(e.toJS)&&(e=e.toJS()),r&&we(r.toJS)&&(r=r.toJS()),/xml/.test(t)?We(e,n,r):Je(e,n,t,r)},Ye=function(){var e={},t=ae.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},Ge=function(t){return(t instanceof e?t:e.from(t.toString(),"utf-8")).toString("base64")},Ze={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},Xe=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},Qe=function(e,t,n){return!!Z()(n,(function(n){return te()(e[n],t[n])}))};function et(e){return"string"!=typeof e||""===e?"":Object(V.sanitizeUrl)(e)}function tt(e){return!(!e||l()(e).call(e,"localhost")>=0||l()(e).call(e,"127.0.0.1")>=0||"none"===e)}function nt(e){if(!z.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=u()(e).call(e,(function(e,t){return i()(t).call(t,"2")&&S()(e.get("content")||{}).length>0})),n=e.get("default")||z.a.OrderedMap(),r=(n.get("content")||z.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var rt=function(e){return"string"==typeof e||e instanceof String?o()(e).call(e).replace(/\s/g,"%20"):""},ot=function(e){return se()(rt(e).replace(/%20/g,"_"))},at=function(e){return A()(e).call(e,(function(e,t){return/^x-/.test(t)}))},it=function(e){return A()(e).call(e,(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function st(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==U()(e)||B()(e)||null===e||!t)return e;var o=_()({},e);return O()(n=S()(o)).call(n,(function(e){e===t&&r(o[e],e)?delete o[e]:o[e]=st(o[e],t,r)})),o}function ut(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===U()(e)&&null!==e)try{return f()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function ct(e){return"number"==typeof e?e.toString():e}function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,a=void 0===o||o;if(!z.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var i,s,u,c=e.get("name"),l=e.get("in"),p=[];e&&e.hashCode&&l&&c&&a&&p.push(T()(i=T()(s="".concat(l,".")).call(s,c,".hash-")).call(i,e.hashCode()));l&&c&&p.push(T()(u="".concat(l,".")).call(u,c));return p.push(c),r?p:p[0]||""}function pt(e,t){var n,r=lt(e,{returnAll:!0});return A()(n=D()(r).call(r,(function(e){return t[e]}))).call(n,(function(e){return void 0!==e}))[0]}function ft(){return dt(le()(32).toString("base64"))}function ht(e){return dt(fe()("sha256").update(e).digest("base64"))}function dt(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var mt=function(e){return!e||!(!de(e)||!e.isEmpty())}}).call(this,n(77).Buffer)},function(e,t,n){var r=n(909),o=n(912);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=r(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var r=n(466),o=n(208),a=n(923),i=n(924);e.exports=function(e){var t=a();return function(){var n,a=o(e);if(t){var s=o(this).constructor;n=r(a,arguments,s)}else n=a.apply(this,arguments);return i(this,n)}}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){e.exports=n(1002)()},function(e,t,n){e.exports=n(649)},function(e,t,n){e.exports=n(584)},function(e,t,n){e.exports=n(601)},function(e,t,n){var r=n(399),o=n(672),a=n(184),i=n(402);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()}},function(e,t,n){e.exports=n(551)},function(e,t,n){var r=n(652),o=n(391),a=n(184),i=n(661);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},function(e,t,n){e.exports=n(403)},function(e,t,n){"use strict";function r(e,t){return e===t}function o(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},function(e,t,n){var r=n(553),o=n(179);function a(t){return e.exports=a="function"==typeof o&&"symbol"==typeof r?function(e){return typeof e}:function(e){return e&&"function"==typeof o&&e.constructor===o&&e!==o.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t,n){e.exports=n(608)},function(e,t,n){e.exports=n(596)},function(e,t,n){"use strict";var r=n(42),o=n(107).f,a=n(356),i=n(33),s=n(109),u=n(70),c=n(52),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,p,f,h,d,m,v,g,y=e.target,b=e.global,_=e.stat,w=e.proto,x=b?r:_?r[y]:(r[y]||{}).prototype,E=b?i:i[y]||(i[y]={}),S=E.prototype;for(f in t)n=!a(b?f:y+(_?".":"#")+f,e.forced)&&x&&c(x,f),d=E[f],n&&(m=e.noTargetGet?(g=o(x,f))&&g.value:x[f]),h=n&&m?m:t[f],n&&typeof d==typeof h||(v=e.bind&&n?s(h,r):e.wrap&&n?l(h):w&&"function"==typeof h?s(Function.call,h):h,(e.sham||h&&h.sham||d&&d.sham)&&u(v,"sham",!0),E[f]=v,w&&(c(i,p=y+"Prototype")||u(i,p,{}),i[p][f]=h,e.real&&S&&!S[f]&&u(S,f,h)))}},function(e,t,n){e.exports=n(605)},function(e,t,n){var r=n(241),o=n(842),a=n(846),i=n(851),s=n(444),u=n(856),c=n(445),l=n(446),p=n(3);function f(e,t){var n=l(e);if(c){var r=c(e);t&&(r=u(r).call(r,(function(t){return s(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t>",i=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};i.isRequired=i;var s=function(){return i};function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof o.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function c(e){function t(t,n,r,o,i,s){for(var u=arguments.length,c=Array(u>6?u-6:0),l=6;l4)}function l(e){var t=e.get("swagger");return"string"==typeof t&&i()(t).call(t,"2.0")}function p(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?c(n.specSelectors.specJson())?u.a.createElement(e,o()({},r,n,{Ori:t})):u.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){var r=n(42),o=n(230),a=n(52),i=n(177),s=n(232),u=n(360),c=o("wks"),l=r.Symbol,p=u?l:l&&l.withoutSetter||i;e.exports=function(e){return a(c,e)||(s&&a(l,e)?c[e]=l[e]:c[e]=p("Symbol."+e)),c[e]}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=i(e),c=1;c0){var o=D()(n).call(n,(function(e){return console.error(e),e.line=e.fullPath?g(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",M()(e,"message",{enumerable:!0,value:e.message}),e}));a.newThrownErrBatch(o)}return r.updateResolved(t)}))}},Ce=[],Ae=Z()(P()(_.a.mark((function e(){var t,n,r,o,a,i,s,u,c,l,p,f,h,d,m,v,g,y;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ce.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,a=o.resolveSubtree,i=o.fetch,s=o.AST,u=void 0===s?{}:s,c=t.specSelectors,l=t.specActions,a){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return p=u.getLineNumberForPath?u.getLineNumberForPath:function(){},f=c.specStr(),h=t.getConfigs(),d=h.modelPropertyMacro,m=h.parameterMacro,v=h.requestInterceptor,g=h.responseInterceptor,e.prev=11,e.next=14,T()(Ce).call(Ce,function(){var e=P()(_.a.mark((function e(t,o){var s,u,l,h,y,b,w,E,C;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return s=e.sent,u=s.resultMap,l=s.specWithCurrentSubtrees,e.next=7,a(l,o,{baseDoc:c.url(),modelPropertyMacro:d,parameterMacro:m,requestInterceptor:v,responseInterceptor:g});case 7:if(h=e.sent,y=h.errors,b=h.spec,r.allErrors().size&&n.clearBy((function(e){var t;return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!O()(t=e.get("fullPath")).call(t,(function(e,t){return e===o[t]||void 0===o[t]}))})),B()(y)&&y.length>0&&(w=D()(y).call(y,(function(e){return e.line=e.fullPath?p(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",M()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(w)),!b||!c.isOAS3()||"components"!==o[0]||"securitySchemes"!==o[1]){e.next=15;break}return e.next=15,A.a.all(D()(E=S()(C=x()(b)).call(C,(function(e){return"openIdConnect"===e.type}))).call(E,function(){var e=P()(_.a.mark((function e(t){var n,r;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={url:t.openIdConnectUrl,requestInterceptor:v,responseInterceptor:g},e.prev=1,e.next=4,i(n);case 4:(r=e.sent)instanceof Error||r.status>=400?console.error(r.statusText+" "+n.url):t.openIdConnectData=JSON.parse(r.text),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return Q()(u,o,b),Q()(l,o,b),e.abrupt("return",{resultMap:u,specWithCurrentSubtrees:l});case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),A.a.resolve({resultMap:(c.specResolvedSubtree([])||Object(V.Map)()).toJS(),specWithCurrentSubtrees:c.specJson().toJS()}));case 14:y=e.sent,delete Ce.system,Ce=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:l.updateResolvedSubtree([],y.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),ke=function(e){return function(t){var n;y()(n=D()(Ce).call(Ce,(function(e){return e.join("@@")}))).call(n,e.join("@@"))>-1||(Ce.push(e),Ce.system=t,Ae())}};function Oe(e,t,n,r,o){return{type:oe,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function je(e,t,n,r){return{type:oe,payload:{path:e,param:t,value:n,isXml:r}}}var Te=function(e,t){return{type:ve,payload:{path:e,value:t}}},Ie=function(){return{type:ve,payload:{path:[],value:Object(V.Map)()}}},Pe=function(e,t){return{type:ie,payload:{pathMethod:e,isOAS3:t}}},Ne=function(e,t,n,r){return{type:ae,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Me(e){return{type:he,payload:{pathMethod:e}}}function Re(e,t){return{type:de,payload:{path:e,value:t,key:"consumes_value"}}}function De(e,t){return{type:de,payload:{path:e,value:t,key:"produces_value"}}}var Le=function(e,t,n){return{payload:{path:e,method:t,res:n},type:se}},Be=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ue}},Fe=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ce}},Ue=function(e){return{payload:e,type:le}},qe=function(e){return function(t){var n,r,o=t.fn,a=t.specActions,i=t.specSelectors,s=t.getConfigs,c=t.oas3Selectors,p=e.pathName,h=e.method,m=e.operation,g=s(),y=g.requestInterceptor,b=g.responseInterceptor,w=m.toJS();m&&m.get("parameters")&&v()(n=S()(r=m.get("parameters")).call(r,(function(e){return e&&!0===e.get("allowEmptyValue")}))).call(n,(function(t){if(i.parameterInclusionSettingFor([p,h],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(ee.C)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}));if(e.contextUrl=H()(i.url()).toString(),w&&w.operationId?e.operationId=w.operationId:w&&p&&h&&(e.operationId=o.opId(w,p,h)),i.isOAS3()){var x,E=d()(x="".concat(p,":")).call(x,h);e.server=c.selectedServer(E)||c.selectedServer();var C=c.serverVariables({server:e.server,namespace:E}).toJS(),A=c.serverVariables({server:e.server}).toJS();e.serverVariables=f()(C).length?C:A,e.requestContentType=c.requestContentType(p,h),e.responseContentType=c.responseContentType(p,h)||"*/*";var k=c.requestBodyValue(p,h),O=c.requestBodyInclusionSetting(p,h);if(Object(ee.t)(k))e.requestBody=JSON.parse(k);else if(k&&k.toJS){var j;e.requestBody=S()(j=D()(k).call(k,(function(e){return V.Map.isMap(e)?e.get("value"):e}))).call(j,(function(e,t){return(B()(e)?0!==e.length:!Object(ee.q)(e))||O.get(t)})).toJS()}else e.requestBody=k}var T=l()({},e);T=o.buildRequest(T),a.setRequest(e.pathName,e.method,T);var I=function(){var t=P()(_.a.mark((function t(n){var r,o;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.apply(undefined,[n]);case 2:return r=t.sent,o=l()({},r),a.setMutatedRequest(e.pathName,e.method,o),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();e.requestInterceptor=I,e.responseInterceptor=b;var N=u()();return o.execute(e).then((function(t){t.duration=u()()-N,a.setResponse(e.pathName,e.method,t)})).catch((function(t){console.error(t),a.setResponse(e.pathName,e.method,{error:!0,err:J()(t)})}))}},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i()(e,["path","method"]);return function(e){var a=e.fn.fetch,i=e.specSelectors,s=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),c=i.operationScheme(t,n),l=i.contentTypeValues([t,n]).toJS(),p=l.requestContentType,f=l.responseContentType,h=/xml/i.test(p),d=i.parameterValues([t,n],h).toJS();return s.executeRequest(o()(o()({},r),{},{fetch:a,spec:u,pathName:t,method:n,parameters:d,requestContentType:p,scheme:c,responseContentType:f}))}};function Ve(e,t){return{type:pe,payload:{path:e,method:t}}}function We(e,t){return{type:fe,payload:{path:e,method:t}}}function He(e,t,n){return{type:ge,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r=n(33),o=n(52),a=n(229),i=n(71).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(36);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=n(163),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];e.exports=function(e,t){var n,i;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){i[String(t)]=e}))})),i),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(400),o=n(243),a=n(682),i=n(179),s=n(184);e.exports=function(e,t){var n;if(void 0===i||null==a(e)){if(o(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var u=0,c=function(){};return{s:c,n:function(){return u>=e.length?{done:!0}:{done:!1,value:e[u++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,p=!0,f=!1;return{s:function(){n=r(e)},n:function(){var e=n.next();return p=e.done,e},e:function(e){f=!0,l=e},f:function(){try{p||null==n.return||n.return()}finally{if(f)throw l}}}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(45);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(447),o=n(445),a=n(862);e.exports=function(e,t){if(null==e)return{};var n,i,s=a(e,t);if(o){var u=o(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){e.exports=n(645)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return a})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return i})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return s})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return c})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return l})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return p})),n.d(t,"CLEAR_REQUEST_BODY_VALUE",(function(){return f})),n.d(t,"setSelectedServer",(function(){return h})),n.d(t,"setRequestBodyValue",(function(){return d})),n.d(t,"setRequestBodyInclusion",(function(){return m})),n.d(t,"setActiveExamplesMember",(function(){return v})),n.d(t,"setRequestContentType",(function(){return g})),n.d(t,"setResponseContentType",(function(){return y})),n.d(t,"setServerVariableValue",(function(){return b})),n.d(t,"setRequestBodyValidateError",(function(){return _})),n.d(t,"clearRequestBodyValidateError",(function(){return w})),n.d(t,"initRequestBodyValidateError",(function(){return x})),n.d(t,"clearRequestBodyValue",(function(){return E}));var r="oas3_set_servers",o="oas3_set_request_body_value",a="oas3_set_request_body_inclusion",i="oas3_set_active_examples_member",s="oas3_set_request_content_type",u="oas3_set_response_content_type",c="oas3_set_server_variable_value",l="oas3_set_request_body_validate_error",p="oas3_clear_request_body_validate_error",f="oas3_clear_request_body_value";function h(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function d(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}function m(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:a,payload:{value:t,pathMethod:n,name:r}}}function v(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:i,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function g(e){var t=e.value,n=e.pathMethod;return{type:s,payload:{value:t,pathMethod:n}}}function y(e){var t=e.value,n=e.path,r=e.method;return{type:u,payload:{value:t,path:n,method:r}}}function b(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:c,payload:{server:t,namespace:n,key:r,val:o}}}var _=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:l,payload:{path:t,method:n,validationErrors:r}}},w=function(e){var t=e.path,n=e.method;return{type:p,payload:{path:t,method:n}}},x=function(e){var t=e.pathMethod;return{type:p,payload:{path:t[0],method:t[1]}}},E=function(e){var t=e.pathMethod;return{type:f,payload:{pathMethod:t}}}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"e",(function(){return _})),n.d(t,"c",(function(){return x})),n.d(t,"a",(function(){return E})),n.d(t,"d",(function(){return S}));var r=n(51),o=n.n(r),a=n(18),i=n.n(a),s=n(35),u=n.n(s),c=n(2),l=n.n(c),p=n(20),f=n.n(p),h=n(60),d=n.n(h),m=n(351),v=n.n(m),g=function(e){return String.prototype.toLowerCase.call(e)},y=function(e){return e.replace(/[^\w]/gi,"_")};function b(e){var t=e.openapi;return!!t&&v()(t,"3")}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==f()(e))return null;var a=(e.operationId||"").replace(/\s/g,"");return a.length?y(e.operationId):w(t,n,{v2OperationIdCompatibilityMode:o})}function w(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var a,i,s=l()(a="".concat(t.toLowerCase(),"_")).call(a,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||l()(i="".concat(e.substring(1),"_")).call(i,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return l()(n="".concat(g(t))).call(n,y(e))}function x(e,t){var n;return l()(n="".concat(g(t),"-")).call(n,e)}function E(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==f()(e)||!e.paths||"object"!==f()(e.paths))return null;var r=e.paths;for(var o in r)for(var a in r[o])if("PARAMETERS"!==a.toUpperCase()){var i=r[o][a];if(i&&"object"===f()(i)){var s={spec:e,pathName:o,method:a.toUpperCase(),operation:i},u=t(s);if(n&&u)return s}}return}(e,t,!0)||null}(e,(function(e){var n,r=e.pathName,o=e.method,a=e.operation;if(!a||"object"!==f()(a))return!1;var i=a.operationId,s=_(a,r,o),c=x(r,o);return u()(n=[s,c,i]).call(n,(function(e){return e&&e===t}))})):null}function S(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var a in n){var s=n[a];if(d()(s)){var c=s.parameters,p=function(e){var n=s[e];if(!d()(n))return"continue";var p=_(n,a,e);if(p){r[p]?r[p].push(n):r[p]=[n];var f=r[p];if(f.length>1)i()(f).call(f,(function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=l()(n="".concat(p)).call(n,t+1)}));else if(void 0!==n.operationId){var h=f[0];h.__originalOperationId=h.__originalOperationId||n.operationId,h.operationId=p}}if("parameters"!==e){var m=[],v={};for(var g in t)"produces"!==g&&"consumes"!==g&&"security"!==g||(v[g]=t[g],m.push(v));if(c&&(v.parameters=c,m.push(v)),m.length){var y,b=o()(m);try{for(b.s();!(y=b.n()).done;){var w=y.value;for(var x in w)if(n[x]){if("parameters"===x){var E,S=o()(w[x]);try{var C=function(){var e,t=E.value;u()(e=n[x]).call(e,(function(e){return e.name&&e.name===t.name||e.$ref&&e.$ref===t.$ref||e.$$ref&&e.$$ref===t.$$ref||e===t}))||n[x].push(t)};for(S.s();!(E=S.n()).done;)C()}catch(e){S.e(e)}finally{S.f()}}}else n[x]=w[x]}}catch(e){b.e(e)}finally{b.f()}}}};for(var f in s)p(f)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return a})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return i})),n.d(t,"NEW_SPEC_ERR",(function(){return s})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return u})),n.d(t,"NEW_AUTH_ERR",(function(){return c})),n.d(t,"CLEAR",(function(){return l})),n.d(t,"CLEAR_BY",(function(){return p})),n.d(t,"newThrownErr",(function(){return f})),n.d(t,"newThrownErrBatch",(function(){return h})),n.d(t,"newSpecErr",(function(){return d})),n.d(t,"newSpecErrBatch",(function(){return m})),n.d(t,"newAuthErr",(function(){return v})),n.d(t,"clear",(function(){return g})),n.d(t,"clearBy",(function(){return y}));var r=n(142),o=n.n(r),a="err_new_thrown_err",i="err_new_thrown_err_batch",s="err_new_spec_err",u="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",p="err_clear_by";function f(e){return{type:a,payload:o()(e)}}function h(e){return{type:i,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(e){return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}}},function(e,t,n){var r=n(49),o=n(36),a=n(52),i=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(a(s,e))return s[e];t||(t={});var n=[][e],c=!!a(t,"ACCESSORS")&&t.ACCESSORS,l=a(t,0)?t[0]:u,p=a(t,1)?t[1]:void 0;return s[e]=!!n&&!o((function(){if(c&&!r)return!0;var e={length:-1};c?i(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,l,p)}))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(77),o=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=i),a(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var a,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var p=!0,f=0;fo&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return a||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(55))},function(e,t,n){var r=n(876);function o(e,t,n,o,a,i,s){try{var u=e[i](s),c=u.value}catch(e){return void n(e)}u.done?t(c):r.resolve(c).then(o,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,a){var i=e.apply(t,n);function s(e){o(i,r,a,s,u,"next",e)}function u(e){o(i,r,a,s,u,"throw",e)}s(void 0)}))}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(149),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r,o,a,i=n(362),s=n(42),u=n(45),c=n(70),l=n(52),p=n(231),f=n(178),h=n(150),d=s.WeakMap;if(i){var m=p.state||(p.state=new d),v=m.get,g=m.has,y=m.set;r=function(e,t){return t.facade=e,y.call(m,e,t),t},o=function(e){return v.call(m,e)||{}},a=function(e){return g.call(m,e)}}else{var b=f("state");h[b]=!0,r=function(e,t){return t.facade=e,c(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},a=function(e){return l(e,b)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(31),o=n(40),a=n(471),i=n(123),s=n(472),u=n(139),c=n(202),l=n(26),p=[],f=0,h=a.getPooled(),d=!1,m=null;function v(){x.ReactReconcileTransaction&&m||r("123")}var g=[{initialize:function(){this.dirtyComponentsLength=p.length},close:function(){this.dirtyComponentsLength!==p.length?(p.splice(0,this.dirtyComponentsLength),w()):p.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function y(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=a.getPooled(),this.reconcileTransaction=x.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==p.length&&r("124",t,p.length),p.sort(b),f++;for(var n=0;nS;S++)if((h||S in w)&&(b=x(y=w[S],S,_),e))if(t)A[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(A,y)}else switch(e){case 4:return!1;case 7:u.call(A,y)}return p?-1:c||l?l:A}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]}));function Se(e,t,n){var r;t=t||[];var o=we.apply(void 0,A()(r=[e]).call(r,O()(t))).get("parameters",Object(I.List)());return f()(o).call(o,(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(T.B)(t,{allowHashes:!1}),r)}),Object(I.fromJS)({}))}function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return u()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("in")===t}))}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return u()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("type")===t}))}function ke(e,t){var n,r;t=t||[];var o=z(e).getIn(A()(n=["paths"]).call(n,O()(t)),Object(I.fromJS)({})),a=e.getIn(A()(r=["meta","paths"]).call(r,O()(t)),Object(I.fromJS)({})),i=Oe(e,t),s=o.get("parameters")||new I.List,u=a.get("consumes_value")?a.get("consumes_value"):Ae(s,"file")?"multipart/form-data":Ae(s,"formData")?"application/x-www-form-urlencoded":void 0;return Object(I.fromJS)({requestContentType:u,responseContentType:i})}function Oe(e,t){var n,r;t=t||[];var o=z(e).getIn(A()(n=["paths"]).call(n,O()(t)),null);if(null!==o){var a=e.getIn(A()(r=["meta","paths"]).call(r,O()(t),["produces_value"]),null),i=o.getIn(["produces",0],null);return a||i||"application/json"}}function je(e,t){var n;t=t||[];var r=z(e),o=r.getIn(A()(n=["paths"]).call(n,O()(t)),null);if(null!==o){var a=t,s=i()(a,1)[0],u=o.get("produces",null),c=r.getIn(["paths",s,"produces"],null),l=r.getIn(["produces"],null);return u||c||l}}function Te(e,t){var n;t=t||[];var r=z(e),o=r.getIn(A()(n=["paths"]).call(n,O()(t)),null);if(null!==o){var a=t,s=i()(a,1)[0],u=o.get("consumes",null),c=r.getIn(["paths",s,"consumes"],null),l=r.getIn(["consumes"],null);return u||c||l}}var Ie=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),a=o()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||a||""},Pe=function(e,t,n){var r;return _()(r=["http","https"]).call(r,Ie(e,t,n))>-1},Ne=function(e,t){var n;t=t||[];var r=e.getIn(A()(n=["meta","paths"]).call(n,O()(t),["parameters"]),Object(I.fromJS)([])),o=!0;return x()(r).call(r,(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)})),o},Me=function(e,t){var n,r,o={requestBody:!1,requestContentType:{}},a=e.getIn(A()(n=["resolvedSubtrees","paths"]).call(n,O()(t),["requestBody"]),Object(I.fromJS)([]));return a.size<1||(a.getIn(["required"])&&(o.requestBody=a.getIn(["required"])),x()(r=a.getIn(["content"]).entrySeq()).call(r,(function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var n=e[1].getIn(["schema","required"]).toJS();o.requestContentType[t]=n}}))),o},Re=function(e,t,n,r){var o,a=e.getIn(A()(o=["resolvedSubtrees","paths"]).call(o,O()(t),["requestBody","content"]),Object(I.fromJS)([]));if(a.size<2||!n||!r)return!1;var i=a.getIn([n,"schema","properties"],Object(I.fromJS)([])),s=a.getIn([r,"schema","properties"],Object(I.fromJS)([]));return!!i.equals(s)};function De(e){return I.Map.isMap(e)?e:new I.Map}},function(e,t,n){"use strict";(function(t){var r=n(904),o=n(905),a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||r);if("blob:"===e.protocol)o=new h(unescape(e.pathname),{});else if("string"===i)for(n in o=new h(e,{}),l)delete o[n];else if("object"===i){for(n in e)n in l||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function f(e){e=u(e);var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function h(e,t,n){if(e=u(e),!(this instanceof h))return new h(e,t,n);var a,i,s,l,d,m,v=c.slice(),g=typeof t,y=this,b=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),t=p(t),a=!(i=f(e||"")).protocol&&!i.slashes,y.slashes=i.slashes||a&&t.slashes,y.protocol=i.protocol||t.protocol||"",e=i.rest,i.slashes||(v[3]=[/(.*)/,"pathname"]);b=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(235),o=n(71).f,a=n(70),i=n(52),s=n(557),u=n(39)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,u)||o(l,u,{configurable:!0,value:t}),c&&!r&&a(l,"toString",s)}}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){e.exports=n(634)},function(e,t,n){e.exports=n(837)},function(e,t,n){"use strict";var r=n(883);e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return a})),n.d(t,"UPDATE_MODE",(function(){return i})),n.d(t,"SHOW",(function(){return s})),n.d(t,"updateLayout",(function(){return u})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return p}));var r=n(7),o="layout_update_layout",a="layout_update_filter",i="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:a,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.w)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.w)(e),{type:i,payload:{thing:e,mode:t}}}},function(e,t,n){"use strict";var r=n(1064),o=n(1065);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),p=["%","/","?",";","#"].concat(l),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(1066);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?N+="x":N+=P[M];if(!N.match(h)){var D=T.slice(0,k),L=T.slice(k+1),B=P.match(d);B&&(D.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[x])for(k=0,I=l.length;k0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,k=0,O=E.length;O>=0;O--)"."===(C=E[O])?E.splice(O,1):".."===C?(E.splice(O,1),k++):k&&(E.splice(O,1),k--);if(!w&&!x)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(w=w||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r=n(419),o=n(159),a=n(191),i=n(54),s=n(117),u=n(192),c=n(158),l=n(249),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t,n){var r=n(49),o=n(174),a=n(108),i=n(69),s=n(176),u=n(52),c=n(355),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=i(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(79);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r,o=n(53),a=n(234),i=n(228),s=n(150),u=n(367),c=n(225),l=n(178),p=l("IE_PROTO"),f=function(){},h=function(e){return" + + + + diff --git a/tdlight-api-openapi.yaml b/tdlight-api-openapi.yaml new file mode 100644 index 0000000..4fb3daa --- /dev/null +++ b/tdlight-api-openapi.yaml @@ -0,0 +1,12107 @@ +openapi: 3.0.0 +info: + title: tdlight Bot API + description: OpenAPI schema for the tdlight bot api + version: 5.0.0 +servers: + - url: 'https://botapi.giuseppem99.xyz/{type}{token}' + variables: + type: + default: bot + enum: + - bot + - user + token: + default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' + description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. + - url: 'https://telegram.rest/{type}{token}' + variables: + type: + default: bot + enum: + - bot + - user + token: + default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' + description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. + - url: '{base_url}/{type}{token}' + variables: + base_url: + default: 'https://botapi.giuseppem99.xyz' + description: Base url of the tdlight bot api server + type: + default: bot + enum: + - bot + - user + token: + default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' + description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. +tags: + - name: added + description: Added Methods in the tdlight-bot-api + - name: user-only + description: These methods can only be called as user + - name: modified + description: These methods are modified in the tdlight-bot-api +paths: + /userlogin: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Use this method to receive the authorization token to log in as user. + + Note: You don't have your token yet, so the domain is just {base_url}/userlogin + + Returns an `AuthorizationState` with the user token on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + phone_number: + description: Your phone number to log in. + type: string + required: + - phone_number + multipart/form-data: + schema: + type: object + properties: + phone_number: + description: Your phone number to log in. + type: string + required: + - phone_number + application/json: + schema: + type: object + properties: + phone_number: + description: Your phone number to log in. + type: string + required: + - phone_number + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/AuthorizationState' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + servers: + - url: '{base_url}' + description: Custom Endpoint to get the user token. + variables: + base_url: + default: 'https://botapi.giuseppem99.xyz' + description: Base url of the tdlight bot api server + /authCode: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Use this method in the authorization process to check your authentication code. Returns an `AuthorizationState` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + code: + description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' + type: integer + required: + - code + multipart/form-data: + schema: + type: object + properties: + code: + description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' + type: integer + required: + - code + application/json: + schema: + type: object + properties: + code: + description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' + type: integer + required: + - code + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/AuthorizationState' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /authPassword: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Use this method in the authorization process to check your 2-factor-authorization password for correctness. Returns an `AuthorizationState` on success. + + *Never* send your password over a plain http connection. Make sure https is enabled or use this API locally. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + password: + description: The password to check. + type: string + required: + - password + multipart/form-data: + schema: + type: object + properties: + password: + description: The password to check. + type: string + required: + - password + application/json: + schema: + type: object + properties: + password: + description: The password to check. + type: string + required: + - password + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/AuthorizationState' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /registerUser: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Use this method to register a new user account. Only works after sending the authcode if the user is not yet registered. Returns an `AuthorizationState` on success. + + User registration is disabled by default. You can enable it with the `--allow-users-registration` command line option or the env variable `TELEGRAM_ALLOW_USERS_REGISTRATION` set to `1` when using docker.s + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + first_name: + description: The first name of the user; 1-64 characters. + type: string + last_name: + description: The last name of the user; 0-64 characters. + type: string + required: + - first_name + multipart/form-data: + schema: + type: object + properties: + first_name: + description: The first name of the user; 1-64 characters. + type: string + last_name: + description: The last name of the user; 0-64 characters. + type: string + required: + - first_name + application/json: + schema: + type: object + properties: + first_name: + description: The first name of the user; 1-64 characters. + type: string + last_name: + description: The last name of the user; 0-64 characters. + type: string + required: + - first_name + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/AuthorizationState' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /optimizeMemory: + post: + tags: + - added + description: Calling `optimizeMemory` will remove old data from the in-memory cache and give the freed memory back to the os. Returns *True* on success. + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getMessageInfo: + post: + tags: + - added + description: Get information about a message. Returns a `Message` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + required: + - chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + required: + - chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + required: + - chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChatMembers: + post: + tags: + - added + description: |- + Use this method to get a list of members in a chat. On success, returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects that contains information about all chat members. Administrator privileges may be required for some filters. + + Telegram only returns up to 10,000 members per group using this method. If you want to get more members, you can try to fetch additional users with different `query` parameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + filter: + description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' + type: string + enum: + - members + - banned + - restricted + - bots + - admins + query: + description: Query to search for in names and usernames + type: string + offset: + description: Number of users to skip. + type: integer + limit: + description: The maximum number of users be returned; up to 200. + type: integer + minimum: 1 + maximum: 200 + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + filter: + description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' + type: string + enum: + - members + - banned + - restricted + - bots + - admins + query: + description: Query to search for in names and usernames + type: string + offset: + description: Number of users to skip. + type: integer + limit: + description: The maximum number of users be returned; up to 200. + type: integer + minimum: 1 + maximum: 200 + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + filter: + description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' + type: string + enum: + - members + - banned + - restricted + - bots + - admins + query: + description: Query to search for in names and usernames + type: string + offset: + description: Number of users to skip. + type: integer + limit: + description: The maximum number of users be returned; up to 200. + type: integer + minimum: 1 + maximum: 200 + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/ChatMember' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteMessages: + post: + tags: + - added + description: |- + Delete all the messages with message_id in range between start and end. + The start parameter MUST be less than the end parameter + Both start and end must be positive non zero numbers + The method will always return true as a result, even if the messages cannot be deleted + This method does not work on private chat or normal groups It is not suggested to delete more than 200 messages per call. + + *NOTE* + The maximum number of messages to be deleted in a single batch is determined by the max-batch-operations parameter and is 10000 by default. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + start: + description: First message id to delete + type: integer + end: + description: Last message id to delete + type: integer + required: + - chat_id + - start + - end + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + start: + description: First message id to delete + type: integer + end: + description: Last message id to delete + type: integer + required: + - chat_id + - start + - end + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + start: + description: First message id to delete + type: integer + end: + description: Last message id to delete + type: integer + required: + - chat_id + - start + - end + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /ping: + post: + tags: + - added + description: Send an MTProto ping message to the telegram servers. Useful to detect the delay of the bot api server. Returns the time in seconds as double-precision floating-point number. + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: number + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChats: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Returns an ordered list of chats. For optimal performance the number of returned chats is chosen by the library. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + multipart/form-data: + schema: + type: object + properties: + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + application/json: + schema: + type: object + properties: + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getCommonChats: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Returns list of chats you have in commen with the other user. Currently returns an Error because of a tdlight bug. For optimal performance the number of returned chats is chosen by the library. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + required: + - user_id + multipart/form-data: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + required: + - user_id + application/json: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset_chat_id: + description: Chat identifier to return chats from. + type: integer + required: + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getInactiveChats: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getNearbyChats: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Returns a list of chats nearby the specified location. Telegram may send old results if you change your location too quick. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + required: + - latitude + - longitude + multipart/form-data: + schema: + type: object + properties: + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + required: + - latitude + - longitude + application/json: + schema: + type: object + properties: + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + required: + - latitude + - longitude + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /searchPublicChats: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + required: + - query + multipart/form-data: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + required: + - query + application/json: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + required: + - query + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setPollAnswer: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Changes the user answer to a poll. A poll in quiz mode can be answered only once. Send an empty array of `option_ids` to retract your vote. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message containing the poll. + type: integer + option_ids: + description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - message_id + - option_ids + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message containing the poll. + type: integer + option_ids: + description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - message_id + - option_ids + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message containing the poll. + type: integer + option_ids: + description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - message_id + - option_ids + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /joinChat: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Adds current user as a new member to a chat. Private and secret chats can't be joined using this method. Join either by chat_id or by invite_link + + Returns `True` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + invite_link: + description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + type: string + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + invite_link: + description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + type: string + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + invite_link: + description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + type: string + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /addChatMember: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Adds a new member to a chat. Members can't be added to private or secret chats. Returns `true` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /reportChat: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + reason: + description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' + type: string + message_ids: + description: Identifiers of reported messages. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - reason + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + reason: + description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' + type: string + message_ids: + description: Identifiers of reported messages. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - reason + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + reason: + description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' + type: string + message_ids: + description: Identifiers of reported messages. + type: array + items: + anyOf: + - type: integer + required: + - chat_id + - reason + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /createChat: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Creates a new group, supergroup or channel. Returns the newly created chat. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + title: + description: Title of the new chat; 1-128 characters. + type: string + type: + description: Type of the new chat, must be any of `group`, `supergroup` or `channel` + type: string + enum: + - group + - supergroup + - channel + user_ids: + description: May only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. + type: array + items: + anyOf: + - type: integer + description: + description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. + type: string + required: + - title + - type + multipart/form-data: + schema: + type: object + properties: + title: + description: Title of the new chat; 1-128 characters. + type: string + type: + description: Type of the new chat, must be any of `group`, `supergroup` or `channel` + type: string + enum: + - group + - supergroup + - channel + user_ids: + description: Must only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. + type: array + items: + anyOf: + - type: integer + description: + description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. + type: string + required: + - title + - type + application/json: + schema: + type: object + properties: + title: + description: Title of the new chat; 1-128 characters. + type: string + type: + description: Type of the new chat, must be any of `group`, `supergroup` or `channel` + type: string + enum: + - group + - supergroup + - channel + user_ids: + description: Must only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. + type: array + items: + anyOf: + - type: integer + description: + description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. + type: string + required: + - title + - type + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /searchMessages: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance the number of returned messages is chosen by the library. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + offset_date: + description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. + type: integer + offset_chat_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + offset_message_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - chat_photo + - document + - photo + - photo_and_video + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - query + multipart/form-data: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + offset_date: + description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. + type: integer + offset_chat_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + offset_message_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - chat_photo + - document + - photo + - photo_and_video + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - query + application/json: + schema: + type: object + properties: + query: + description: Query to search for. + type: string + offset_date: + description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. + type: integer + offset_chat_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + offset_message_id: + description: The chat identifier of the last found message, or 0 for the first request. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - chat_photo + - document + - photo + - photo_and_video + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - query + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /searchChatMessages: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. For optimal performance the number of returned messages is chosen by the library. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + query: + description: Query to search for. + type: string + from_user_id: + description: If set, only messages sent by the specified sender will be returned + type: integer + from_message_id: + description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - call + - chat_photo + - document + - failed_to_send + - mention + - missed_call + - photo + - photo_and_video + - pinnedunread_mention + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - chat_id + - query + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + query: + description: Query to search for. + type: string + from_user_id: + description: If set, only messages sent by the specified sender will be returned + type: integer + from_message_id: + description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - call + - chat_photo + - document + - failed_to_send + - mention + - missed_call + - photo + - photo_and_video + - pinnedunread_mention + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - chat_id + - query + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + query: + description: Query to search for. + type: string + from_user_id: + description: If set, only messages sent by the specified sender will be returned + type: integer + from_message_id: + description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + type: integer + filter: + description: |- + Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` + type: string + enum: + - animation + - audio + - call + - chat_photo + - document + - failed_to_send + - mention + - missed_call + - photo + - photo_and_video + - pinnedunread_mention + - url + - video + - video_note + - voice_and_video_note + - voice_note + required: + - chat_id + - query + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getCallbackQueryAnswer: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + callback_data: + description: Data that was attached to the callback button. + type: string + required: + - chat_id + - message_id + - callback_data + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + callback_data: + description: Data that was attached to the callback button. + type: string + required: + - chat_id + - message_id + - callback_data + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + callback_data: + description: Data that was attached to the callback button. + type: string + required: + - chat_id + - message_id + - callback_data + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/CallbackQueryAnswer' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteChatHistory: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Deletes all messages in the chat. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + for_everyone: + description: Pass true to try to delete chat history for all users. + type: boolean + remove_from_chat_list: + description: Pass true if the chat should be removed from the chat list. + type: boolean + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + for_everyone: + description: Pass true to try to delete chat history for all users. + type: boolean + remove_from_chat_list: + description: Pass true if the chat should be removed from the chat list. + type: boolean + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + for_everyone: + description: Pass true to try to delete chat history for all users. + type: boolean + remove_from_chat_list: + description: Pass true if the chat should be removed from the chat list. + type: boolean + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getScheduledMessages: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order. Returns an array of `Message` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageScheduling: + post: + tags: + - added + - user-only + description: |- + *ONLY FOR USERS* + + Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed. Returns `true` on success. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id*. Message IDs for scheduled messages are negative. + type: integer + send_at: + description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + send_at: + description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + send_at: + description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + /getUpdates: + post: + description: 'Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia.org/wiki/Push_technology#Long_polling)). An Array of [Update](https://core.telegram.org/bots/api/#update) objects is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getupdates' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + offset: + description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' + type: integer + limit: + description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + timeout: + description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' + default: 0 + type: integer + allowed_updates: + description: |- + A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + + Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. + type: array + items: + type: string + multipart/form-data: + schema: + type: object + properties: + offset: + description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' + type: integer + limit: + description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + timeout: + description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' + default: 0 + type: integer + allowed_updates: + description: |- + A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + + Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. + type: array + items: + type: string + application/json: + schema: + type: object + properties: + offset: + description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' + type: integer + limit: + description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + timeout: + description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' + default: 0 + type: integer + allowed_updates: + description: |- + A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + + Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. + type: array + items: + type: string + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Update' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setWebhook: + post: + description: |- + Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized [Update](https://core.telegram.org/bots/api/#update). In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns *True* on success. + + If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. `https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setwebhook' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + url: + description: HTTPS url to send updates to. Use an empty string to remove webhook integration + type: string + certificate: + $ref: '#/components/schemas/InputFile' + ip_address: + description: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS + type: string + max_connections: + description: 'Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot''s server, and higher values to increase your bot''s throughput.' + default: 40 + type: integer + allowed_updates: + description: |- + A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time. + type: array + items: + type: string + drop_pending_updates: + description: Pass *True* to drop all pending updates + type: boolean + required: + - url + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteWebhook: + post: + description: 'Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api/#getupdates). Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#deletewebhook' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + drop_pending_updates: + description: Pass *True* to drop all pending updates + type: boolean + multipart/form-data: + schema: + type: object + properties: + drop_pending_updates: + description: Pass *True* to drop all pending updates + type: boolean + application/json: + schema: + type: object + properties: + drop_pending_updates: + description: Pass *True* to drop all pending updates + type: boolean + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getWebhookInfo: + post: + description: 'Use this method to get current webhook status. Requires no parameters. On success, returns a [WebhookInfo](https://core.telegram.org/bots/api/#webhookinfo) object. If the bot is using [getUpdates](https://core.telegram.org/bots/api/#getupdates), will return an object with the *url* field empty.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getwebhookinfo' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/WebhookInfo' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getMe: + post: + description: 'A simple method for testing your bot''s auth token. Requires no parameters. Returns basic information about the bot in form of a [User](https://core.telegram.org/bots/api/#user) object.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getme' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/User' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /logOut: + post: + description: 'Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns *True* on success. Requires no parameters.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#logout' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /close: + post: + description: Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns *True* on success. Requires no parameters. + externalDocs: + url: 'https://core.telegram.org/bots/api/#close' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendMessage: + post: + tags: + - modified + description: 'Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendmessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + text: + description: 'Text of the message to be sent, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - text + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + text: + description: 'Text of the message to be sent, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - text + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + text: + description: 'Text of the message to be sent, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - text + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /forwardMessage: + post: + tags: + - modified + description: 'Use this method to forward messages of any kind. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#forwardmessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /copyMessage: + post: + tags: + - modified + description: 'Use this method to copy messages of any kind. The method is analogous to the method [forwardMessages](https://core.telegram.org/bots/api/#forwardmessages), but the copied message doesn''t have a link to the original message. Returns the [MessageId](https://core.telegram.org/bots/api/#messageid) of the sent message on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#copymessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + caption: + description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' + type: string + parse_mode: + description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + caption: + description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' + type: string + parse_mode: + description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + from_chat_id: + description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Message identifier in the chat specified in *from\_chat\_id* + type: integer + caption: + description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' + type: string + parse_mode: + description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - from_chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/MessageId' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendPhoto: + post: + tags: + - modified + description: 'Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendphoto' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + photo: + description: 'Photo to send. Pass a file\_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo''s width and height must not exceed 10000 in total. Width and height ratio must be at most 20. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Photo caption (may also be used when resending photos by *file\_id*), 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - photo + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendAudio: + post: + tags: + - modified + description: |- + Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. + + For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api/#sendvoice) method instead. + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendaudio' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + audio: + description: 'Audio file to send. Pass a file\_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Audio caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + duration: + description: Duration of the audio in seconds + type: integer + performer: + description: Performer + type: string + title: + description: Track name + type: string + thumb: + description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - audio + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendDocument: + post: + tags: + - modified + description: 'Use this method to send general files. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#senddocument' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + document: + description: 'File to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + thumb: + description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Document caption (may also be used when resending documents by *file\_id*), 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_content_type_detection: + description: Disables automatic server-side content type detection for files uploaded using multipart/form-data + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - document + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendVideo: + post: + tags: + - modified + description: 'Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendvideo' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + video: + description: 'Video to send. Pass a file\_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + duration: + description: Duration of sent video in seconds + type: integer + width: + description: Video width + type: integer + height: + description: Video height + type: integer + thumb: + description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Video caption (may also be used when resending videos by *file\_id*), 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + supports_streaming: + description: 'Pass *True*, if the uploaded video is suitable for streaming' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - video + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendAnimation: + post: + tags: + - modified + description: 'Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendanimation' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + animation: + description: 'Animation to send. Pass a file\_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + duration: + description: Duration of sent animation in seconds + type: integer + width: + description: Animation width + type: integer + height: + description: Animation height + type: integer + thumb: + description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Animation caption (may also be used when resending animation by *file\_id*), 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - animation + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendVoice: + post: + tags: + - modified + description: 'Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as [Audio](https://core.telegram.org/bots/api/#audio) or [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendvoice' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + voice: + description: 'Audio file to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: 'Voice message caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + duration: + description: Duration of the voice message in seconds + type: integer + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - voice + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendVideoNote: + post: + tags: + - modified + description: 'As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendvideonote' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + video_note: + description: 'Video note to send. Pass a file\_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files). Sending video notes by a URL is currently unsupported' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + duration: + description: Duration of sent video in seconds + type: integer + length: + description: 'Video width and height, i.e. diameter of the video message' + type: integer + thumb: + description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - video_note + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendMediaGroup: + post: + description: 'Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of [Messages](https://core.telegram.org/bots/api/#message) that were sent is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendmediagroup' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + media: + description: 'A JSON-serialized array describing messages to be sent, must include 2-10 items' + type: array + items: + anyOf: + - $ref: '#/components/schemas/InputMediaAudio' + - $ref: '#/components/schemas/InputMediaDocument' + - $ref: '#/components/schemas/InputMediaPhoto' + - $ref: '#/components/schemas/InputMediaVideo' + disable_notification: + description: 'Sends messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the messages are a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' + anyOf: + - type: integer + - type: string + required: + - chat_id + - media + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendLocation: + post: + tags: + - modified + description: 'Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendlocation' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' + type: integer + heading: + description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' + type: integer + heading: + description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the location + type: number + longitude: + description: Longitude of the location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' + type: integer + heading: + description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageLiveLocation: + post: + description: 'Use this method to edit live location messages. A location can be edited until its *live\_period* expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core.telegram.org/bots/api/#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#editmessagelivelocation' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + latitude: + description: Latitude of new location + type: number + longitude: + description: Longitude of new location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + heading: + description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - latitude + - longitude + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + latitude: + description: Latitude of new location + type: number + longitude: + description: Longitude of new location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + heading: + description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - latitude + - longitude + application/json: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + latitude: + description: Latitude of new location + type: number + longitude: + description: Longitude of new location + type: number + horizontal_accuracy: + description: 'The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + heading: + description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - latitude + - longitude + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /stopMessageLiveLocation: + post: + description: 'Use this method to stop updating a live location message before *live\_period* expires. On success, if the message was sent by the bot, the sent [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#stopmessagelivelocation' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + application/json: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendVenue: + post: + tags: + - modified + description: 'Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendvenue' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the venue + type: number + longitude: + description: Longitude of the venue + type: number + title: + description: Name of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: Foursquare identifier of the venue + type: string + foursquare_type: + description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: Google Places identifier of the venue + type: string + google_place_type: + description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + - title + - address + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the venue + type: number + longitude: + description: Longitude of the venue + type: number + title: + description: Name of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: Foursquare identifier of the venue + type: string + foursquare_type: + description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: Google Places identifier of the venue + type: string + google_place_type: + description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + - title + - address + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + latitude: + description: Latitude of the venue + type: number + longitude: + description: Longitude of the venue + type: number + title: + description: Name of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: Foursquare identifier of the venue + type: string + foursquare_type: + description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: Google Places identifier of the venue + type: string + google_place_type: + description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - latitude + - longitude + - title + - address + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendContact: + post: + tags: + - modified + description: 'Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendcontact' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: Contact's last name + type: string + vcard: + description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - phone_number + - first_name + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: Contact's last name + type: string + vcard: + description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - phone_number + - first_name + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: Contact's last name + type: string + vcard: + description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - phone_number + - first_name + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendPoll: + post: + tags: + - modified + description: 'Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendpoll' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + question: + description: 'Poll question, 1-300 characters' + type: string + options: + description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' + type: array + items: + type: string + is_anonymous: + description: 'True, if the poll needs to be anonymous, defaults to *True*' + type: boolean + type: + description: 'Poll type, “quiz” or “regular”, defaults to “regular”' + type: string + allows_multiple_answers: + description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' + type: boolean + correct_option_id: + description: '0-based identifier of the correct answer option, required for polls in quiz mode' + type: integer + explanation: + description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' + type: string + explanation_parse_mode: + description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + explanation_entities: + description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + open_period: + description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' + type: integer + close_date: + description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. + type: integer + is_closed: + description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - question + - options + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + question: + description: 'Poll question, 1-300 characters' + type: string + options: + description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' + type: array + items: + type: string + is_anonymous: + description: 'True, if the poll needs to be anonymous, defaults to *True*' + type: boolean + type: + description: 'Poll type, “quiz” or “regular”, defaults to “regular”' + type: string + allows_multiple_answers: + description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' + type: boolean + correct_option_id: + description: '0-based identifier of the correct answer option, required for polls in quiz mode' + type: integer + explanation: + description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' + type: string + explanation_parse_mode: + description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + explanation_entities: + description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + open_period: + description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' + type: integer + close_date: + description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. + type: integer + is_closed: + description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - question + - options + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + question: + description: 'Poll question, 1-300 characters' + type: string + options: + description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' + type: array + items: + type: string + is_anonymous: + description: 'True, if the poll needs to be anonymous, defaults to *True*' + type: boolean + type: + description: 'Poll type, “quiz” or “regular”, defaults to “regular”' + type: string + allows_multiple_answers: + description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' + type: boolean + correct_option_id: + description: '0-based identifier of the correct answer option, required for polls in quiz mode' + type: integer + explanation: + description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' + type: string + explanation_parse_mode: + description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + explanation_entities: + description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + open_period: + description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' + type: integer + close_date: + description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. + type: integer + is_closed: + description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - question + - options + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendDice: + post: + tags: + - modified + description: 'Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#senddice' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + emoji: + description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" + default: "\U0001F3B2" + type: string + enum: + - "\U0001F3B2" + - "\U0001F3AF" + - "\U0001F3C0" + - ⚽ + - "\U0001F3B0" + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + emoji: + description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" + default: "\U0001F3B2" + type: string + enum: + - "\U0001F3B2" + - "\U0001F3AF" + - "\U0001F3C0" + - ⚽ + - "\U0001F3B0" + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + emoji: + description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" + default: "\U0001F3B2" + type: string + enum: + - "\U0001F3B2" + - "\U0001F3AF" + - "\U0001F3C0" + - ⚽ + - "\U0001F3B0" + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendChatAction: + post: + description: |- + Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns *True* on success. + + Example: The [ImageBot](https://t.me/imagebot) needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use [sendChatAction](https://core.telegram.org/bots/api/#sendchataction) with *action* = *upload\_photo*. The user will see a “sending photo” status for the bot. + + We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendchataction' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + action: + description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' + type: string + required: + - chat_id + - action + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + action: + description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' + type: string + required: + - chat_id + - action + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + action: + description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' + type: string + required: + - chat_id + - action + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getUserProfilePhotos: + post: + description: 'Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api/#userprofilephotos) object.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getuserprofilephotos' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset: + description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' + type: integer + limit: + description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + required: + - user_id + multipart/form-data: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset: + description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' + type: integer + limit: + description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + required: + - user_id + application/json: + schema: + type: object + properties: + user_id: + description: Unique identifier of the target user + type: integer + offset: + description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' + type: integer + limit: + description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + default: 100 + type: integer + minimum: 1 + maximum: 100 + required: + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/UserProfilePhotos' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getFile: + post: + description: 'Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a [File](https://core.telegram.org/bots/api/#file) object is returned. The file can then be downloaded via the link `https://api.telegram.org/file/bot/`, where `` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api/#getfile) again.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getfile' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + file_id: + description: File identifier to get info about + type: string + required: + - file_id + multipart/form-data: + schema: + type: object + properties: + file_id: + description: File identifier to get info about + type: string + required: + - file_id + application/json: + schema: + type: object + properties: + file_id: + description: File identifier to get info about + type: string + required: + - file_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/File' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /kickChatMember: + post: + description: 'Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless [unbanned](https://core.telegram.org/bots/api/#unbanchatmember) first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#kickchatmember' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + until_date: + description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' + type: integer + required: + - chat_id + - user_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + until_date: + description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' + type: integer + required: + - chat_id + - user_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + until_date: + description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' + type: integer + required: + - chat_id + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /unbanChatMember: + post: + description: 'Use this method to unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don''t want this, use the parameter *only\_if\_banned*. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#unbanchatmember' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + only_if_banned: + description: Do nothing if the user is not banned + type: boolean + required: + - chat_id + - user_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + only_if_banned: + description: Do nothing if the user is not banned + type: boolean + required: + - chat_id + - user_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + only_if_banned: + description: Do nothing if the user is not banned + type: boolean + required: + - chat_id + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /restrictChatMember: + post: + description: Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass *True* for all permissions to lift restrictions from a user. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#restrictchatmember' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + permissions: + $ref: '#/components/schemas/ChatPermissions' + until_date: + description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' + type: integer + required: + - chat_id + - user_id + - permissions + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + permissions: + $ref: '#/components/schemas/ChatPermissions' + until_date: + description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' + type: integer + required: + - chat_id + - user_id + - permissions + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + permissions: + $ref: '#/components/schemas/ChatPermissions' + until_date: + description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' + type: integer + required: + - chat_id + - user_id + - permissions + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /promoteChatMember: + post: + description: Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass *False* for all boolean parameters to demote a user. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#promotechatmember' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + is_anonymous: + description: 'Pass *True*, if the administrator''s presence in the chat is hidden' + type: boolean + can_change_info: + description: 'Pass True, if the administrator can change chat title, photo and other settings' + type: boolean + can_post_messages: + description: 'Pass True, if the administrator can create channel posts, channels only' + type: boolean + can_edit_messages: + description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' + type: boolean + can_delete_messages: + description: 'Pass True, if the administrator can delete messages of other users' + type: boolean + can_invite_users: + description: 'Pass True, if the administrator can invite new users to the chat' + type: boolean + can_restrict_members: + description: 'Pass True, if the administrator can restrict, ban or unban chat members' + type: boolean + can_pin_messages: + description: 'Pass True, if the administrator can pin messages, supergroups only' + type: boolean + can_promote_members: + description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' + type: boolean + required: + - chat_id + - user_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + is_anonymous: + description: 'Pass *True*, if the administrator''s presence in the chat is hidden' + type: boolean + can_change_info: + description: 'Pass True, if the administrator can change chat title, photo and other settings' + type: boolean + can_post_messages: + description: 'Pass True, if the administrator can create channel posts, channels only' + type: boolean + can_edit_messages: + description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' + type: boolean + can_delete_messages: + description: 'Pass True, if the administrator can delete messages of other users' + type: boolean + can_invite_users: + description: 'Pass True, if the administrator can invite new users to the chat' + type: boolean + can_restrict_members: + description: 'Pass True, if the administrator can restrict, ban or unban chat members' + type: boolean + can_pin_messages: + description: 'Pass True, if the administrator can pin messages, supergroups only' + type: boolean + can_promote_members: + description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' + type: boolean + required: + - chat_id + - user_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + is_anonymous: + description: 'Pass *True*, if the administrator''s presence in the chat is hidden' + type: boolean + can_change_info: + description: 'Pass True, if the administrator can change chat title, photo and other settings' + type: boolean + can_post_messages: + description: 'Pass True, if the administrator can create channel posts, channels only' + type: boolean + can_edit_messages: + description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' + type: boolean + can_delete_messages: + description: 'Pass True, if the administrator can delete messages of other users' + type: boolean + can_invite_users: + description: 'Pass True, if the administrator can invite new users to the chat' + type: boolean + can_restrict_members: + description: 'Pass True, if the administrator can restrict, ban or unban chat members' + type: boolean + can_pin_messages: + description: 'Pass True, if the administrator can pin messages, supergroups only' + type: boolean + can_promote_members: + description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' + type: boolean + required: + - chat_id + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatAdministratorCustomTitle: + post: + description: Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchatadministratorcustomtitle' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + custom_title: + description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' + type: string + required: + - chat_id + - user_id + - custom_title + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + custom_title: + description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' + type: string + required: + - chat_id + - user_id + - custom_title + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + custom_title: + description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' + type: string + required: + - chat_id + - user_id + - custom_title + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatPermissions: + post: + description: Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can\_restrict\_members* admin rights. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchatpermissions' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + permissions: + $ref: '#/components/schemas/ChatPermissions' + required: + - chat_id + - permissions + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + permissions: + $ref: '#/components/schemas/ChatPermissions' + required: + - chat_id + - permissions + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + permissions: + $ref: '#/components/schemas/ChatPermissions' + required: + - chat_id + - permissions + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /exportChatInviteLink: + post: + description: Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#exportchatinvitelink' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: string + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatPhoto: + post: + description: Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchatphoto' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + photo: + $ref: '#/components/schemas/InputFile' + required: + - chat_id + - photo + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteChatPhoto: + post: + description: Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#deletechatphoto' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatTitle: + post: + description: Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchattitle' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + title: + description: 'New chat title, 1-255 characters' + type: string + required: + - chat_id + - title + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + title: + description: 'New chat title, 1-255 characters' + type: string + required: + - chat_id + - title + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + title: + description: 'New chat title, 1-255 characters' + type: string + required: + - chat_id + - title + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatDescription: + post: + description: 'Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchatdescription' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + description: + description: 'New chat description, 0-255 characters' + type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + description: + description: 'New chat description, 0-255 characters' + type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + description: + description: 'New chat description, 0-255 characters' + type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /pinChatMessage: + post: + description: 'Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#pinchatmessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of a message to pin + type: integer + disable_notification: + description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' + type: boolean + required: + - chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of a message to pin + type: integer + disable_notification: + description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' + type: boolean + required: + - chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of a message to pin + type: integer + disable_notification: + description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' + type: boolean + required: + - chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /unpinChatMessage: + post: + description: 'Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#unpinchatmessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' + type: integer + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' + type: integer + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' + type: integer + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /unpinAllChatMessages: + post: + description: 'Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#unpinallchatmessages' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /leaveChat: + post: + description: 'Use this method for your bot to leave a group, supergroup or channel. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#leavechat' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChat: + post: + description: 'Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [Chat](https://core.telegram.org/bots/api/#chat) object on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getchat' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Chat' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChatAdministrators: + post: + description: 'Use this method to get a list of administrators in a chat. On success, returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getchatadministrators' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/ChatMember' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChatMembersCount: + post: + description: Use this method to get the number of members in a chat. Returns *Int* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#getchatmemberscount' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: integer + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getChatMember: + post: + description: 'Use this method to get information about a member of a chat. Returns a [ChatMember](https://core.telegram.org/bots/api/#chatmember) object on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getchatmember' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + user_id: + description: Unique identifier of the target user + type: integer + required: + - chat_id + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/ChatMember' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setChatStickerSet: + post: + description: 'Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can\_set\_sticker\_set* optionally returned in [getChat](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#setchatstickerset' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + sticker_set_name: + description: Name of the sticker set to be set as the group sticker set + type: string + required: + - chat_id + - sticker_set_name + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + sticker_set_name: + description: Name of the sticker set to be set as the group sticker set + type: string + required: + - chat_id + - sticker_set_name + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + sticker_set_name: + description: Name of the sticker set to be set as the group sticker set + type: string + required: + - chat_id + - sticker_set_name + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteChatStickerSet: + post: + description: 'Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can\_set\_sticker\_set* optionally returned in [getChat](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#deletechatstickerset' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) + anyOf: + - type: integer + - type: string + required: + - chat_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /answerCallbackQuery: + post: + description: |- + Use this method to send answers to callback queries sent from [inline keyboards](/bots#inline-keyboards-and-on-the-fly-updating). The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, *True* is returned. + + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via [@Botfather](https://t.me/botfather) and accept the terms. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. + externalDocs: + url: 'https://core.telegram.org/bots/api/#answercallbackquery' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + callback_query_id: + description: Unique identifier for the query to be answered + type: string + text: + description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' + type: string + show_alert: + description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' + default: false + type: boolean + url: + description: |- + URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. + + Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. + type: string + cache_time: + description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. + default: 0 + type: integer + required: + - callback_query_id + multipart/form-data: + schema: + type: object + properties: + callback_query_id: + description: Unique identifier for the query to be answered + type: string + text: + description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' + type: string + show_alert: + description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' + default: false + type: boolean + url: + description: |- + URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. + + Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. + type: string + cache_time: + description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. + default: 0 + type: integer + required: + - callback_query_id + application/json: + schema: + type: object + properties: + callback_query_id: + description: Unique identifier for the query to be answered + type: string + text: + description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' + type: string + show_alert: + description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' + default: false + type: boolean + url: + description: |- + URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. + + Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. + type: string + cache_time: + description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. + default: 0 + type: integer + required: + - callback_query_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setMyCommands: + post: + description: Use this method to change the list of the bot's commands. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setmycommands' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + commands: + description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. + type: array + items: + $ref: '#/components/schemas/BotCommand' + required: + - commands + multipart/form-data: + schema: + type: object + properties: + commands: + description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. + type: array + items: + $ref: '#/components/schemas/BotCommand' + required: + - commands + application/json: + schema: + type: object + properties: + commands: + description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. + type: array + items: + $ref: '#/components/schemas/BotCommand' + required: + - commands + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getMyCommands: + post: + description: 'Use this method to get the current list of the bot''s commands. Requires no parameters. Returns Array of [BotCommand](https://core.telegram.org/bots/api/#botcommand) on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getmycommands' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/BotCommand' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageText: + post: + description: 'Use this method to edit text and [game](https://core.telegram.org/bots/api/#games) messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#editmessagetext' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + text: + description: 'New text of the message, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - text + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + text: + description: 'New text of the message, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - text + application/json: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + text: + description: 'New text of the message, 1-4096 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: Disables link previews for links in this message + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - text + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageCaption: + post: + description: 'Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#editmessagecaption' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + caption: + description: 'New caption of the message, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + caption: + description: 'New caption of the message, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + application/json: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + caption: + description: 'New caption of the message, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageMedia: + post: + description: 'Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can''t be uploaded. Use a previously uploaded file via its file\_id or specify a URL. On success, if the edited message was sent by the bot, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#editmessagemedia' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + media: + $ref: '#/components/schemas/InputMedia' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - media + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /editMessageReplyMarkup: + post: + description: 'Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#editmessagereplymarkup' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + application/json: + schema: + type: object + properties: + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /stopPoll: + post: + description: 'Use this method to stop a poll which was sent by the bot. On success, the stopped [Poll](https://core.telegram.org/bots/api/#poll) with the final results is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#stoppoll' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the original message with the poll + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the original message with the poll + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the original message with the poll + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Poll' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteMessage: + post: + description: |- + Use this method to delete a message, including service messages, with the following limitations: + \- A message can only be deleted if it was sent less than 48 hours ago. + \- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. + \- Bots can delete outgoing messages in private chats, groups, and supergroups. + \- Bots can delete incoming messages in private chats. + \- Bots granted *can\_post\_messages* permissions can delete outgoing messages in channels. + \- If the bot is an administrator of a group, it can delete any message there. + \- If the bot has *can\_delete\_messages* permission in a supergroup or a channel, it can delete any message there. + Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#deletemessage' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message to delete + type: integer + required: + - chat_id + - message_id + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message to delete + type: integer + required: + - chat_id + - message_id + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + message_id: + description: Identifier of the message to delete + type: integer + required: + - chat_id + - message_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendSticker: + post: + tags: + - modified + description: 'Use this method to send static .WEBP or [animated](https://telegram.org/blog/animated-stickers) .TGS stickers. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendsticker' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) + anyOf: + - type: integer + - type: string + sticker: + description: 'Sticker to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' + anyOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + send_at: + description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' + anyOf: + - type: integer + - type: string + required: + - chat_id + - sticker + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getStickerSet: + post: + description: 'Use this method to get a sticker set. On success, a [StickerSet](https://core.telegram.org/bots/api/#stickerset) object is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#getstickerset' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Name of the sticker set + type: string + required: + - name + multipart/form-data: + schema: + type: object + properties: + name: + description: Name of the sticker set + type: string + required: + - name + application/json: + schema: + type: object + properties: + name: + description: Name of the sticker set + type: string + required: + - name + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/StickerSet' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /uploadStickerFile: + post: + description: 'Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api/#file) on success.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#uploadstickerfile' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user_id: + description: User identifier of sticker file owner + type: integer + png_sticker: + $ref: '#/components/schemas/InputFile' + required: + - user_id + - png_sticker + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/File' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /createNewStickerSet: + post: + description: Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png\_sticker* or *tgs\_sticker*. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#createnewstickerset' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user_id: + description: User identifier of created sticker set owner + type: integer + name: + description: 'Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., *animals*). Can contain only english letters, digits and underscores. Must begin with a letter, can''t contain consecutive underscores and must end in *“\_by\_”*. ** is case insensitive. 1-64 characters.' + type: string + title: + description: 'Sticker set title, 1-64 characters' + type: string + png_sticker: + description: '**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + tgs_sticker: + $ref: '#/components/schemas/InputFile' + emojis: + description: One or more emoji corresponding to the sticker + type: string + contains_masks: + description: 'Pass *True*, if a set of mask stickers should be created' + type: boolean + mask_position: + $ref: '#/components/schemas/MaskPosition' + required: + - user_id + - name + - title + - emojis + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /addStickerToSet: + post: + description: Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png\_sticker* or *tgs\_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#addstickertoset' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user_id: + description: User identifier of sticker set owner + type: integer + name: + description: Sticker set name + type: string + png_sticker: + description: '**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + tgs_sticker: + $ref: '#/components/schemas/InputFile' + emojis: + description: One or more emoji corresponding to the sticker + type: string + mask_position: + $ref: '#/components/schemas/MaskPosition' + required: + - user_id + - name + - emojis + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setStickerPositionInSet: + post: + description: Use this method to move a sticker in a set created by the bot to a specific position. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setstickerpositioninset' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + position: + description: 'New sticker position in the set, zero-based' + type: integer + required: + - sticker + - position + multipart/form-data: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + position: + description: 'New sticker position in the set, zero-based' + type: integer + required: + - sticker + - position + application/json: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + position: + description: 'New sticker position in the set, zero-based' + type: integer + required: + - sticker + - position + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /deleteStickerFromSet: + post: + description: Use this method to delete a sticker from a set created by the bot. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#deletestickerfromset' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + required: + - sticker + multipart/form-data: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + required: + - sticker + application/json: + schema: + type: object + properties: + sticker: + description: File identifier of the sticker + type: string + required: + - sticker + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setStickerSetThumb: + post: + description: Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns *True* on success. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setstickersetthumb' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + name: + description: Sticker set name + type: string + user_id: + description: User identifier of the sticker set owner + type: integer + thumb: + description: 'A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see [](https://core.telegram.org/animated_stickers#technical-requirements)[https://core.telegram.org/animated\_stickers#technical-requirements](https://core.telegram.org/animated_stickers#technical-requirements) for animated sticker technical requirements. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files). Animated sticker set thumbnail can''t be uploaded via HTTP URL.' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + required: + - name + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /answerInlineQuery: + post: + description: |- + Use this method to send answers to an inline query. On success, *True* is returned. + No more than **50** results per query are allowed. + externalDocs: + url: 'https://core.telegram.org/bots/api/#answerinlinequery' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + inline_query_id: + description: Unique identifier for the answered query + type: string + results: + description: A JSON-serialized array of results for the inline query + type: array + items: + $ref: '#/components/schemas/InlineQueryResult' + cache_time: + description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + default: 300 + type: integer + is_personal: + description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' + type: boolean + next_offset: + description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. + type: string + switch_pm_text: + description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' + type: string + switch_pm_parameter: + description: |- + [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. + + *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. + type: string + required: + - inline_query_id + - results + multipart/form-data: + schema: + type: object + properties: + inline_query_id: + description: Unique identifier for the answered query + type: string + results: + description: A JSON-serialized array of results for the inline query + type: array + items: + $ref: '#/components/schemas/InlineQueryResult' + cache_time: + description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + default: 300 + type: integer + is_personal: + description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' + type: boolean + next_offset: + description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. + type: string + switch_pm_text: + description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' + type: string + switch_pm_parameter: + description: |- + [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. + + *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. + type: string + required: + - inline_query_id + - results + application/json: + schema: + type: object + properties: + inline_query_id: + description: Unique identifier for the answered query + type: string + results: + description: A JSON-serialized array of results for the inline query + type: array + items: + $ref: '#/components/schemas/InlineQueryResult' + cache_time: + description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + default: 300 + type: integer + is_personal: + description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' + type: boolean + next_offset: + description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. + type: string + switch_pm_text: + description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' + type: string + switch_pm_parameter: + description: |- + [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. + + *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. + type: string + required: + - inline_query_id + - results + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendInvoice: + post: + description: 'Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendinvoice' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target private chat + type: integer + title: + description: 'Product name, 1-32 characters' + type: string + description: + description: 'Product description, 1-255 characters' + type: string + payload: + description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' + type: string + provider_token: + description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' + type: string + start_parameter: + description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter + type: string + currency: + description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' + type: string + prices: + description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + provider_data: + description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' + type: string + photo_url: + description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + type: string + photo_size: + description: Photo size + type: integer + photo_width: + description: Photo width + type: integer + photo_height: + description: Photo height + type: integer + need_name: + description: 'Pass *True*, if you require the user''s full name to complete the order' + type: boolean + need_phone_number: + description: 'Pass *True*, if you require the user''s phone number to complete the order' + type: boolean + need_email: + description: 'Pass *True*, if you require the user''s email address to complete the order' + type: boolean + need_shipping_address: + description: 'Pass *True*, if you require the user''s shipping address to complete the order' + type: boolean + send_phone_number_to_provider: + description: 'Pass *True*, if user''s phone number should be sent to provider' + type: boolean + send_email_to_provider: + description: 'Pass *True*, if user''s email address should be sent to provider' + type: boolean + is_flexible: + description: 'Pass *True*, if the final price depends on the shipping method' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - title + - description + - payload + - provider_token + - start_parameter + - currency + - prices + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target private chat + type: integer + title: + description: 'Product name, 1-32 characters' + type: string + description: + description: 'Product description, 1-255 characters' + type: string + payload: + description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' + type: string + provider_token: + description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' + type: string + start_parameter: + description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter + type: string + currency: + description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' + type: string + prices: + description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + provider_data: + description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' + type: string + photo_url: + description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + type: string + photo_size: + description: Photo size + type: integer + photo_width: + description: Photo width + type: integer + photo_height: + description: Photo height + type: integer + need_name: + description: 'Pass *True*, if you require the user''s full name to complete the order' + type: boolean + need_phone_number: + description: 'Pass *True*, if you require the user''s phone number to complete the order' + type: boolean + need_email: + description: 'Pass *True*, if you require the user''s email address to complete the order' + type: boolean + need_shipping_address: + description: 'Pass *True*, if you require the user''s shipping address to complete the order' + type: boolean + send_phone_number_to_provider: + description: 'Pass *True*, if user''s phone number should be sent to provider' + type: boolean + send_email_to_provider: + description: 'Pass *True*, if user''s email address should be sent to provider' + type: boolean + is_flexible: + description: 'Pass *True*, if the final price depends on the shipping method' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - title + - description + - payload + - provider_token + - start_parameter + - currency + - prices + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target private chat + type: integer + title: + description: 'Product name, 1-32 characters' + type: string + description: + description: 'Product description, 1-255 characters' + type: string + payload: + description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' + type: string + provider_token: + description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' + type: string + start_parameter: + description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter + type: string + currency: + description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' + type: string + prices: + description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + provider_data: + description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' + type: string + photo_url: + description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + type: string + photo_size: + description: Photo size + type: integer + photo_width: + description: Photo width + type: integer + photo_height: + description: Photo height + type: integer + need_name: + description: 'Pass *True*, if you require the user''s full name to complete the order' + type: boolean + need_phone_number: + description: 'Pass *True*, if you require the user''s phone number to complete the order' + type: boolean + need_email: + description: 'Pass *True*, if you require the user''s email address to complete the order' + type: boolean + need_shipping_address: + description: 'Pass *True*, if you require the user''s shipping address to complete the order' + type: boolean + send_phone_number_to_provider: + description: 'Pass *True*, if user''s phone number should be sent to provider' + type: boolean + send_email_to_provider: + description: 'Pass *True*, if user''s email address should be sent to provider' + type: boolean + is_flexible: + description: 'Pass *True*, if the final price depends on the shipping method' + type: boolean + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - title + - description + - payload + - provider_token + - start_parameter + - currency + - prices + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /answerShippingQuery: + post: + description: 'If you sent an invoice requesting a shipping address and the parameter *is\_flexible* was specified, the Bot API will send an [Update](https://core.telegram.org/bots/api/#update) with a *shipping\_query* field to the bot. Use this method to reply to shipping queries. On success, True is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#answershippingquery' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + shipping_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' + type: boolean + shipping_options: + description: Required if *ok* is True. A JSON-serialized array of available shipping options. + type: array + items: + $ref: '#/components/schemas/ShippingOption' + error_message: + description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' + type: string + required: + - shipping_query_id + - ok + multipart/form-data: + schema: + type: object + properties: + shipping_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' + type: boolean + shipping_options: + description: Required if *ok* is True. A JSON-serialized array of available shipping options. + type: array + items: + $ref: '#/components/schemas/ShippingOption' + error_message: + description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' + type: string + required: + - shipping_query_id + - ok + application/json: + schema: + type: object + properties: + shipping_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' + type: boolean + shipping_options: + description: Required if *ok* is True. A JSON-serialized array of available shipping options. + type: array + items: + $ref: '#/components/schemas/ShippingOption' + error_message: + description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' + type: string + required: + - shipping_query_id + - ok + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /answerPreCheckoutQuery: + post: + description: 'Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an [Update](https://core.telegram.org/bots/api/#update) with the field *pre\_checkout\_query*. Use this method to respond to such pre-checkout queries. On success, True is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#answerprecheckoutquery' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + pre_checkout_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' + type: boolean + error_message: + description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' + type: string + required: + - pre_checkout_query_id + - ok + multipart/form-data: + schema: + type: object + properties: + pre_checkout_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' + type: boolean + error_message: + description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' + type: string + required: + - pre_checkout_query_id + - ok + application/json: + schema: + type: object + properties: + pre_checkout_query_id: + description: Unique identifier for the query to be answered + type: string + ok: + description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' + type: boolean + error_message: + description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' + type: string + required: + - pre_checkout_query_id + - ok + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setPassportDataErrors: + post: + description: |- + Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns *True* on success. + + Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. + externalDocs: + url: 'https://core.telegram.org/bots/api/#setpassportdataerrors' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + errors: + description: A JSON-serialized array describing the errors + type: array + items: + $ref: '#/components/schemas/PassportElementError' + required: + - user_id + - errors + multipart/form-data: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + errors: + description: A JSON-serialized array describing the errors + type: array + items: + $ref: '#/components/schemas/PassportElementError' + required: + - user_id + - errors + application/json: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + errors: + description: A JSON-serialized array describing the errors + type: array + items: + $ref: '#/components/schemas/PassportElementError' + required: + - user_id + - errors + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sendGame: + post: + description: 'Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#sendgame' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat + type: integer + game_short_name: + description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name + multipart/form-data: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat + type: integer + game_short_name: + description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name + application/json: + schema: + type: object + properties: + chat_id: + description: Unique identifier for the target chat + type: integer + game_short_name: + description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' + type: string + disable_notification: + description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' + type: boolean + reply_to_message_id: + description: 'If the message is a reply, ID of the original message' + type: integer + allow_sending_without_reply: + description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' + type: boolean + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + $ref: '#/components/schemas/Message' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setGameScore: + post: + description: 'Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited [Message](https://core.telegram.org/bots/api/#message), otherwise returns *True*. Returns an error, if the new score is not greater than the user''s current score in the chat and *force* is *False*.' + externalDocs: + url: 'https://core.telegram.org/bots/api/#setgamescore' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + score: + description: 'New score, must be non-negative' + type: integer + force: + description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' + type: boolean + disable_edit_message: + description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' + type: boolean + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + - score + multipart/form-data: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + score: + description: 'New score, must be non-negative' + type: integer + force: + description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' + type: boolean + disable_edit_message: + description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' + type: boolean + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + - score + application/json: + schema: + type: object + properties: + user_id: + description: User identifier + type: integer + score: + description: 'New score, must be non-negative' + type: integer + force: + description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' + type: boolean + disable_edit_message: + description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' + type: boolean + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + - score + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + anyOf: + - $ref: '#/components/schemas/Message' + - default: true + type: boolean + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /getGameHighScores: + post: + description: |- + Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an *Array* of [GameHighScore](https://core.telegram.org/bots/api/#gamehighscore) objects. + + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. + externalDocs: + url: 'https://core.telegram.org/bots/api/#getgamehighscores' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + user_id: + description: Target user id + type: integer + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + multipart/form-data: + schema: + type: object + properties: + user_id: + description: Target user id + type: integer + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + application/json: + schema: + type: object + properties: + user_id: + description: Target user id + type: integer + chat_id: + description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat + type: integer + message_id: + description: Required if *inline\_message\_id* is not specified. Identifier of the sent message + type: integer + inline_message_id: + description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message + type: string + required: + - user_id + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + ok: + default: true + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/GameHighScore' + required: + - ok + - result + default: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +components: + schemas: + Error: + type: object + properties: + ok: + default: false + type: boolean + error_code: + type: integer + description: + type: string + parameters: + $ref: '#/components/schemas/ResponseParameters' + required: + - ok + - error_code + - description + Update: + externalDocs: + url: 'https://core.telegram.org/bots/api/#update' + description: |- + This [object](https://core.telegram.org/bots/api/#available-types) represents an incoming update. + At most **one** of the optional parameters can be present in any given update. + type: object + properties: + update_id: + description: 'The update''s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you''re using [Webhooks](https://core.telegram.org/bots/api/#setwebhook), since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.' + type: integer + message: + $ref: '#/components/schemas/Message' + edited_message: + $ref: '#/components/schemas/Message' + channel_post: + $ref: '#/components/schemas/Message' + edited_channel_post: + $ref: '#/components/schemas/Message' + inline_query: + $ref: '#/components/schemas/InlineQuery' + chosen_inline_result: + $ref: '#/components/schemas/ChosenInlineResult' + callback_query: + $ref: '#/components/schemas/CallbackQuery' + shipping_query: + $ref: '#/components/schemas/ShippingQuery' + pre_checkout_query: + $ref: '#/components/schemas/PreCheckoutQuery' + poll: + $ref: '#/components/schemas/Poll' + poll_answer: + $ref: '#/components/schemas/PollAnswer' + required: + - update_id + WebhookInfo: + externalDocs: + url: 'https://core.telegram.org/bots/api/#webhookinfo' + description: Contains information about the current status of a webhook. + type: object + properties: + url: + description: 'Webhook URL, may be empty if webhook is not set up' + type: string + has_custom_certificate: + description: 'True, if a custom certificate was provided for webhook certificate checks' + type: boolean + pending_update_count: + description: Number of updates awaiting delivery + type: integer + ip_address: + description: '*Optional*. Currently used webhook IP address' + type: string + last_error_date: + description: '*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook' + type: integer + last_error_message: + description: '*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook' + type: string + max_connections: + description: '*Optional*. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery' + type: integer + allowed_updates: + description: '*Optional*. A list of update types the bot is subscribed to. Defaults to all update types' + type: array + items: + type: string + required: + - url + - has_custom_certificate + - pending_update_count + User: + externalDocs: + url: 'https://core.telegram.org/bots/api/#user' + description: This object represents a Telegram user or bot. + type: object + properties: + id: + description: Unique identifier for this user or bot + type: integer + is_bot: + description: 'True, if this user is a bot' + type: boolean + first_name: + description: User's or bot's first name + type: string + last_name: + description: '*Optional*. User''s or bot''s last name' + type: string + username: + description: '*Optional*. User''s or bot''s username' + type: string + language_code: + description: '*Optional*. [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the user''s language' + type: string + can_join_groups: + description: '*Optional*. True, if the bot can be invited to groups. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' + type: boolean + can_read_all_group_messages: + description: '*Optional*. True, if [privacy mode](https://core.telegram.org/bots#privacy-mode) is disabled for the bot. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' + type: boolean + supports_inline_queries: + description: '*Optional*. True, if the bot supports inline queries. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' + type: boolean + is_verified: + description: '*Optional*. Is the user verified by Telegram, clients show a verified batch.' + type: boolean + is_scam: + description: '*Optional*. Is the user reported for scam, clients show a warning to the user.' + type: boolean + required: + - id + - is_bot + - first_name + Chat: + externalDocs: + url: 'https://core.telegram.org/bots/api/#chat' + description: This object represents a chat. + type: object + properties: + id: + description: 'Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' + type: integer + type: + description: 'Type of chat, can be either “private”, “group”, “supergroup” or “channel”' + type: string + enum: + - private + - group + - supergroup + - channel + title: + description: '*Optional*. Title, for supergroups, channels and group chats' + type: string + username: + description: '*Optional*. Username, for private chats, supergroups and channels if available' + type: string + first_name: + description: '*Optional*. First name of the other party in a private chat' + type: string + last_name: + description: '*Optional*. Last name of the other party in a private chat' + type: string + photo: + $ref: '#/components/schemas/ChatPhoto' + bio: + description: '*Optional*. Bio of the other party in a private chat. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: string + description: + description: '*Optional*. Description, for groups, supergroups and channel chats. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: string + invite_link: + description: '*Optional*. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using [exportChatInviteLink](https://core.telegram.org/bots/api/#exportchatinvitelink). Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: string + pinned_message: + $ref: '#/components/schemas/Message' + permissions: + $ref: '#/components/schemas/ChatPermissions' + slow_mode_delay: + description: '*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: integer + sticker_set_name: + description: '*Optional*. For supergroups, name of group sticker set. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: string + can_set_sticker_set: + description: '*Optional*. True, if the bot can change the group sticker set. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: boolean + linked_chat_id: + description: '*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' + type: integer + location: + $ref: '#/components/schemas/ChatLocation' + is_verified: + description: '*Optional*. Is the chat verified by Telegram, clients show a verified batch.' + type: boolean + is_scam: + description: '*Optional*. Is the chat reported for scam, clients show a warning to the user.' + type: boolean + distance: + description: '*Optional*. Distance to the chat location in meters. Returned only in `getChatsNearby`.' + type: integer + required: + - id + - type + Message: + externalDocs: + url: 'https://core.telegram.org/bots/api/#message' + description: This object represents a message. + type: object + properties: + message_id: + description: Unique message identifier inside this chat + type: integer + from: + $ref: '#/components/schemas/User' + sender_chat: + $ref: '#/components/schemas/Chat' + date: + description: Date the message was sent in Unix time + type: integer + chat: + $ref: '#/components/schemas/Chat' + forward_from: + $ref: '#/components/schemas/User' + forward_from_chat: + $ref: '#/components/schemas/Chat' + forward_from_message_id: + description: '*Optional*. For messages forwarded from channels, identifier of the original message in the channel' + type: integer + forward_signature: + description: '*Optional*. For messages forwarded from channels, signature of the post author if present' + type: string + forward_sender_name: + description: '*Optional*. Sender''s name for messages forwarded from users who disallow adding a link to their account in forwarded messages' + type: string + forward_date: + description: '*Optional*. For forwarded messages, date the original message was sent in Unix time' + type: integer + reply_to_message: + $ref: '#/components/schemas/Message' + via_bot: + $ref: '#/components/schemas/User' + edit_date: + description: '*Optional*. Date the message was last edited in Unix time' + type: integer + media_group_id: + description: '*Optional*. The unique identifier of a media message group this message belongs to' + type: string + message_thread_id: + description: '*Optional*. The unique identifier of a thread this message belongs to' + type: string + author_signature: + description: '*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator' + type: string + text: + description: '*Optional*. For text messages, the actual UTF-8 text of the message, 0-4096 characters' + type: string + entities: + description: '*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + animation: + $ref: '#/components/schemas/Animation' + audio: + $ref: '#/components/schemas/Audio' + document: + $ref: '#/components/schemas/Document' + photo: + description: '*Optional*. Message is a photo, available sizes of the photo' + type: array + items: + $ref: '#/components/schemas/PhotoSize' + sticker: + $ref: '#/components/schemas/Sticker' + video: + $ref: '#/components/schemas/Video' + video_note: + $ref: '#/components/schemas/VideoNote' + voice: + $ref: '#/components/schemas/Voice' + caption: + description: '*Optional*. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters' + type: string + caption_entities: + description: '*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + contact: + $ref: '#/components/schemas/Contact' + dice: + $ref: '#/components/schemas/Dice' + game: + $ref: '#/components/schemas/Game' + poll: + $ref: '#/components/schemas/Poll' + venue: + $ref: '#/components/schemas/Venue' + location: + $ref: '#/components/schemas/Location' + new_chat_members: + description: '*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)' + type: array + items: + $ref: '#/components/schemas/User' + left_chat_member: + $ref: '#/components/schemas/User' + new_chat_title: + description: '*Optional*. A chat title was changed to this value' + type: string + new_chat_photo: + description: '*Optional*. A chat photo was change to this value' + type: array + items: + $ref: '#/components/schemas/PhotoSize' + delete_chat_photo: + description: '*Optional*. Service message: the chat photo was deleted' + type: boolean + group_chat_created: + description: '*Optional*. Service message: the group has been created' + type: boolean + supergroup_chat_created: + description: '*Optional*. Service message: the supergroup has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a supergroup when it is created. It can only be found in reply\_to\_message if someone replies to a very first message in a directly created supergroup.' + type: boolean + channel_chat_created: + description: '*Optional*. Service message: the channel has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a channel when it is created. It can only be found in reply\_to\_message if someone replies to a very first message in a channel.' + type: boolean + migrate_to_chat_id: + description: '*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' + type: integer + migrate_from_chat_id: + description: '*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' + type: integer + pinned_message: + $ref: '#/components/schemas/Message' + invoice: + $ref: '#/components/schemas/Invoice' + successful_payment: + $ref: '#/components/schemas/SuccessfulPayment' + connected_website: + description: '*Optional*. The domain name of the website on which the user has logged in. [More about Telegram Login »](/widgets/login)' + type: string + passport_data: + $ref: '#/components/schemas/PassportData' + proximity_alert_triggered: + $ref: '#/components/schemas/ProximityAlertTriggered' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + views: + description: '*Optional*. Amount of views. Only for channel messages.' + type: integer + forwards: + description: '*Optional*. How many times the message has been forwarded' + type: integer + is_scheduled: + description: '*Optional*. Is the message scheduled.' + type: boolean + scheduled_at: + description: '*Optional*. Time the message will be sent.' + required: + - message_id + - date + - chat + MessageId: + externalDocs: + url: 'https://core.telegram.org/bots/api/#messageid' + description: This object represents a unique message identifier. + type: object + properties: + message_id: + description: Unique message identifier + type: integer + required: + - message_id + MessageEntity: + externalDocs: + url: 'https://core.telegram.org/bots/api/#messageentity' + description: 'This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.' + type: object + properties: + type: + description: 'Type of the entity. Can be “mention” (`@username`), “hashtag” (`#hashtag`), “cashtag” (`$USD`), “bot\_command” (`/start@jobs_bot`), “url” (`https://telegram.org`), “email” (`do-not-reply@telegram.org`), “phone\_number” (`+1-212-555-0123`), “bold” (**bold text**), “italic” (*italic text*), “underline” (underlined text), “strikethrough” (strikethrough text), “code” (monowidth string), “pre” (monowidth block), “text\_link” (for clickable text URLs), “text\_mention” (for users [without usernames](https://telegram.org/blog/edit#new-mentions))' + type: string + enum: + - mention + - hashtag + - cashtag + - bot_command + - url + - email + - phone_number + - bold + - italic + - underline + - strikethrough + - code + - pre + - text_link + - text_mention + offset: + description: Offset in UTF-16 code units to the start of the entity + type: integer + length: + description: Length of the entity in UTF-16 code units + type: integer + url: + description: '*Optional*. For “text\_link” only, url that will be opened after user taps on the text' + type: string + user: + $ref: '#/components/schemas/User' + language: + description: '*Optional*. For “pre” only, the programming language of the entity text' + type: string + required: + - type + - offset + - length + PhotoSize: + externalDocs: + url: 'https://core.telegram.org/bots/api/#photosize' + description: 'This object represents one size of a photo or a [file](https://core.telegram.org/bots/api/#document) / [sticker](https://core.telegram.org/bots/api/#sticker) thumbnail.' + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + width: + description: Photo width + type: integer + height: + description: Photo height + type: integer + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - width + - height + Animation: + externalDocs: + url: 'https://core.telegram.org/bots/api/#animation' + description: This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + width: + description: Video width as defined by sender + type: integer + height: + description: Video height as defined by sender + type: integer + duration: + description: Duration of the video in seconds as defined by sender + type: integer + thumb: + $ref: '#/components/schemas/PhotoSize' + file_name: + description: '*Optional*. Original animation filename as defined by sender' + type: string + mime_type: + description: '*Optional*. MIME type of the file as defined by sender' + type: string + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - width + - height + - duration + Audio: + externalDocs: + url: 'https://core.telegram.org/bots/api/#audio' + description: This object represents an audio file to be treated as music by the Telegram clients. + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + duration: + description: Duration of the audio in seconds as defined by sender + type: integer + performer: + description: '*Optional*. Performer of the audio as defined by sender or by audio tags' + type: string + title: + description: '*Optional*. Title of the audio as defined by sender or by audio tags' + type: string + file_name: + description: '*Optional*. Original filename as defined by sender' + type: string + mime_type: + description: '*Optional*. MIME type of the file as defined by sender' + type: string + file_size: + description: '*Optional*. File size' + type: integer + thumb: + $ref: '#/components/schemas/PhotoSize' + required: + - file_id + - file_unique_id + - duration + Document: + externalDocs: + url: 'https://core.telegram.org/bots/api/#document' + description: 'This object represents a general file (as opposed to [photos](https://core.telegram.org/bots/api/#photosize), [voice messages](https://core.telegram.org/bots/api/#voice) and [audio files](https://core.telegram.org/bots/api/#audio)).' + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + thumb: + $ref: '#/components/schemas/PhotoSize' + file_name: + description: '*Optional*. Original filename as defined by sender' + type: string + mime_type: + description: '*Optional*. MIME type of the file as defined by sender' + type: string + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + Video: + externalDocs: + url: 'https://core.telegram.org/bots/api/#video' + description: This object represents a video file. + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + width: + description: Video width as defined by sender + type: integer + height: + description: Video height as defined by sender + type: integer + duration: + description: Duration of the video in seconds as defined by sender + type: integer + thumb: + $ref: '#/components/schemas/PhotoSize' + file_name: + description: '*Optional*. Original filename as defined by sender' + type: string + mime_type: + description: '*Optional*. Mime type of a file as defined by sender' + type: string + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - width + - height + - duration + VideoNote: + externalDocs: + url: 'https://core.telegram.org/bots/api/#videonote' + description: 'This object represents a [video message](https://telegram.org/blog/video-messages-and-telescope) (available in Telegram apps as of [v.4.0](https://telegram.org/blog/video-messages-and-telescope)).' + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + length: + description: Video width and height (diameter of the video message) as defined by sender + type: integer + duration: + description: Duration of the video in seconds as defined by sender + type: integer + thumb: + $ref: '#/components/schemas/PhotoSize' + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - length + - duration + Voice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#voice' + description: This object represents a voice note. + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + duration: + description: Duration of the audio in seconds as defined by sender + type: integer + mime_type: + description: '*Optional*. MIME type of the file as defined by sender' + type: string + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - duration + Contact: + externalDocs: + url: 'https://core.telegram.org/bots/api/#contact' + description: This object represents a phone contact. + type: object + properties: + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: '*Optional*. Contact''s last name' + type: string + user_id: + description: '*Optional*. Contact''s user identifier in Telegram' + type: integer + vcard: + description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard)' + type: string + required: + - phone_number + - first_name + Dice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#dice' + description: This object represents an animated emoji that displays a random value. + type: object + properties: + emoji: + description: Emoji on which the dice throw animation is based + type: string + value: + description: "Value of the dice, 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"” base emoji, 1-5 for “\"\U0001F3C0\"” and “\"⚽\"” base emoji, 1-64 for “\"\U0001F3B0\"” base emoji" + type: integer + required: + - emoji + - value + PollOption: + externalDocs: + url: 'https://core.telegram.org/bots/api/#polloption' + description: This object contains information about one answer option in a poll. + type: object + properties: + text: + description: 'Option text, 1-100 characters' + type: string + voter_count: + description: Number of users that voted for this option + type: integer + required: + - text + - voter_count + PollAnswer: + externalDocs: + url: 'https://core.telegram.org/bots/api/#pollanswer' + description: This object represents an answer of a user in a non-anonymous poll. + type: object + properties: + poll_id: + description: Unique poll identifier + type: string + user: + $ref: '#/components/schemas/User' + option_ids: + description: '0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.' + type: array + items: + type: integer + required: + - poll_id + - user + - option_ids + Poll: + externalDocs: + url: 'https://core.telegram.org/bots/api/#poll' + description: This object contains information about a poll. + type: object + properties: + id: + description: Unique poll identifier + type: string + question: + description: 'Poll question, 1-255 characters' + type: string + options: + description: List of poll options + type: array + items: + $ref: '#/components/schemas/PollOption' + total_voter_count: + description: Total number of users that voted in the poll + type: integer + is_closed: + description: 'True, if the poll is closed' + type: boolean + is_anonymous: + description: 'True, if the poll is anonymous' + type: boolean + type: + description: 'Poll type, currently can be “regular” or “quiz”' + type: string + allows_multiple_answers: + description: 'True, if the poll allows multiple answers' + type: boolean + correct_option_id: + description: '*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.' + type: integer + explanation: + description: '*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters' + type: string + explanation_entities: + description: '*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + open_period: + description: '*Optional*. Amount of time in seconds the poll will be active after creation' + type: integer + close_date: + description: '*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed' + type: integer + required: + - id + - question + - options + - total_voter_count + - is_closed + - is_anonymous + - type + - allows_multiple_answers + Location: + externalDocs: + url: 'https://core.telegram.org/bots/api/#location' + description: This object represents a point on the map. + type: object + properties: + longitude: + description: Longitude as defined by sender + type: number + latitude: + description: Latitude as defined by sender + type: number + horizontal_accuracy: + description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: '*Optional*. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.' + type: integer + heading: + description: '*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.' + type: integer + proximity_alert_radius: + description: '*Optional*. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.' + type: integer + required: + - longitude + - latitude + Venue: + externalDocs: + url: 'https://core.telegram.org/bots/api/#venue' + description: This object represents a venue. + type: object + properties: + location: + $ref: '#/components/schemas/Location' + title: + description: Name of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: '*Optional*. Foursquare identifier of the venue' + type: string + foursquare_type: + description: '*Optional*. Foursquare type of the venue. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: '*Optional*. Google Places identifier of the venue' + type: string + google_place_type: + description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + required: + - location + - title + - address + ProximityAlertTriggered: + externalDocs: + url: 'https://core.telegram.org/bots/api/#proximityalerttriggered' + description: 'This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.' + type: object + properties: + traveler: + $ref: '#/components/schemas/User' + watcher: + $ref: '#/components/schemas/User' + distance: + description: The distance between the users + type: integer + required: + - traveler + - watcher + - distance + UserProfilePhotos: + externalDocs: + url: 'https://core.telegram.org/bots/api/#userprofilephotos' + description: This object represent a user's profile pictures. + type: object + properties: + total_count: + description: Total number of profile pictures the target user has + type: integer + photos: + description: Requested profile pictures (in up to 4 sizes each) + type: array + items: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + required: + - total_count + - photos + File: + externalDocs: + url: 'https://core.telegram.org/bots/api/#file' + description: |- + This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api/#getfile). + + Maximum file size to download is 20 MB + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + file_size: + description: '*Optional*. File size, if known' + type: integer + file_path: + description: '*Optional*. File path. Use `https://api.telegram.org/file/bot/` to get the file.' + type: string + required: + - file_id + - file_unique_id + ReplyKeyboardMarkup: + externalDocs: + url: 'https://core.telegram.org/bots/api/#replykeyboardmarkup' + description: 'This object represents a [custom keyboard](https://core.telegram.org/bots#keyboards) with reply options (see [Introduction to bots](https://core.telegram.org/bots#keyboards) for details and examples).' + type: object + properties: + keyboard: + description: 'Array of button rows, each represented by an Array of [KeyboardButton](https://core.telegram.org/bots/api/#keyboardbutton) objects' + type: array + items: + type: array + items: + $ref: '#/components/schemas/KeyboardButton' + resize_keyboard: + description: '*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app''s standard keyboard.' + default: false + type: boolean + one_time_keyboard: + description: '*Optional*. Requests clients to hide the keyboard as soon as it''s been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.' + default: false + type: boolean + selective: + description: |- + *Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot's message is a reply (has *reply\_to\_message\_id*), sender of the original message. + + *Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. + type: boolean + required: + - keyboard + KeyboardButton: + externalDocs: + url: 'https://core.telegram.org/bots/api/#keyboardbutton' + description: 'This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *request\_contact*, *request\_location*, and *request\_poll* are mutually exclusive.' + type: object + properties: + text: + description: 'Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed' + type: string + request_contact: + description: '*Optional*. If *True*, the user''s phone number will be sent as a contact when the button is pressed. Available in private chats only' + type: boolean + request_location: + description: '*Optional*. If *True*, the user''s current location will be sent when the button is pressed. Available in private chats only' + type: boolean + request_poll: + $ref: '#/components/schemas/KeyboardButtonPollType' + required: + - text + KeyboardButtonPollType: + externalDocs: + url: 'https://core.telegram.org/bots/api/#keyboardbuttonpolltype' + description: 'This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.' + type: object + properties: + type: + description: '*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.' + type: string + ReplyKeyboardRemove: + externalDocs: + url: 'https://core.telegram.org/bots/api/#replykeyboardremove' + description: 'Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see [ReplyKeyboardMarkup](https://core.telegram.org/bots/api/#replykeyboardmarkup)).' + type: object + properties: + remove_keyboard: + description: 'Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one\_time\_keyboard* in [ReplyKeyboardMarkup](https://core.telegram.org/bots/api/#replykeyboardmarkup))' + type: boolean + selective: + description: |- + *Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot's message is a reply (has *reply\_to\_message\_id*), sender of the original message. + + *Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. + type: boolean + required: + - remove_keyboard + InlineKeyboardMarkup: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinekeyboardmarkup' + description: 'This object represents an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating) that appears right next to the message it belongs to.' + type: object + properties: + inline_keyboard: + description: 'Array of button rows, each represented by an Array of [InlineKeyboardButton](https://core.telegram.org/bots/api/#inlinekeyboardbutton) objects' + type: array + items: + type: array + items: + $ref: '#/components/schemas/InlineKeyboardButton' + required: + - inline_keyboard + InlineKeyboardButton: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinekeyboardbutton' + description: This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. + type: object + properties: + text: + description: Label text on the button + type: string + url: + description: '*Optional*. HTTP or tg:// url to be opened when button is pressed' + type: string + login_url: + $ref: '#/components/schemas/LoginUrl' + callback_data: + description: '*Optional*. Data to be sent in a [callback query](https://core.telegram.org/bots/api/#callbackquery) to the bot when button is pressed, 1-64 bytes' + type: string + switch_inline_query: + description: |- + *Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. + + **Note:** This offers an easy way for users to start using your bot in [inline mode](/bots/inline) when they are currently in a private chat with it. Especially useful when combined with [*switch\_pm…*](https://core.telegram.org/bots/api/#answerinlinequery) actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. + type: string + switch_inline_query_current_chat: + description: |- + *Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted. + + This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. + type: string + callback_game: + $ref: '#/components/schemas/CallbackGame' + pay: + description: |- + *Optional*. Specify True, to send a [Pay button](https://core.telegram.org/bots/api/#payments). + + **NOTE:** This type of button **must** always be the first button in the first row. + type: boolean + required: + - text + LoginUrl: + externalDocs: + url: 'https://core.telegram.org/bots/api/#loginurl' + description: |- + This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the [Telegram Login Widget](https://core.telegram.org/widgets/login) when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: + + Telegram apps support these buttons as of [version 5.7](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots). + + Sample bot: [@discussbot](https://t.me/discussbot) + type: object + properties: + url: + description: |- + An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data). + + **NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization). + type: string + forward_text: + description: '*Optional*. New text of the button in forwarded messages.' + type: string + bot_username: + description: '*Optional*. Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot''s username will be assumed. The *url*''s domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details.' + type: string + request_write_access: + description: '*Optional*. Pass True to request the permission for your bot to send messages to the user.' + type: boolean + required: + - url + CallbackQuery: + externalDocs: + url: 'https://core.telegram.org/bots/api/#callbackquery' + description: 'This object represents an incoming callback query from a callback button in an [inline keyboard](/bots#inline-keyboards-and-on-the-fly-updating). If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in [inline mode](https://core.telegram.org/bots/api/#inline-mode)), the field *inline\_message\_id* will be present. Exactly one of the fields *data* or *game\_short\_name* will be present.' + type: object + properties: + id: + description: Unique identifier for this query + type: string + from: + $ref: '#/components/schemas/User' + message: + $ref: '#/components/schemas/Message' + inline_message_id: + description: '*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.' + type: string + chat_instance: + description: 'Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in [games](https://core.telegram.org/bots/api/#games).' + type: string + data: + description: '*Optional*. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.' + type: string + game_short_name: + description: '*Optional*. Short name of a [Game](https://core.telegram.org/bots/api/#games) to be returned, serves as the unique identifier for the game' + type: string + required: + - id + - from + - chat_instance + ForceReply: + externalDocs: + url: 'https://core.telegram.org/bots/api/#forcereply' + description: 'Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot''s message and tapped ''Reply''). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice [privacy mode](/bots#privacy-mode).' + type: object + properties: + force_reply: + description: 'Shows reply interface to the user, as if they manually selected the bot''s message and tapped ''Reply''' + type: boolean + selective: + description: '*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot''s message is a reply (has *reply\_to\_message\_id*), sender of the original message.' + type: boolean + required: + - force_reply + ChatPhoto: + externalDocs: + url: 'https://core.telegram.org/bots/api/#chatphoto' + description: This object represents a chat photo. + type: object + properties: + small_file_id: + description: File identifier of small (160x160) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. + type: string + small_file_unique_id: + description: 'Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + big_file_id: + description: File identifier of big (640x640) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. + type: string + big_file_unique_id: + description: 'Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + required: + - small_file_id + - small_file_unique_id + - big_file_id + - big_file_unique_id + ChatMember: + externalDocs: + url: 'https://core.telegram.org/bots/api/#chatmember' + description: This object contains information about one member of a chat. + type: object + properties: + user: + $ref: '#/components/schemas/User' + status: + description: 'The member''s status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”' + type: string + enum: + - creator + - administrator + - member + - restricted + - left + - kicked + custom_title: + description: '*Optional*. Owner and administrators only. Custom title for this user' + type: string + is_anonymous: + description: '*Optional*. Owner and administrators only. True, if the user''s presence in the chat is hidden' + type: boolean + can_be_edited: + description: '*Optional*. Administrators only. True, if the bot is allowed to edit administrator privileges of that user' + type: boolean + can_post_messages: + description: '*Optional*. Administrators only. True, if the administrator can post in the channel; channels only' + type: boolean + can_edit_messages: + description: '*Optional*. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only' + type: boolean + can_delete_messages: + description: '*Optional*. Administrators only. True, if the administrator can delete messages of other users' + type: boolean + can_restrict_members: + description: '*Optional*. Administrators only. True, if the administrator can restrict, ban or unban chat members' + type: boolean + can_promote_members: + description: '*Optional*. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)' + type: boolean + can_change_info: + description: '*Optional*. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings' + type: boolean + can_invite_users: + description: '*Optional*. Administrators and restricted only. True, if the user is allowed to invite new users to the chat' + type: boolean + can_pin_messages: + description: '*Optional*. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only' + type: boolean + is_member: + description: '*Optional*. Restricted only. True, if the user is a member of the chat at the moment of the request' + type: boolean + can_send_messages: + description: '*Optional*. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues' + type: boolean + can_send_media_messages: + description: '*Optional*. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes' + type: boolean + can_send_polls: + description: '*Optional*. Restricted only. True, if the user is allowed to send polls' + type: boolean + can_send_other_messages: + description: '*Optional*. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots' + type: boolean + can_add_web_page_previews: + description: '*Optional*. Restricted only. True, if the user is allowed to add web page previews to their messages' + type: boolean + until_date: + description: '*Optional*. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time' + type: integer + joined_date: + description: '*Optional*. Time when the user joined the group. unix time' + type: integer + inviter: + description: '*Optional*. The inviter. `User`' + $ref: '#/components/schemas/User' + required: + - user + - status + ChatPermissions: + externalDocs: + url: 'https://core.telegram.org/bots/api/#chatpermissions' + description: Describes actions that a non-administrator user is allowed to take in a chat. + type: object + properties: + can_send_messages: + description: '*Optional*. True, if the user is allowed to send text messages, contacts, locations and venues' + type: boolean + can_send_media_messages: + description: '*Optional*. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can\_send\_messages' + type: boolean + can_send_polls: + description: '*Optional*. True, if the user is allowed to send polls, implies can\_send\_messages' + type: boolean + can_send_other_messages: + description: '*Optional*. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can\_send\_media\_messages' + type: boolean + can_add_web_page_previews: + description: '*Optional*. True, if the user is allowed to add web page previews to their messages, implies can\_send\_media\_messages' + type: boolean + can_change_info: + description: '*Optional*. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups' + type: boolean + can_invite_users: + description: '*Optional*. True, if the user is allowed to invite new users to the chat' + type: boolean + can_pin_messages: + description: '*Optional*. True, if the user is allowed to pin messages. Ignored in public supergroups' + type: boolean + ChatLocation: + externalDocs: + url: 'https://core.telegram.org/bots/api/#chatlocation' + description: Represents a location to which a chat is connected. + type: object + properties: + location: + $ref: '#/components/schemas/Location' + address: + description: 'Location address; 1-64 characters, as defined by the chat owner' + type: string + required: + - location + - address + BotCommand: + externalDocs: + url: 'https://core.telegram.org/bots/api/#botcommand' + description: This object represents a bot command. + type: object + properties: + command: + description: 'Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.' + type: string + description: + description: 'Description of the command, 3-256 characters.' + type: string + required: + - command + - description + ResponseParameters: + externalDocs: + url: 'https://core.telegram.org/bots/api/#responseparameters' + description: Contains information about why a request was unsuccessful. + type: object + properties: + migrate_to_chat_id: + description: '*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' + type: integer + retry_after: + description: '*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated' + type: integer + InputMedia: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmedia' + description: This object represents the content of a media message to be sent. It should be one of + anyOf: + - $ref: '#/components/schemas/InputMediaAnimation' + - $ref: '#/components/schemas/InputMediaDocument' + - $ref: '#/components/schemas/InputMediaAudio' + - $ref: '#/components/schemas/InputMediaPhoto' + - $ref: '#/components/schemas/InputMediaVideo' + InputMediaPhoto: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmediaphoto' + description: Represents a photo to be sent. + type: object + properties: + type: + description: 'Type of the result, must be *photo*' + type: string + media: + description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + type: string + caption: + description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + required: + - type + - media + InputMediaVideo: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmediavideo' + description: Represents a video to be sent. + type: object + properties: + type: + description: 'Type of the result, must be *video*' + type: string + media: + description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + type: string + thumb: + description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + width: + description: '*Optional*. Video width' + type: integer + height: + description: '*Optional*. Video height' + type: integer + duration: + description: '*Optional*. Video duration' + type: integer + supports_streaming: + description: '*Optional*. Pass *True*, if the uploaded video is suitable for streaming' + type: boolean + required: + - type + - media + InputMediaAnimation: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmediaanimation' + description: Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. + type: object + properties: + type: + description: 'Type of the result, must be *animation*' + type: string + media: + description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + type: string + thumb: + description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: '*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + width: + description: '*Optional*. Animation width' + type: integer + height: + description: '*Optional*. Animation height' + type: integer + duration: + description: '*Optional*. Animation duration' + type: integer + required: + - type + - media + InputMediaAudio: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmediaaudio' + description: Represents an audio file to be treated as music to be sent. + type: object + properties: + type: + description: 'Type of the result, must be *audio*' + type: string + media: + description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + type: string + thumb: + description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: '*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + duration: + description: '*Optional*. Duration of the audio in seconds' + type: integer + performer: + description: '*Optional*. Performer of the audio' + type: string + title: + description: '*Optional*. Title of the audio' + type: string + required: + - type + - media + InputMediaDocument: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmediadocument' + description: Represents a general file to be sent. + type: object + properties: + type: + description: 'Type of the result, must be *document*' + type: string + media: + description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + type: string + thumb: + description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' + anyOf: + - $ref: '#/components/schemas/InputFile' + - type: string + caption: + description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_content_type_detection: + description: '*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.' + type: boolean + required: + - type + - media + InputFile: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputfile' + description: This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. + Sticker: + externalDocs: + url: 'https://core.telegram.org/bots/api/#sticker' + description: This object represents a sticker. + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + width: + description: Sticker width + type: integer + height: + description: Sticker height + type: integer + is_animated: + description: '*True*, if the sticker is [animated](https://telegram.org/blog/animated-stickers)' + type: boolean + thumb: + $ref: '#/components/schemas/PhotoSize' + emoji: + description: '*Optional*. Emoji associated with the sticker' + type: string + set_name: + description: '*Optional*. Name of the sticker set to which the sticker belongs' + type: string + mask_position: + $ref: '#/components/schemas/MaskPosition' + file_size: + description: '*Optional*. File size' + type: integer + required: + - file_id + - file_unique_id + - width + - height + - is_animated + StickerSet: + externalDocs: + url: 'https://core.telegram.org/bots/api/#stickerset' + description: This object represents a sticker set. + type: object + properties: + name: + description: Sticker set name + type: string + title: + description: Sticker set title + type: string + is_animated: + description: '*True*, if the sticker set contains [animated stickers](https://telegram.org/blog/animated-stickers)' + type: boolean + contains_masks: + description: '*True*, if the sticker set contains masks' + type: boolean + stickers: + description: List of all set stickers + type: array + items: + $ref: '#/components/schemas/Sticker' + thumb: + $ref: '#/components/schemas/PhotoSize' + required: + - name + - title + - is_animated + - contains_masks + - stickers + MaskPosition: + externalDocs: + url: 'https://core.telegram.org/bots/api/#maskposition' + description: This object describes the position on faces where a mask should be placed by default. + type: object + properties: + point: + description: 'The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.' + type: string + enum: + - forehead + - eyes + - mouth + - chin + x_shift: + description: 'Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.' + type: number + y_shift: + description: 'Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.' + type: number + scale: + description: 'Mask scaling coefficient. For example, 2.0 means double size.' + type: number + required: + - point + - x_shift + - y_shift + - scale + InlineQuery: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequery' + description: 'This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.' + type: object + properties: + id: + description: Unique identifier for this query + type: string + from: + $ref: '#/components/schemas/User' + location: + $ref: '#/components/schemas/Location' + query: + description: Text of the query (up to 256 characters) + type: string + offset: + description: 'Offset of the results to be returned, can be controlled by the bot' + type: string + required: + - id + - from + - query + - offset + InlineQueryResult: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresult' + description: 'This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:' + anyOf: + - $ref: '#/components/schemas/InlineQueryResultCachedAudio' + - $ref: '#/components/schemas/InlineQueryResultCachedDocument' + - $ref: '#/components/schemas/InlineQueryResultCachedGif' + - $ref: '#/components/schemas/InlineQueryResultCachedMpeg4Gif' + - $ref: '#/components/schemas/InlineQueryResultCachedPhoto' + - $ref: '#/components/schemas/InlineQueryResultCachedSticker' + - $ref: '#/components/schemas/InlineQueryResultCachedVideo' + - $ref: '#/components/schemas/InlineQueryResultCachedVoice' + - $ref: '#/components/schemas/InlineQueryResultArticle' + - $ref: '#/components/schemas/InlineQueryResultAudio' + - $ref: '#/components/schemas/InlineQueryResultContact' + - $ref: '#/components/schemas/InlineQueryResultGame' + - $ref: '#/components/schemas/InlineQueryResultDocument' + - $ref: '#/components/schemas/InlineQueryResultGif' + - $ref: '#/components/schemas/InlineQueryResultLocation' + - $ref: '#/components/schemas/InlineQueryResultMpeg4Gif' + - $ref: '#/components/schemas/InlineQueryResultPhoto' + - $ref: '#/components/schemas/InlineQueryResultVenue' + - $ref: '#/components/schemas/InlineQueryResultVideo' + - $ref: '#/components/schemas/InlineQueryResultVoice' + InlineQueryResultArticle: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultarticle' + description: Represents a link to an article or web page. + type: object + properties: + type: + description: 'Type of the result, must be *article*' + type: string + id: + description: 'Unique identifier for this result, 1-64 Bytes' + type: string + title: + description: Title of the result + type: string + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + url: + description: '*Optional*. URL of the result' + type: string + hide_url: + description: '*Optional*. Pass *True*, if you don''t want the URL to be shown in the message' + type: boolean + description: + description: '*Optional*. Short description of the result' + type: string + thumb_url: + description: '*Optional*. Url of the thumbnail for the result' + type: string + thumb_width: + description: '*Optional*. Thumbnail width' + type: integer + thumb_height: + description: '*Optional*. Thumbnail height' + type: integer + required: + - type + - id + - title + - input_message_content + InlineQueryResultPhoto: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultphoto' + description: 'Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the photo.' + type: object + properties: + type: + description: 'Type of the result, must be *photo*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + photo_url: + description: A valid URL of the photo. Photo must be in **jpeg** format. Photo size must not exceed 5MB + type: string + thumb_url: + description: URL of the thumbnail for the photo + type: string + photo_width: + description: '*Optional*. Width of the photo' + type: integer + photo_height: + description: '*Optional*. Height of the photo' + type: integer + title: + description: '*Optional*. Title for the result' + type: string + description: + description: '*Optional*. Short description of the result' + type: string + caption: + description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - photo_url + - thumb_url + InlineQueryResultGif: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultgif' + description: 'Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' + type: object + properties: + type: + description: 'Type of the result, must be *gif*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + gif_url: + description: A valid URL for the GIF file. File size must not exceed 1MB + type: string + gif_width: + description: '*Optional*. Width of the GIF' + type: integer + gif_height: + description: '*Optional*. Height of the GIF' + type: integer + gif_duration: + description: '*Optional*. Duration of the GIF' + type: integer + thumb_url: + description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result + type: string + thumb_mime_type: + description: '*Optional*. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' + default: image/jpeg + type: string + enum: + - image/jpeg + - image/gif + - video/mp4 + title: + description: '*Optional*. Title for the result' + type: string + caption: + description: '*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - gif_url + - thumb_url + InlineQueryResultMpeg4Gif: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultmpeg4gif' + description: 'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' + type: object + properties: + type: + description: 'Type of the result, must be *mpeg4\_gif*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + mpeg4_url: + description: A valid URL for the MP4 file. File size must not exceed 1MB + type: string + mpeg4_width: + description: '*Optional*. Video width' + type: integer + mpeg4_height: + description: '*Optional*. Video height' + type: integer + mpeg4_duration: + description: '*Optional*. Video duration' + type: integer + thumb_url: + description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result + type: string + thumb_mime_type: + description: '*Optional*. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' + default: image/jpeg + type: string + enum: + - image/jpeg + - image/gif + - video/mp4 + title: + description: '*Optional*. Title for the result' + type: string + caption: + description: '*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - mpeg4_url + - thumb_url + InlineQueryResultVideo: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultvideo' + description: |- + Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the video. + + If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input\_message\_content*. + type: object + properties: + type: + description: 'Type of the result, must be *video*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + video_url: + description: A valid URL for the embedded video player or video file + type: string + mime_type: + description: 'Mime type of the content of video url, “text/html” or “video/mp4”' + type: string + thumb_url: + description: URL of the thumbnail (jpeg only) for the video + type: string + title: + description: Title for the result + type: string + caption: + description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + video_width: + description: '*Optional*. Video width' + type: integer + video_height: + description: '*Optional*. Video height' + type: integer + video_duration: + description: '*Optional*. Video duration in seconds' + type: integer + description: + description: '*Optional*. Short description of the result' + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - video_url + - mime_type + - thumb_url + - title + InlineQueryResultAudio: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultaudio' + description: 'Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the audio.' + type: object + properties: + type: + description: 'Type of the result, must be *audio*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + audio_url: + description: A valid URL for the audio file + type: string + title: + description: Title + type: string + caption: + description: '*Optional*. Caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + performer: + description: '*Optional*. Performer' + type: string + audio_duration: + description: '*Optional*. Audio duration in seconds' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - audio_url + - title + InlineQueryResultVoice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultvoice' + description: 'Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the the voice message.' + type: object + properties: + type: + description: 'Type of the result, must be *voice*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + voice_url: + description: A valid URL for the voice recording + type: string + title: + description: Recording title + type: string + caption: + description: '*Optional*. Caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + voice_duration: + description: '*Optional*. Recording duration in seconds' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - voice_url + - title + InlineQueryResultDocument: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultdocument' + description: 'Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method.' + type: object + properties: + type: + description: 'Type of the result, must be *document*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + title: + description: Title for the result + type: string + caption: + description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + document_url: + description: A valid URL for the file + type: string + mime_type: + description: 'Mime type of the content of the file, either “application/pdf” or “application/zip”' + type: string + enum: + - application/pdf + - application/zip + description: + description: '*Optional*. Short description of the result' + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + thumb_url: + description: '*Optional*. URL of the thumbnail (jpeg only) for the file' + type: string + thumb_width: + description: '*Optional*. Thumbnail width' + type: integer + thumb_height: + description: '*Optional*. Thumbnail height' + type: integer + required: + - type + - id + - title + - document_url + - mime_type + InlineQueryResultLocation: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultlocation' + description: 'Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the location.' + type: object + properties: + type: + description: 'Type of the result, must be *location*' + type: string + id: + description: 'Unique identifier for this result, 1-64 Bytes' + type: string + latitude: + description: Location latitude in degrees + type: number + longitude: + description: Location longitude in degrees + type: number + title: + description: Location title + type: string + horizontal_accuracy: + description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: '*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.' + type: integer + heading: + description: '*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: '*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + thumb_url: + description: '*Optional*. Url of the thumbnail for the result' + type: string + thumb_width: + description: '*Optional*. Thumbnail width' + type: integer + thumb_height: + description: '*Optional*. Thumbnail height' + type: integer + required: + - type + - id + - latitude + - longitude + - title + InlineQueryResultVenue: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultvenue' + description: 'Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the venue.' + type: object + properties: + type: + description: 'Type of the result, must be *venue*' + type: string + id: + description: 'Unique identifier for this result, 1-64 Bytes' + type: string + latitude: + description: Latitude of the venue location in degrees + type: number + longitude: + description: Longitude of the venue location in degrees + type: number + title: + description: Title of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: '*Optional*. Foursquare identifier of the venue if known' + type: string + foursquare_type: + description: '*Optional*. Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: '*Optional*. Google Places identifier of the venue' + type: string + google_place_type: + description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + thumb_url: + description: '*Optional*. Url of the thumbnail for the result' + type: string + thumb_width: + description: '*Optional*. Thumbnail width' + type: integer + thumb_height: + description: '*Optional*. Thumbnail height' + type: integer + required: + - type + - id + - latitude + - longitude + - title + - address + InlineQueryResultContact: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcontact' + description: 'Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the contact.' + type: object + properties: + type: + description: 'Type of the result, must be *contact*' + type: string + id: + description: 'Unique identifier for this result, 1-64 Bytes' + type: string + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: '*Optional*. Contact''s last name' + type: string + vcard: + description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + thumb_url: + description: '*Optional*. Url of the thumbnail for the result' + type: string + thumb_width: + description: '*Optional*. Thumbnail width' + type: integer + thumb_height: + description: '*Optional*. Thumbnail height' + type: integer + required: + - type + - id + - phone_number + - first_name + InlineQueryResultGame: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultgame' + description: 'Represents a [Game](https://core.telegram.org/bots/api/#games).' + type: object + properties: + type: + description: 'Type of the result, must be *game*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + game_short_name: + description: Short name of the game + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - type + - id + - game_short_name + InlineQueryResultCachedPhoto: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedphoto' + description: 'Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the photo.' + type: object + properties: + type: + description: 'Type of the result, must be *photo*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + photo_file_id: + description: A valid file identifier of the photo + type: string + title: + description: '*Optional*. Title for the result' + type: string + description: + description: '*Optional*. Short description of the result' + type: string + caption: + description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - photo_file_id + InlineQueryResultCachedGif: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedgif' + description: 'Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with specified content instead of the animation.' + type: object + properties: + type: + description: 'Type of the result, must be *gif*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + gif_file_id: + description: A valid file identifier for the GIF file + type: string + title: + description: '*Optional*. Title for the result' + type: string + caption: + description: '*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - gif_file_id + InlineQueryResultCachedMpeg4Gif: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedmpeg4gif' + description: 'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' + type: object + properties: + type: + description: 'Type of the result, must be *mpeg4\_gif*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + mpeg4_file_id: + description: A valid file identifier for the MP4 file + type: string + title: + description: '*Optional*. Title for the result' + type: string + caption: + description: '*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - mpeg4_file_id + InlineQueryResultCachedSticker: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedsticker' + description: 'Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the sticker.' + type: object + properties: + type: + description: 'Type of the result, must be *sticker*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + sticker_file_id: + description: A valid file identifier of the sticker + type: string + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - sticker_file_id + InlineQueryResultCachedDocument: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcacheddocument' + description: 'Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the file.' + type: object + properties: + type: + description: 'Type of the result, must be *document*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + title: + description: Title for the result + type: string + document_file_id: + description: A valid file identifier for the file + type: string + description: + description: '*Optional*. Short description of the result' + type: string + caption: + description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - title + - document_file_id + InlineQueryResultCachedVideo: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedvideo' + description: 'Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the video.' + type: object + properties: + type: + description: 'Type of the result, must be *video*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + video_file_id: + description: A valid file identifier for the video file + type: string + title: + description: Title for the result + type: string + description: + description: '*Optional*. Short description of the result' + type: string + caption: + description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - video_file_id + - title + InlineQueryResultCachedVoice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedvoice' + description: 'Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the voice message.' + type: object + properties: + type: + description: 'Type of the result, must be *voice*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + voice_file_id: + description: A valid file identifier for the voice message + type: string + title: + description: Voice message title + type: string + caption: + description: '*Optional*. Caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - voice_file_id + - title + InlineQueryResultCachedAudio: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedaudio' + description: 'Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the audio.' + type: object + properties: + type: + description: 'Type of the result, must be *audio*' + type: string + id: + description: 'Unique identifier for this result, 1-64 bytes' + type: string + audio_file_id: + description: A valid file identifier for the audio file + type: string + caption: + description: '*Optional*. Caption, 0-1024 characters after entities parsing' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + caption_entities: + description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + reply_markup: + $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - audio_file_id + InputMessageContent: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputmessagecontent' + description: 'This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 4 types:' + anyOf: + - $ref: '#/components/schemas/InputTextMessageContent' + - $ref: '#/components/schemas/InputLocationMessageContent' + - $ref: '#/components/schemas/InputVenueMessageContent' + - $ref: '#/components/schemas/InputContactMessageContent' + InputTextMessageContent: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputtextmessagecontent' + description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a text message to be sent as the result of an inline query.' + type: object + properties: + message_text: + description: 'Text of the message to be sent, 1-4096 characters' + type: string + parse_mode: + description: '*Optional*. Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' + type: string + entities: + description: '*Optional*. List of special entities that appear in message text, which can be specified instead of *parse\_mode*' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + disable_web_page_preview: + description: '*Optional*. Disables link previews for links in the sent message' + type: boolean + required: + - message_text + InputLocationMessageContent: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputlocationmessagecontent' + description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a location message to be sent as the result of an inline query.' + type: object + properties: + latitude: + description: Latitude of the location in degrees + type: number + longitude: + description: Longitude of the location in degrees + type: number + horizontal_accuracy: + description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' + type: number + live_period: + description: '*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.' + type: integer + heading: + description: '*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' + type: integer + proximity_alert_radius: + description: '*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' + type: integer + required: + - latitude + - longitude + InputVenueMessageContent: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputvenuemessagecontent' + description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a venue message to be sent as the result of an inline query.' + type: object + properties: + latitude: + description: Latitude of the venue in degrees + type: number + longitude: + description: Longitude of the venue in degrees + type: number + title: + description: Name of the venue + type: string + address: + description: Address of the venue + type: string + foursquare_id: + description: '*Optional*. Foursquare identifier of the venue, if known' + type: string + foursquare_type: + description: '*Optional*. Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' + type: string + google_place_id: + description: '*Optional*. Google Places identifier of the venue' + type: string + google_place_type: + description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' + type: string + required: + - latitude + - longitude + - title + - address + InputContactMessageContent: + externalDocs: + url: 'https://core.telegram.org/bots/api/#inputcontactmessagecontent' + description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a contact message to be sent as the result of an inline query.' + type: object + properties: + phone_number: + description: Contact's phone number + type: string + first_name: + description: Contact's first name + type: string + last_name: + description: '*Optional*. Contact''s last name' + type: string + vcard: + description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' + type: string + required: + - phone_number + - first_name + ChosenInlineResult: + externalDocs: + url: 'https://core.telegram.org/bots/api/#choseninlineresult' + description: 'Represents a [result](https://core.telegram.org/bots/api/#inlinequeryresult) of an inline query that was chosen by the user and sent to their chat partner.' + type: object + properties: + result_id: + description: The unique identifier for the result that was chosen + type: string + from: + $ref: '#/components/schemas/User' + location: + $ref: '#/components/schemas/Location' + inline_message_id: + description: '*Optional*. Identifier of the sent inline message. Available only if there is an [inline keyboard](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) attached to the message. Will be also received in [callback queries](https://core.telegram.org/bots/api/#callbackquery) and can be used to [edit](https://core.telegram.org/bots/api/#updating-messages) the message.' + type: string + query: + description: The query that was used to obtain the result + type: string + required: + - result_id + - from + - query + LabeledPrice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#labeledprice' + description: This object represents a portion of the price for goods or services. + type: object + properties: + label: + description: Portion label + type: string + amount: + description: 'Price of the product in the *smallest units* of the [currency](/bots/payments#supported-currencies) (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' + type: integer + required: + - label + - amount + Invoice: + externalDocs: + url: 'https://core.telegram.org/bots/api/#invoice' + description: This object contains basic information about an invoice. + type: object + properties: + title: + description: Product name + type: string + description: + description: Product description + type: string + start_parameter: + description: Unique bot deep-linking parameter that can be used to generate this invoice + type: string + currency: + description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' + type: string + total_amount: + description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' + type: integer + required: + - title + - description + - start_parameter + - currency + - total_amount + ShippingAddress: + externalDocs: + url: 'https://core.telegram.org/bots/api/#shippingaddress' + description: This object represents a shipping address. + type: object + properties: + country_code: + description: ISO 3166-1 alpha-2 country code + type: string + state: + description: 'State, if applicable' + type: string + city: + description: City + type: string + street_line1: + description: First line for the address + type: string + street_line2: + description: Second line for the address + type: string + post_code: + description: Address post code + type: string + required: + - country_code + - state + - city + - street_line1 + - street_line2 + - post_code + OrderInfo: + externalDocs: + url: 'https://core.telegram.org/bots/api/#orderinfo' + description: This object represents information about an order. + type: object + properties: + name: + description: '*Optional*. User name' + type: string + phone_number: + description: '*Optional*. User''s phone number' + type: string + email: + description: '*Optional*. User email' + type: string + shipping_address: + $ref: '#/components/schemas/ShippingAddress' + ShippingOption: + externalDocs: + url: 'https://core.telegram.org/bots/api/#shippingoption' + description: This object represents one shipping option. + type: object + properties: + id: + description: Shipping option identifier + type: string + title: + description: Option title + type: string + prices: + description: List of price portions + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + required: + - id + - title + - prices + SuccessfulPayment: + externalDocs: + url: 'https://core.telegram.org/bots/api/#successfulpayment' + description: This object contains basic information about a successful payment. + type: object + properties: + currency: + description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' + type: string + total_amount: + description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' + type: integer + invoice_payload: + description: Bot specified invoice payload + type: string + shipping_option_id: + description: '*Optional*. Identifier of the shipping option chosen by the user' + type: string + order_info: + $ref: '#/components/schemas/OrderInfo' + telegram_payment_charge_id: + description: Telegram payment identifier + type: string + provider_payment_charge_id: + description: Provider payment identifier + type: string + required: + - currency + - total_amount + - invoice_payload + - telegram_payment_charge_id + - provider_payment_charge_id + ShippingQuery: + externalDocs: + url: 'https://core.telegram.org/bots/api/#shippingquery' + description: This object contains information about an incoming shipping query. + type: object + properties: + id: + description: Unique query identifier + type: string + from: + $ref: '#/components/schemas/User' + invoice_payload: + description: Bot specified invoice payload + type: string + shipping_address: + $ref: '#/components/schemas/ShippingAddress' + required: + - id + - from + - invoice_payload + - shipping_address + PreCheckoutQuery: + externalDocs: + url: 'https://core.telegram.org/bots/api/#precheckoutquery' + description: This object contains information about an incoming pre-checkout query. + type: object + properties: + id: + description: Unique query identifier + type: string + from: + $ref: '#/components/schemas/User' + currency: + description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' + type: string + total_amount: + description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' + type: integer + invoice_payload: + description: Bot specified invoice payload + type: string + shipping_option_id: + description: '*Optional*. Identifier of the shipping option chosen by the user' + type: string + order_info: + $ref: '#/components/schemas/OrderInfo' + required: + - id + - from + - currency + - total_amount + - invoice_payload + PassportData: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportdata' + description: Contains information about Telegram Passport data shared with the bot by the user. + type: object + properties: + data: + description: Array with information about documents and other Telegram Passport elements that was shared with the bot + type: array + items: + $ref: '#/components/schemas/EncryptedPassportElement' + credentials: + $ref: '#/components/schemas/EncryptedCredentials' + required: + - data + - credentials + PassportFile: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportfile' + description: This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. + type: object + properties: + file_id: + description: 'Identifier for this file, which can be used to download or reuse the file' + type: string + file_unique_id: + description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' + type: string + file_size: + description: File size + type: integer + file_date: + description: Unix time when the file was uploaded + type: integer + required: + - file_id + - file_unique_id + - file_size + - file_date + EncryptedPassportElement: + externalDocs: + url: 'https://core.telegram.org/bots/api/#encryptedpassportelement' + description: Contains information about documents or other Telegram Passport elements shared with the bot by the user. + type: object + properties: + type: + description: 'Element type. One of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”, “phone\_number”, “email”.' + type: string + enum: + - personal_details + - passport + - driver_license + - identity_card + - internal_passport + - address + - utility_bill + - bank_statement + - rental_agreement + - passport_registration + - temporary_registration + - phone_number + - email + data: + description: '*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport” and “address” types. Can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' + type: string + phone_number: + description: '*Optional*. User''s verified phone number, available only for “phone\_number” type' + type: string + email: + description: '*Optional*. User''s verified email address, available only for “email” type' + type: string + files: + description: '*Optional*. Array of encrypted files with documents provided by the user, available for “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' + type: array + items: + $ref: '#/components/schemas/PassportFile' + front_side: + $ref: '#/components/schemas/PassportFile' + reverse_side: + $ref: '#/components/schemas/PassportFile' + selfie: + $ref: '#/components/schemas/PassportFile' + translation: + description: '*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' + type: array + items: + $ref: '#/components/schemas/PassportFile' + hash: + description: 'Base64-encoded element hash for using in [PassportElementErrorUnspecified](https://core.telegram.org/bots/api/#passportelementerrorunspecified)' + type: string + required: + - type + - hash + EncryptedCredentials: + externalDocs: + url: 'https://core.telegram.org/bots/api/#encryptedcredentials' + description: 'Contains data required for decrypting and authenticating [EncryptedPassportElement](https://core.telegram.org/bots/api/#encryptedpassportelement). See the [Telegram Passport Documentation](https://core.telegram.org/passport#receiving-information) for a complete description of the data decryption and authentication processes.' + type: object + properties: + data: + description: 'Base64-encoded encrypted JSON-serialized data with unique user''s payload, data hashes and secrets required for [EncryptedPassportElement](https://core.telegram.org/bots/api/#encryptedpassportelement) decryption and authentication' + type: string + hash: + description: Base64-encoded data hash for data authentication + type: string + secret: + description: 'Base64-encoded secret, encrypted with the bot''s public RSA key, required for data decryption' + type: string + required: + - data + - hash + - secret + PassportElementError: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerror' + description: 'This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:' + anyOf: + - $ref: '#/components/schemas/PassportElementErrorDataField' + - $ref: '#/components/schemas/PassportElementErrorFrontSide' + - $ref: '#/components/schemas/PassportElementErrorReverseSide' + - $ref: '#/components/schemas/PassportElementErrorSelfie' + - $ref: '#/components/schemas/PassportElementErrorFile' + - $ref: '#/components/schemas/PassportElementErrorFiles' + - $ref: '#/components/schemas/PassportElementErrorTranslationFile' + - $ref: '#/components/schemas/PassportElementErrorTranslationFiles' + - $ref: '#/components/schemas/PassportElementErrorUnspecified' + PassportElementErrorDataField: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrordatafield' + description: Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. + type: object + properties: + source: + description: 'Error source, must be *data*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the error, one of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”' + type: string + enum: + - personal_details + - passport + - driver_license + - identity_card + - internal_passport + - address + field_name: + description: Name of the data field which has the error + type: string + data_hash: + description: Base64-encoded data hash + type: string + message: + description: Error message + type: string + required: + - source + - type + - field_name + - data_hash + - message + PassportElementErrorFrontSide: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorfrontside' + description: Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. + type: object + properties: + source: + description: 'Error source, must be *front\_side*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”' + type: string + enum: + - passport + - driver_license + - identity_card + - internal_passport + file_hash: + description: Base64-encoded hash of the file with the front side of the document + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hash + - message + PassportElementErrorReverseSide: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorreverseside' + description: Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. + type: object + properties: + source: + description: 'Error source, must be *reverse\_side*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the issue, one of “driver\_license”, “identity\_card”' + type: string + enum: + - driver_license + - identity_card + file_hash: + description: Base64-encoded hash of the file with the reverse side of the document + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hash + - message + PassportElementErrorSelfie: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorselfie' + description: Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. + type: object + properties: + source: + description: 'Error source, must be *selfie*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”' + type: string + enum: + - passport + - driver_license + - identity_card + - internal_passport + file_hash: + description: Base64-encoded hash of the file with the selfie + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hash + - message + PassportElementErrorFile: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorfile' + description: Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. + type: object + properties: + source: + description: 'Error source, must be *file*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' + type: string + enum: + - utility_bill + - bank_statement + - rental_agreement + - passport_registration + - temporary_registration + file_hash: + description: Base64-encoded file hash + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hash + - message + PassportElementErrorFiles: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorfiles' + description: Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. + type: object + properties: + source: + description: 'Error source, must be *files*' + type: string + type: + description: 'The section of the user''s Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' + type: string + enum: + - utility_bill + - bank_statement + - rental_agreement + - passport_registration + - temporary_registration + file_hashes: + description: List of base64-encoded file hashes + type: array + items: + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hashes + - message + PassportElementErrorTranslationFile: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrortranslationfile' + description: Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. + type: object + properties: + source: + description: 'Error source, must be *translation\_file*' + type: string + type: + description: 'Type of element of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' + type: string + enum: + - passport + - driver_license + - identity_card + - internal_passport + - utility_bill + - bank_statement + - rental_agreement + - passport_registration + - temporary_registration + file_hash: + description: Base64-encoded file hash + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hash + - message + PassportElementErrorTranslationFiles: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrortranslationfiles' + description: Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. + type: object + properties: + source: + description: 'Error source, must be *translation\_files*' + type: string + type: + description: 'Type of element of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' + type: string + enum: + - passport + - driver_license + - identity_card + - internal_passport + - utility_bill + - bank_statement + - rental_agreement + - passport_registration + - temporary_registration + file_hashes: + description: List of base64-encoded file hashes + type: array + items: + type: string + message: + description: Error message + type: string + required: + - source + - type + - file_hashes + - message + PassportElementErrorUnspecified: + externalDocs: + url: 'https://core.telegram.org/bots/api/#passportelementerrorunspecified' + description: Represents an issue in an unspecified place. The error is considered resolved when new data is added. + type: object + properties: + source: + description: 'Error source, must be *unspecified*' + type: string + type: + description: Type of element of the user's Telegram Passport which has the issue + type: string + element_hash: + description: Base64-encoded element hash + type: string + message: + description: Error message + type: string + required: + - source + - type + - element_hash + - message + Game: + externalDocs: + url: 'https://core.telegram.org/bots/api/#game' + description: 'This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.' + type: object + properties: + title: + description: Title of the game + type: string + description: + description: Description of the game + type: string + photo: + description: Photo that will be displayed in the game message in chats. + type: array + items: + $ref: '#/components/schemas/PhotoSize' + text: + description: '*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls [setGameScore](https://core.telegram.org/bots/api/#setgamescore), or manually edited using [editMessageText](https://core.telegram.org/bots/api/#editmessagetext). 0-4096 characters.' + type: string + text_entities: + description: '*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.' + type: array + items: + $ref: '#/components/schemas/MessageEntity' + animation: + $ref: '#/components/schemas/Animation' + required: + - title + - description + - photo + CallbackGame: + externalDocs: + url: 'https://core.telegram.org/bots/api/#callbackgame' + description: 'A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game.' + GameHighScore: + externalDocs: + url: 'https://core.telegram.org/bots/api/#gamehighscore' + description: This object represents one row of the high scores table for a game. + type: object + properties: + position: + description: Position in high score table for the game + type: integer + user: + $ref: '#/components/schemas/User' + score: + description: Score + type: integer + required: + - position + - user + - score + + AuthorizationState: + description: Used in the User Authorization process, used to return the current state of the authorization and the token. + type: object + properties: + authorization_state: + description: 'Returns the current state of the authorization process. Is one of `wait_code`, `wait_password`, `wait_registration`, `ready` or `unknown`' + type: string + enum: + - wait_code + - wait_password + - wait_registration + - ready + - unknown + token: + description: 'Optional. Token to be used for calling methods at the bot api. Only returned once after the `userlogin` method.' + type: string + timeout: + description: 'Optional. Timeout for entering the authorization code.' + type: integer + password_hint: + description: 'Optional. The password hint for your 2fa password. May be empty even if you set a hint.' + type: string + has_recovery_email_address: + description: 'Optional. True, if a recovery email address has been set up.' + type: boolean + required: + - authorization_state + CallbackQueryAnswer: + description: Contains a bot's answer to a callback query. + type: object + properties: + text: + description: 'Text of the answer' + type: string + show_alert: + description: 'True, if an alert should be shown to the user instead of a toast notification.' + type: boolean + url: + description: 'URL to be opened.' + type: string + required: + - text +externalDocs: + description: The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. + url: 'https://core.telegram.org/bots/api'