[{"data":1,"prerenderedAt":400},["ShallowReactive",2],{"help-article-integrations-api-rate-limits":3,"help-siblings-integrations":367},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"body":17,"_type":361,"_id":362,"_source":363,"_file":364,"_stem":365,"_extension":366},"\u002Fhelp\u002Fintegrations\u002Fapi-rate-limits","integrations",false,"","API rate limits and best practices","Understanding AIsoule API rate limits, how to handle 429 errors, and best practices for high-volume integrations.",11,"intermediate","3 minutes",[14,15,16],"\u002Fhelp\u002Fintegrations\u002Fapi-overview","\u002Fhelp\u002Fintegrations\u002Fsending-messages-api","\u002Fhelp\u002Fsettings\u002Fapi-keys",{"type":18,"children":19,"toc":343},"root",[20,29,35,42,109,114,120,125,135,171,177,182,193,200,211,217,223,228,236,242,250,256,261,267,272,278,283,289,294,327,332,338],{"type":21,"tag":22,"props":23,"children":25},"element","h1",{"id":24},"api-rate-limits",[26],{"type":27,"value":28},"text","API rate limits",{"type":21,"tag":30,"props":31,"children":32},"p",{},[33],{"type":27,"value":34},"AIsoule enforces rate limits to ensure platform stability. Here's how they work.",{"type":21,"tag":36,"props":37,"children":39},"h2",{"id":38},"default-limits",[40],{"type":27,"value":41},"Default limits",{"type":21,"tag":43,"props":44,"children":45},"table",{},[46,65],{"type":21,"tag":47,"props":48,"children":49},"thead",{},[50],{"type":21,"tag":51,"props":52,"children":53},"tr",{},[54,60],{"type":21,"tag":55,"props":56,"children":57},"th",{},[58],{"type":27,"value":59},"Limit type",{"type":21,"tag":55,"props":61,"children":62},{},[63],{"type":27,"value":64},"Value",{"type":21,"tag":66,"props":67,"children":68},"tbody",{},[69,83,96],{"type":21,"tag":51,"props":70,"children":71},{},[72,78],{"type":21,"tag":73,"props":74,"children":75},"td",{},[76],{"type":27,"value":77},"Requests per minute",{"type":21,"tag":73,"props":79,"children":80},{},[81],{"type":27,"value":82},"100",{"type":21,"tag":51,"props":84,"children":85},{},[86,91],{"type":21,"tag":73,"props":87,"children":88},{},[89],{"type":27,"value":90},"Requests per second (burst)",{"type":21,"tag":73,"props":92,"children":93},{},[94],{"type":27,"value":95},"10",{"type":21,"tag":51,"props":97,"children":98},{},[99,104],{"type":21,"tag":73,"props":100,"children":101},{},[102],{"type":27,"value":103},"Max request body size",{"type":21,"tag":73,"props":105,"children":106},{},[107],{"type":27,"value":108},"5 MB",{"type":21,"tag":30,"props":110,"children":111},{},[112],{"type":27,"value":113},"These limits apply per API key.",{"type":21,"tag":36,"props":115,"children":117},{"id":116},"rate-limit-headers",[118],{"type":27,"value":119},"Rate limit headers",{"type":21,"tag":30,"props":121,"children":122},{},[123],{"type":27,"value":124},"Every API response includes these headers:",{"type":21,"tag":126,"props":127,"children":129},"pre",{"code":128},"X-RateLimit-Limit: 100\nX-RateLimit-Remaining: 87\nX-RateLimit-Reset: 1716984000\n",[130],{"type":21,"tag":131,"props":132,"children":133},"code",{"__ignoreMap":7},[134],{"type":27,"value":128},{"type":21,"tag":136,"props":137,"children":138},"ul",{},[139,151,161],{"type":21,"tag":140,"props":141,"children":142},"li",{},[143,149],{"type":21,"tag":144,"props":145,"children":146},"strong",{},[147],{"type":27,"value":148},"Limit",{"type":27,"value":150}," — Your total allowed requests per window",{"type":21,"tag":140,"props":152,"children":153},{},[154,159],{"type":21,"tag":144,"props":155,"children":156},{},[157],{"type":27,"value":158},"Remaining",{"type":27,"value":160}," — How many requests you have left",{"type":21,"tag":140,"props":162,"children":163},{},[164,169],{"type":21,"tag":144,"props":165,"children":166},{},[167],{"type":27,"value":168},"Reset",{"type":27,"value":170}," — Unix timestamp when the window resets",{"type":21,"tag":36,"props":172,"children":174},{"id":173},"handling-429-too-many-requests",[175],{"type":27,"value":176},"Handling 429 (Too Many Requests)",{"type":21,"tag":30,"props":178,"children":179},{},[180],{"type":27,"value":181},"When you exceed the limit, you'll receive:",{"type":21,"tag":126,"props":183,"children":188},{"code":184,"language":185,"meta":7,"className":186},"HTTP 429 Too Many Requests\n{\n  \"message\": \"Rate limit exceeded. Try again in 30 seconds.\",\n  \"status\": \"error\"\n}\n","json",[187],"language-json",[189],{"type":21,"tag":131,"props":190,"children":191},{"__ignoreMap":7},[192],{"type":27,"value":184},{"type":21,"tag":194,"props":195,"children":197},"h3",{"id":196},"recommended-retry-strategy",[198],{"type":27,"value":199},"Recommended retry strategy",{"type":21,"tag":126,"props":201,"children":206},{"code":202,"language":203,"meta":7,"className":204},"async function apiCallWithRetry(url, options, maxRetries = 3) {\n  for (let i = 0; i \u003C maxRetries; i++) {\n    const response = await fetch(url, options);\n    \n    if (response.status === 429) {\n      const retryAfter = response.headers.get('Retry-After') || 30;\n      await sleep(retryAfter * 1000);\n      continue;\n    }\n    \n    return response;\n  }\n  throw new Error('Max retries exceeded');\n}\n","javascript",[205],"language-javascript",[207],{"type":21,"tag":131,"props":208,"children":209},{"__ignoreMap":7},[210],{"type":27,"value":202},{"type":21,"tag":36,"props":212,"children":214},{"id":213},"best-practices-for-high-volume-usage",[215],{"type":27,"value":216},"Best practices for high-volume usage",{"type":21,"tag":194,"props":218,"children":220},{"id":219},"_1-batch-operations",[221],{"type":27,"value":222},"1. Batch operations",{"type":21,"tag":30,"props":224,"children":225},{},[226],{"type":27,"value":227},"Instead of creating contacts one-by-one, use bulk endpoints:",{"type":21,"tag":126,"props":229,"children":231},{"code":230},"POST \u002Fapi\u002Fcontacts\u002Fbulk\n",[232],{"type":21,"tag":131,"props":233,"children":234},{"__ignoreMap":7},[235],{"type":27,"value":230},{"type":21,"tag":194,"props":237,"children":239},{"id":238},"_2-implement-exponential-backoff",[240],{"type":27,"value":241},"2. Implement exponential backoff",{"type":21,"tag":126,"props":243,"children":245},{"code":244},"Retry 1: wait 1 second\nRetry 2: wait 2 seconds\nRetry 3: wait 4 seconds\nRetry 4: wait 8 seconds\n",[246],{"type":21,"tag":131,"props":247,"children":248},{"__ignoreMap":7},[249],{"type":27,"value":244},{"type":21,"tag":194,"props":251,"children":253},{"id":252},"_3-cache-responses",[254],{"type":27,"value":255},"3. Cache responses",{"type":21,"tag":30,"props":257,"children":258},{},[259],{"type":27,"value":260},"Don't fetch the same data repeatedly. Cache contact lists, templates, etc. locally.",{"type":21,"tag":194,"props":262,"children":264},{"id":263},"_4-use-webhooks-instead-of-polling",[265],{"type":27,"value":266},"4. Use webhooks instead of polling",{"type":21,"tag":30,"props":268,"children":269},{},[270],{"type":27,"value":271},"Instead of checking for new messages every second, set up webhooks to receive them in real-time.",{"type":21,"tag":194,"props":273,"children":275},{"id":274},"_5-spread-requests-over-time",[276],{"type":27,"value":277},"5. Spread requests over time",{"type":21,"tag":30,"props":279,"children":280},{},[281],{"type":27,"value":282},"If you need to send 1,000 messages, spread them over 10 minutes (100\u002Fmin) instead of all at once.",{"type":21,"tag":36,"props":284,"children":286},{"id":285},"metas-limits-separate-from-aisoule",[287],{"type":27,"value":288},"Meta's limits (separate from AIsoule)",{"type":21,"tag":30,"props":290,"children":291},{},[292],{"type":27,"value":293},"In addition to AIsoule's API limits, Meta has its own:",{"type":21,"tag":136,"props":295,"children":296},{},[297,307,317],{"type":21,"tag":140,"props":298,"children":299},{},[300,305],{"type":21,"tag":144,"props":301,"children":302},{},[303],{"type":27,"value":304},"Messaging limits",{"type":27,"value":306}," — Unique contacts per day (tier-based)",{"type":21,"tag":140,"props":308,"children":309},{},[310,315],{"type":21,"tag":144,"props":311,"children":312},{},[313],{"type":27,"value":314},"Template submission",{"type":27,"value":316}," — Max 100 templates per hour",{"type":21,"tag":140,"props":318,"children":319},{},[320,325],{"type":21,"tag":144,"props":321,"children":322},{},[323],{"type":27,"value":324},"Media upload",{"type":27,"value":326}," — Max 500 uploads per day",{"type":21,"tag":30,"props":328,"children":329},{},[330],{"type":27,"value":331},"These are enforced by Meta regardless of AIsoule's limits.",{"type":21,"tag":36,"props":333,"children":335},{"id":334},"need-higher-limits",[336],{"type":27,"value":337},"Need higher limits?",{"type":21,"tag":30,"props":339,"children":340},{},[341],{"type":27,"value":342},"Contact support if you need increased rate limits for your use case. Enterprise plans may include higher limits.",{"title":7,"searchDepth":344,"depth":344,"links":345},2,[346,347,348,352,359,360],{"id":38,"depth":344,"text":41},{"id":116,"depth":344,"text":119},{"id":173,"depth":344,"text":176,"children":349},[350],{"id":196,"depth":351,"text":199},3,{"id":213,"depth":344,"text":216,"children":353},[354,355,356,357,358],{"id":219,"depth":351,"text":222},{"id":238,"depth":351,"text":241},{"id":252,"depth":351,"text":255},{"id":263,"depth":351,"text":266},{"id":274,"depth":351,"text":277},{"id":285,"depth":344,"text":288},{"id":334,"depth":344,"text":337},"markdown","content:help:integrations:api-rate-limits.md","content","help\u002Fintegrations\u002Fapi-rate-limits.md","help\u002Fintegrations\u002Fapi-rate-limits","md",[368,370,371,374,377,380,383,385,388,391,394,397],{"_path":14,"title":369},"REST API overview and authentication",{"_path":4,"title":8},{"_path":372,"title":373},"\u002Fhelp\u002Fintegrations\u002Fcustom-js-actions","Using the JavaScript VM for custom actions",{"_path":375,"title":376},"\u002Fhelp\u002Fintegrations\u002Ferror-codes","Error codes reference",{"_path":378,"title":379},"\u002Fhelp\u002Fintegrations\u002Fpayment-gateway","Payment gateway setup (Razorpay\u002FStripe)",{"_path":381,"title":382},"\u002Fhelp\u002Fintegrations\u002Fproduct-catalog-sync","Product catalog sync from Meta",{"_path":15,"title":384},"Sending messages via API",{"_path":386,"title":387},"\u002Fhelp\u002Fintegrations\u002Fsending-messages-api-templates","Sending messages via API (advanced)",{"_path":389,"title":390},"\u002Fhelp\u002Fintegrations\u002Fwebhook-events","Webhook event types reference",{"_path":392,"title":393},"\u002Fhelp\u002Fintegrations\u002Fwebhooks-receiving","Receiving messages via webhooks",{"_path":395,"title":396},"\u002Fhelp\u002Fintegrations\u002Fwoocommerce","WooCommerce integration setup",{"_path":398,"title":399},"\u002Fhelp\u002Fintegrations\u002Fzapier-pabbly","Connecting with Zapier and Pabbly Connect",1780423187311]