{"openapi": "3.1.0", "info": {"title": "Kavosh API", "description": "API عمومی کاوش برای ساخت و مدیریت کمپین‌های اینستاگرام (فالو، دایرکت، کامنت، منشن، لایک، هشتگ و ...) و دریافت نتیجه‌ی هر شرکت‌کننده. احراز هویت با کلید API (`Authorization: Bearer kv_live_…`). نتیجه‌ی شرکت‌کننده‌هایی که همه‌ی مأموریت‌ها را کامل کرده‌اند با وب‌هوک به سرور شما فرستاده می‌شود. آدرس وب‌هوک در پنل کاوش ثبت می‌شود، نه با این API. ساخت حساب و کلید فعلاً با تیم کاوش است.", "version": "2.0.0"}, "servers": [{"url": "https://api.kavoshapi.com", "description": "سرور اصلی"}], "paths": {"/v2/campaign-types": {"get": {"tags": ["کاتالوگ"], "summary": "فهرست نوع مأموریت‌ها و محدودیت‌ها", "x-summary-en": "List mission types and limits", "description": "همه‌ی ۱۹ نوع مأموریتی که یک کمپین می‌تواند داشته باشد، با ورودی‌های `rules` هر کدام، گروه (`page` یا `public`) و محدودیت‌های فعلی کمپین. این پاسخ منبع زنده‌ی حقیقت است: فهرست نوع‌ها و عددهای محدودیت را از اینجا بخوانید، نه از متن مستندات.\n\n- `disabled=true`: آن نوع موقتاً از سوی کاوش بسته است. ساخت یا شروع کمپین با آن 409 می‌دهد؛ دلیلش در `disabled_reason` است.\n- `needs_page=true`: فقط کمپین `kind=page` (روی پیج متصل) آن را می‌پذیرد.\n- `fields`: فهرست کلیدهای `rules` همان نوع، با برچسب، الزامی بودن و محدودیت‌ها.", "operationId": "listCampaignTypes", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignTypes"}, "examples": {"example": {"summary": "نمونه", "value": {"types": [{"code": "ig_like", "label": "لایک پست", "info": "کاربر باید پست (یا همه‌ی پست‌های) انتخاب‌شده را لایک کند.", "rule": "لایک همه‌ی پست‌های انتخاب‌شده.", "fields": [{"key": "post_codes", "label": "پست‌هایی که باید لایک شوند", "required": true, "ltr": true, "max_items": 5}], "needs_page": false, "group": "public", "requires": "standard", "disabled": false}, {"code": "ig_share", "label": "اشتراک پست یا ریل در دایرکت", "info": "کاربر یک پست یا ریل پیج را به دایرکت پیج می‌فرستد.", "rule": "فرستادن یکی از پست‌ها یا ریل‌های پیج به دایرکت خود پیج.", "fields": [], "needs_page": true, "group": "page", "disabled": true, "disabled_reason": "موقتاً در دسترس نیست"}], "groups": [{"code": "page", "label": "با پیج متصل", "needs_page": true, "info": "مأموریت‌هایی که از اتصال رسمی پیج شما خوانده می‌شوند.", "types": ["ig_follow", "ig_dm_keyword", "ig_comment_kw", "ig_story_reply", "ig_story_mention", "ig_share"]}, {"code": "public", "label": "بدون اتصال پیج", "needs_page": false, "info": "مأموریت‌هایی که کاوش خودش بررسی می‌کند.", "types": ["ig_like", "ig_tag_post"]}], "limits": {"max_missions_per_campaign": 10, "max_days": 90, "keyword_max_length": 60, "max_keywords_per_mission": 10, "max_posts_per_mission": 20, "max_like_posts_per_mission": 5, "max_comment_posts_per_mission": 5, "max_mentions": 10, "reply_text_max_length": 500, "missions_change_cooldown_hours": 72, "info": "هر کمپین حداکثر ۱۰ مأموریت و حداکثر ۹۰ روز دارد."}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/pages": {"get": {"tags": ["پیج‌ها"], "summary": "پیج‌های اینستاگرام متصل", "x-summary-en": "List connected Instagram pages", "description": "پیج‌هایی که در پنل به حساب شما وصل شده‌اند. `id` هر پیج همان `page_id` کمپین `kind=page` است. اتصال پیج فقط از پنل انجام می‌شود و با این API ممکن نیست.\n\nاگر `needs_reconnect=true` باشد اتصال پیج قطع شده و باید از پنل دوباره وصل شود؛ تا آن موقع کمپین‌های روی آن پیج رویدادی نمی‌گیرند.", "operationId": "listPages", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Page"}, "type": "array"}, "examples": {"example": {"summary": "نمونه", "value": [{"id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "username": "example_page", "is_active": true, "last_event_at": "2026-12-03T10:02:11+00:00", "needs_reconnect": false, "reconnect_reason": null}]}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns": {"get": {"tags": ["کمپین‌ها"], "summary": "فهرست کمپین‌ها", "x-summary-en": "List campaigns", "description": "همه‌ی کمپین‌های حساب، تازه‌ترین اول، هر کدام با مأموریت‌ها و آمار. این فهرست صفحه‌بندی ندارد و فیلتر هم ندارد.\n\n`status` یکی از `draft`، `scheduled`، `active`، `paused`، `ended`، `stopped` است.", "operationId": "listCampaigns", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Campaign"}, "type": "array"}, "examples": {"example": {"summary": "نمونه", "value": [{"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "active", "status_reason": null, "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-15T08:00:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 41.25, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 118, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 64, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 240, "completed": 61, "notified": 60, "notify_failed": 1, "by_done": [0, 179, 61], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}, {"id": "c1b7e0a4-3f52-4d6e-9a18-5b2f7c9d0e11", "title": "قرعه‌کشی یلدا", "status": "draft", "status_reason": null, "kind": "public", "page_username": null, "account_id": null, "starts_at": null, "ends_at": null, "created_at": "2026-11-17T09:30:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 0.0, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_like", "label": "لایک پست", "rules": {"post_codes": ["DAx91kLs2"]}, "done_count": 0, "page_id": null, "account_id": null, "page_username": null}], "participants": 0, "completed": 0, "notified": 0, "notify_failed": 0, "by_done": [0, 0], "quality": null}]}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}, "post": {"tags": ["کمپین‌ها"], "summary": "ساخت کمپین", "x-summary-en": "Create a campaign", "description": "یک کمپین با ۱ تا ۱۰ مأموریت می‌سازد.\n\n- `kind=public`: بدون پیج. فقط مأموریت‌هایی که کاوش خودش بررسی می‌کند (لایک، کامنت، منشن، هشتگ، ریپست و ...). `page_id` نادیده گرفته می‌شود و هیچ مأموریتی نمی‌تواند پیج بخواهد.\n- `kind=page`: روی پیجی که در پنل وصل کرده‌اید؛ `page_id` از `GET /v2/pages`. همه‌ی نوع‌ها مجازند.\n- `start`: `now` (پیش‌فرض: کمپین همین الان فعال می‌شود و ساعت پایش پلن مصرف می‌شود)، `schedule` (با `starts_at` در آینده) یا `draft` (فقط ذخیره می‌شود؛ چیزی شروع نمی‌شود، هزینه‌ای ندارد و بعداً با `start` شروع می‌شود).\n- پایان: `ends_at` یا `days` (۱ تا ۹۰). برای `now` و `schedule` یکی از این دو لازم است. حداکثر طول کمپین ۹۰ روز است.\n- `rules` هر نوع در `MissionSpec` و در `GET /v2/campaign-types` آمده است؛ ورودی ناقص 422 می‌دهد.\n- `quality`: فیلتر اصالت اختیاری روی شرکت‌کننده‌ها.\n\nاین عملیات ایدمپوتنت نیست: اگر بعد از timeout دوباره بفرستید ممکن است دو کمپین ساخته شود. اول `GET /v2/campaigns` را بخوانید.", "operationId": "createCampaign", "x-kavosh-effect": "write", "x-kavosh-consequence": {"fa": "با `start=now` (پیش‌فرض) کمپین فوراً شروع می‌شود و ساعت پایش پلن مصرف می‌کند. کمپین حذف نمی‌شود، فقط پایان می‌یابد. برای امتحان `start=draft` بفرستید.", "en": "With the default `start=now` the campaign starts at once and consumes plan monitoring hours. Campaigns cannot be deleted. Send `start=draft` to try."}, "security": [{"ApiKey": []}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignCreate"}, "examples": {"draft_like": {"summary": "کمپین پیش‌نویس (چیزی شروع نمی‌شود)", "value": {"title": "قرعه‌کشی یلدا", "kind": "public", "start": "draft", "missions": [{"mission_type": "ig_like", "rules": {"post_urls": ["https://www.instagram.com/p/DAx91kLs2/"]}}]}}, "page_follow_dm": {"summary": "کمپین روی پیج متصل: فالو و کلمه‌ی کلیدی (۱۴ روز، همین الان شروع می‌شود)", "value": {"title": "جشنواره‌ی شب یلدا", "kind": "page", "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "start": "now", "days": 14, "missions": [{"mission_type": "ig_follow", "rules": {"keywords": ["فالو کردم"]}}, {"mission_type": "ig_story_mention", "rules": {"keep_hours": 6}}]}}, "public_comment_mention": {"summary": "کمپین بدون پیج: کامنت و منشن زیر یک پست، با فیلتر اصالت", "value": {"title": "کامنت و منشن", "kind": "public", "start": "schedule", "starts_at": "2026-12-20T18:00:00Z", "ends_at": "2026-12-27T18:00:00Z", "missions": [{"mission_type": "ig_comment", "rules": {"post_urls": ["https://www.instagram.com/p/DAx91kLs2/"]}}, {"mission_type": "ig_mention", "rules": {"post_urls": ["https://www.instagram.com/p/DAx91kLs2/"], "min_mentions": 2}}], "quality": {"mode": "flag", "min_followers": 50, "require_profile_pic": true}}}}}}, "required": true, "description": "بدنه‌ی JSON."}, "responses": {"201": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "c1b7e0a4-3f52-4d6e-9a18-5b2f7c9d0e11", "title": "قرعه‌کشی یلدا", "status": "draft", "status_reason": null, "kind": "public", "page_username": null, "account_id": null, "starts_at": null, "ends_at": null, "created_at": "2026-11-17T09:30:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 0.0, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_like", "label": "لایک پست", "rules": {"post_codes": ["DAx91kLs2"]}, "done_count": 0, "page_id": null, "account_id": null, "page_username": null}], "participants": 0, "completed": 0, "notified": 0, "notify_failed": 0, "by_done": [0, 0], "quality": null}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "402": {"description": "پلن حساب فعال نیست (منقضی یا غیرفعال شده). برای تمدید با کاوش تماس بگیرید.", "x-when-en": "The account's plan is not active (expired or disabled). Contact Kavosh to renew.", "x-error-codes": ["plan_expired"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "plan_expired", "message": "plan is not active; contact Kavosh support"}}}}}}, "409": {"description": "کمپین همین الان ساخته نمی‌شود: کلمه‌ی کلیدی یا «هر پیام» با کمپین زنده‌ی دیگری روی همان پیج هم‌پوشانی دارد، سقف کمپین‌های فعال یا ساعت پایش پلن پر است (فقط با `start=now`)، یا نوعی از مأموریت‌ها از سوی کاوش موقتاً بسته است.", "x-when-en": "The campaign cannot be created now: a keyword or 'any message' overlaps another live campaign on the same page, the plan's active-campaign or monitoring-hour limit is reached (only with `start=now`), or a mission type is temporarily switched off by Kavosh.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "keyword «فالو کردم» is already used by campaign «جشنواره» on this page"}}}}}}, "422": {"description": "ورودی معتبر نیست: شکل بدنه غلط (`{\"detail\": [...]}`) یا قانونی رد شده (`{\"error\": \"invalid_input\"}`)؛ مثلاً `rules` ناقص، پیج متصل نیست، زمان پایان درست نیست، یا حساب هنوز پلن ندارد.", "x-when-en": "Invalid input: wrong body shape (`{\"detail\": [...]}`) or a rule rejected it (`{\"error\": \"invalid_input\"}`), e.g. incomplete `rules`, page not connected, bad end time, or the account has no plan yet.", "x-error-codes": ["invalid_input"], "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/Error"}, {"$ref": "#/components/schemas/HTTPValidationError"}]}, "examples": {"invalid_input": {"summary": "قانونی رد کرد", "value": {"error": "invalid_input", "message": "ig_like needs at least one post link"}}, "validation": {"summary": "شکل ورودی غلط", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}": {"get": {"tags": ["کمپین‌ها"], "summary": "جزئیات کمپین", "x-summary-en": "Get a campaign", "description": "یک کمپین با مأموریت‌ها و آمار. کمپین حساب دیگران 404 می‌دهد، نه 403.", "operationId": "getCampaign", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "active", "status_reason": null, "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-15T08:00:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 41.25, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 118, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 64, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 240, "completed": 61, "notified": 60, "notify_failed": 1, "by_done": [0, 179, 61], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}, "patch": {"tags": ["کمپین‌ها"], "summary": "ویرایش نام، پایان، پاسخ‌ها یا فیلتر اصالت", "x-summary-en": "Edit title, end time, replies or quality filter", "description": "فقط فیلدهایی که می‌فرستید عوض می‌شوند: `title`، `ends_at`، `reply_progress`، `reply_done` و `quality`. برای خاموش کردن فیلتر اصالت `\"quality\": null` را صریح بفرستید. مأموریت‌ها با `PUT .../missions` عوض می‌شوند.\n\n`ends_at` باید در آینده و بعد از شروع باشد و از شروع بیش از ۹۰ روز فاصله نداشته باشد. کمپین تمام‌شده (`ended` یا `stopped`) تغییر نمی‌کند (409).", "operationId": "updateCampaign", "x-kavosh-effect": "write", "x-kavosh-consequence": {"fa": "تغییر ماندگار است؛ برگرداندن با یک PATCH دیگر ممکن است.", "en": "The change is persistent; a second PATCH can undo it."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignUpdate"}, "examples": {"rename_and_extend": {"summary": "تغییر نام و تمدید پایان", "value": {"title": "قرعه‌کشی یلدا (تمدید شد)", "ends_at": "2026-12-30T20:30:00Z"}}, "turn_filter_off": {"summary": "خاموش کردن فیلتر اصالت (با `null` صریح)", "value": {"quality": null}}}}}, "description": "بدنه‌ی JSON."}, "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "c1b7e0a4-3f52-4d6e-9a18-5b2f7c9d0e11", "title": "قرعه‌کشی یلدا (تمدید شد)", "status": "draft", "status_reason": null, "kind": "public", "page_username": null, "account_id": null, "starts_at": null, "ends_at": null, "created_at": "2026-11-17T09:30:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 0.0, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_like", "label": "لایک پست", "rules": {"post_codes": ["DAx91kLs2"]}, "done_count": 0, "page_id": null, "account_id": null, "page_username": null}], "participants": 0, "completed": 0, "notified": 0, "notify_failed": 0, "by_done": [0, 0], "quality": null}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "کمپین تمام شده است (`ended` یا `stopped`) و دیگر تغییر نمی‌کند.", "x-when-en": "The campaign is finished (`ended` or `stopped`) and can no longer change.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "campaign is finished"}}}}}}, "422": {"description": "ورودی معتبر نیست: شکل بدنه یا شناسه غلط (`{\"detail\": [...]}`)، یا `ends_at` گذشته، قبل از شروع، یا بیش از ۹۰ روز بعد است (`{\"error\": \"invalid_input\"}`).", "x-when-en": "Invalid input: wrong body shape or id (`{\"detail\": [...]}`), or `ends_at` is in the past, before the start, or more than 90 days after it (`{\"error\": \"invalid_input\"}`).", "x-error-codes": ["invalid_input"], "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/Error"}, {"$ref": "#/components/schemas/HTTPValidationError"}]}, "examples": {"invalid_input": {"summary": "قانونی رد کرد", "value": {"error": "invalid_input", "message": "ends_at must be in the future and after the start"}}, "validation": {"summary": "شکل ورودی غلط", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/missions": {"put": {"tags": ["کمپین‌ها"], "summary": "تغییر مأموریت‌های کمپین (حداکثر هر ۷۲ ساعت یک بار)", "x-summary-en": "Replace the campaign's missions (at most once per 72 hours)", "description": "کل فهرست مأموریت‌ها را جایگزین می‌کند، نه اینکه تکه‌ای ویرایشش کند: بدنه همان `missions` ساخت کمپین است.\n\n- مأموریتی که دقیقاً همان نوع، `rules` و پیج را دارد همان ردیف و شناسه و پیشرفت را نگه می‌دارد؛ بقیه حذف و دوباره ساخته می‌شوند و پیشرفت شرکت‌کننده‌ها روی مأموریت‌های حذف‌شده پاک می‌شود.\n- بعد از هر تغییر موفق، ۷۲ ساعت نمی‌توانید دوباره مأموریت‌ها را عوض کنید (409). این بازه‌ی انتظار برگشت‌پذیر نیست.\n- کمپین تمام‌شده تغییر نمی‌کند (409).", "operationId": "replaceCampaignMissions", "x-kavosh-effect": "cooldown", "x-kavosh-consequence": {"fa": "بعد از موفقیت ۷۲ ساعت قفل می‌شود و پیشرفت مأموریت‌های حذف‌شده برای همیشه پاک می‌شود. مطمئن نیستید؟ اول `GET` کمپین را بخوانید.", "en": "After a success the missions are locked for 72 hours and progress on removed missions is permanently erased."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignMissionsChange"}, "examples": {"swap_post": {"summary": "جایگزینی کامل فهرست مأموریت‌ها (پست دیگر)", "value": {"missions": [{"mission_type": "ig_like", "rules": {"post_urls": ["https://www.instagram.com/reel/DBy04Pqe7/"]}}]}}}}}, "description": "بدنه‌ی JSON."}, "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "active", "status_reason": null, "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-15T08:00:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 41.25, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 118, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 64, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 240, "completed": 61, "notified": 60, "notify_failed": 1, "by_done": [0, 179, 61], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "کمپین تمام شده، یا کمتر از ۷۲ ساعت از تغییر قبلی مأموریت‌ها گذشته، یا کلمه‌ی کلیدی با کمپین زنده‌ی دیگری روی همان پیج هم‌پوشانی دارد، یا نوعی از مأموریت‌ها موقتاً از سوی کاوش بسته است.", "x-when-en": "The campaign is finished, or less than 72 hours passed since the last mission change, or a keyword overlaps another live campaign on the same page, or a mission type is temporarily switched off by Kavosh.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "missions were changed recently; try again in about 70h (at most once every 72 hours)"}}}}}}, "422": {"description": "ورودی معتبر نیست: یا شکل بدنه غلط است (`{\"detail\": [...]}`) یا یک قانون کسب‌وکاری رد شده (`{\"error\": \"invalid_input\"}`).", "x-when-en": "The input is invalid: either the body shape is wrong (`{\"detail\": [...]}`) or a business rule rejected it (`{\"error\": \"invalid_input\"}`).", "x-error-codes": ["invalid_input"], "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/Error"}, {"$ref": "#/components/schemas/HTTPValidationError"}]}, "examples": {"invalid_input": {"summary": "قانونی رد کرد", "value": {"error": "invalid_input", "message": "ig_like needs at least one post link"}}, "validation": {"summary": "شکل ورودی غلط", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/start": {"post": {"tags": ["چرخه‌ی کمپین"], "summary": "شروع یا ادامه‌ی کمپین", "x-summary-en": "Start or resume a campaign", "description": "کمپین `draft`، `scheduled` یا `paused` را همین الان فعال می‌کند. از وضعیت‌های دیگر 409 می‌دهد.\n\n- کمپین `draft` اگر پایان نداشته باشد ۱۴ روز می‌گیرد؛ اگر `ends_at` داشته باشد طول برنامه‌ریزی‌شده حفظ می‌شود.\n- 409 وقتی که سقف کمپین‌های فعال پلن یا ساعت پایش پلن پر است، کلمه‌ی کلیدی با کمپین زنده‌ی دیگری روی همان پیج هم‌پوشانی دارد، نوعی از مأموریت‌ها موقتاً بسته است، یا `ends_at` گذشته است.\n- 402 وقتی پلن فعال نیست.", "operationId": "startCampaign", "x-kavosh-effect": "write", "x-kavosh-consequence": {"fa": "ساعت پایش پلن از لحظه‌ی شروع مصرف می‌شود. شروع دوباره‌ی کمپینی که `paused` است، آمار قبلی‌اش را حفظ می‌کند.", "en": "Plan monitoring hours are consumed from the moment it starts."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "active", "status_reason": null, "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-15T08:00:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 0.0, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 0, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 0, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 0, "completed": 0, "notified": 0, "notify_failed": 0, "by_done": [0, 0, 0], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "402": {"description": "پلن حساب فعال نیست (منقضی یا غیرفعال شده). برای تمدید با کاوش تماس بگیرید.", "x-when-en": "The account's plan is not active (expired or disabled). Contact Kavosh to renew.", "x-error-codes": ["plan_expired"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "plan_expired", "message": "plan is not active; contact Kavosh support"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "کمپین در وضعیتی است که شروع نمی‌شود (فقط `draft`، `scheduled` و `paused`)، سقف کمپین‌های فعال یا ساعت پایش پلن پر است، کلمه‌ی کلیدی هم‌پوشان دارد، نوعی از مأموریت‌ها موقتاً بسته است، یا زمان پایان کمپین گذشته است.", "x-when-en": "The campaign is in a state that cannot start (only `draft`, `scheduled`, `paused`), the plan's active-campaign or monitoring-hour limit is reached, a keyword overlaps, a mission type is temporarily off, or the end time has passed.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "campaign end has passed; extend ends_at first"}}}}}}, "422": {"description": "شناسه UUID نیست (`{\"detail\": [...]}`)، یا حساب هنوز پلن ندارد (`{\"error\": \"invalid_input\"}`).", "x-when-en": "The id is not a UUID (`{\"detail\": [...]}`), or the account has no plan yet (`{\"error\": \"invalid_input\"}`).", "x-error-codes": ["invalid_input"], "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/Error"}, {"$ref": "#/components/schemas/HTTPValidationError"}]}, "examples": {"invalid_input": {"summary": "قانونی رد کرد", "value": {"error": "invalid_input", "message": "ig_like needs at least one post link"}}, "validation": {"summary": "شکل ورودی غلط", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/pause": {"post": {"tags": ["چرخه‌ی کمپین"], "summary": "توقف موقت کمپین", "x-summary-en": "Pause a campaign", "description": "کمپین `active` را متوقف می‌کند (`status=paused`، `status_reason=paused_by_user`). مصرف ساعت پایش می‌ایستد. با `start` ادامه می‌یابد.", "operationId": "pauseCampaign", "x-kavosh-effect": "write", "x-kavosh-consequence": {"fa": "برگشت‌پذیر با `start`؛ ولی هنگام ادامه سقف کمپین‌های فعال و ساعت پایش دوباره بررسی می‌شود و ممکن است 409 بدهد.", "en": "Reversible with `start`; on resume the plan limits are checked again and may return 409."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "paused", "status_reason": "paused_by_user", "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-15T08:00:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 41.25, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 118, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 64, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 240, "completed": 61, "notified": 60, "notify_failed": 1, "by_done": [0, 179, 61], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "فقط کمپینِ `active` را می‌شود موقتاً متوقف کرد.", "x-when-en": "Only an `active` campaign can be paused.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "cannot pause a draft campaign"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/stop": {"post": {"tags": ["چرخه‌ی کمپین"], "summary": "پایان کمپین", "x-summary-en": "Stop a campaign", "description": "کمپین را برای همیشه تمام می‌کند (`status=stopped`، `status_reason=stopped_by_user`) و `ends_at` را اگر در آینده بود به همین لحظه می‌آورد. کمپین `ended` یا `stopped` دوباره 409 می‌دهد. شرکت‌کننده‌هایی که قبلاً کامل شده‌اند همچنان نتیجه‌شان را می‌گیرند.", "operationId": "stopCampaign", "x-kavosh-effect": "irreversible", "x-kavosh-consequence": {"fa": "برگشت‌ناپذیر: کمپین متوقف‌شده دیگر شروع نمی‌شود و حذف هم نمی‌شود. اگر فقط می‌خواهید مکث کنید `pause` بزنید.", "en": "Irreversible: a stopped campaign never starts again and is not deleted. To only pause, use `pause`."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "title": "جشنواره‌ی شب یلدا", "status": "stopped", "status_reason": "stopped_by_user", "kind": "page", "page_username": "example_page", "account_id": "acc_example_01", "starts_at": "2026-12-01T08:00:00Z", "ends_at": "2026-12-05T11:20:00Z", "created_at": "2026-12-01T08:00:00Z", "reply_progress": "{done} از {total} شرط انجام شد ✅ مانده: {remaining}", "reply_done": "همه‌ی شرط‌ها انجام شد 🎉 نتیجه را در پیج اعلام می‌کنیم.", "monitoring_hours": 41.25, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "position": 0, "mission_type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "done_count": 118, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "position": 1, "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "done_count": 64, "page_id": "9b6c1d3e-5f07-4a82-b4e9-2c8d7a1f0b55", "account_id": "acc_example_01", "page_username": "example_page"}], "participants": 240, "completed": 61, "notified": 60, "notify_failed": 1, "by_done": [0, 179, 61], "quality": {"mode": "flag", "min_age_months": null, "iran_only": false, "min_followers": 50, "min_posts": null, "min_following": null, "min_follower_ratio": null, "require_profile_pic": true}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "کمپین پیش‌تر تمام شده است (`ended` یا `stopped`).", "x-when-en": "The campaign is already finished (`ended` or `stopped`).", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "campaign is already finished"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/check": {"get": {"tags": ["شرکت‌کننده‌ها و استعلام"], "summary": "وضعیت یک یوزرنیم در کمپین", "x-summary-en": "Check one username in a campaign", "description": "کدام مأموریت‌های کمپین را این یوزرنیم انجام داده است.\n\n- `found=false`: هنوز هیچ اقدامی از این یوزرنیم ثبت نشده (`missions[]` همه `done=false`).\n- `completed`: همه‌ی مأموریت‌ها انجام شده. `done_count` از `total`.\n- `missions[]`: وضعیت، زمان و مدرک (`evidence`) هر مأموریت.\n- `inquiry.billable=true`: اولین استعلام این یوزرنیم در این کمپین است و یک استعلام از پلن کم شد؛ تکرار همان یوزرنیم در همان کمپین رایگان است. `inquiry.remaining` سهمیه‌ی باقی‌مانده است.\n- کمپین `draft` استعلام نمی‌پذیرد (409).\n- روی کمپین `active` که مأموریت‌های بررسی‌شونده با کاوش دارد (مثل ریپست یا لایک)، همین‌جا بررسی زنده انجام می‌شود؛ خطای بررسی به شما برنمی‌گردد ولی پاسخ می‌تواند کند باشد. timeout سمت کلاینت را ۳۰ ثانیه بگذارید.\n\nیوزرنیم بدون @ و ۱ تا ۳۰ نویسه از حروف انگلیسی، رقم، `.` و `_` است.", "operationId": "checkUsername", "x-kavosh-effect": "billable", "x-kavosh-consequence": {"fa": "اولین استعلام هر یوزرنیم در هر کمپین یک استعلام از سهمیه‌ی پلن کم می‌کند و پس گرفتنی نیست؛ بعد از پر شدن سهمیه 402 می‌دهد.", "en": "The first check of each username in each campaign consumes one plan inquiry and cannot be refunded; 402 once the quota is used up."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}, {"name": "username", "in": "query", "required": true, "schema": {"type": "string", "minLength": 1, "maxLength": 64, "description": "یوزرنیم اینستاگرام بدون @"}, "description": "یوزرنیم اینستاگرام بدون @، ۱ تا ۳۰ نویسه از حروف انگلیسی، رقم، `.` و `_`."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CheckResult"}, "examples": {"example": {"summary": "نمونه", "value": {"id": "2f9a4e68-b1c7-4d03-9e5a-6c0b8d3f7a66", "ig_user_id": "17841400000000001", "username": "sara.mze", "dm_url": "https://ig.me/m/sara.mze", "done_count": 1, "total": 2, "completed": false, "completed_at": null, "first_event_at": "2026-12-03T09:40:05Z", "last_event_at": "2026-12-03T09:40:06Z", "notify_status": null, "notify_attempts": 0, "notified_at": null, "notify_error": null, "followed": true, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "mission_type": "ig_follow", "label": "فالو پیج", "done": true, "done_at": "2026-12-03T09:40:06.512345+00:00", "evidence": "فالو کردم", "page_username": "example_page", "posts": null}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "done": false, "done_at": null, "evidence": null, "page_username": "example_page", "posts": null}], "campaign_id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "campaign_status": "active", "found": true, "inquiry": {"billable": true, "remaining": 959}}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "402": {"description": "اولین استعلام این یوزرنیم در این کمپین است و پلن فعال نیست (`plan_expired`)، یا سهمیه‌ی استعلام پلن تمام شده است (`quota_exceeded`). استعلام تکراری همان یوزرنیم هیچ‌وقت 402 نمی‌دهد.", "x-when-en": "This is the first check of this username in this campaign and the plan is not active (`plan_expired`) or the plan's inquiry quota is used up (`quota_exceeded`). A repeat check of the same username never returns 402.", "x-error-codes": ["plan_expired", "quota_exceeded"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "plan_expired", "message": "plan is not active; contact Kavosh support"}}, "quota_exceeded": {"summary": "سهمیه تمام شده", "value": {"error": "quota_exceeded", "message": "inquiry quota exhausted (1000/1000)"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "409": {"description": "کمپین هنوز `draft` است و استعلام ندارد.", "x-when-en": "The campaign is still a `draft` and cannot be checked.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "campaign has not started"}}}}}}, "422": {"description": "`username` نیامده یا بلندتر از ۶۴ نویسه است (`{\"detail\": [...]}`)، یا یوزرنیم معتبر نیست: ۱ تا ۳۰ نویسه از حروف انگلیسی، رقم، `.` و `_` (`{\"error\": \"invalid_input\"}`).", "x-when-en": "`username` is missing or longer than 64 characters (`{\"detail\": [...]}`), or it is not a valid handle: 1-30 characters of letters, digits, `.` and `_` (`{\"error\": \"invalid_input\"}`).", "x-error-codes": ["invalid_input"], "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/Error"}, {"$ref": "#/components/schemas/HTTPValidationError"}]}, "examples": {"invalid_input": {"summary": "قانونی رد کرد", "value": {"error": "invalid_input", "message": "username must be 1-30 chars of letters, digits, '.' or '_'"}}, "validation": {"summary": "شکل ورودی غلط", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/participants": {"get": {"tags": ["شرکت‌کننده‌ها و استعلام"], "summary": "شرکت‌کننده‌های کمپین", "x-summary-en": "List a campaign's participants", "description": "شرکت‌کننده‌های یک کمپین، آخرین فعالیت اول. صفحه‌بندی با `limit` (۱ تا ۲۰۰، پیش‌فرض ۵۰) و `offset`؛ `total` تعداد کل بعد از فیلتر است.\n\n- `status=completed`: همه‌ی مأموریت‌ها را کامل کرده؛ `in_progress`: هنوز نه؛ `notify_failed`: نتیجه‌شان با وب‌هوک تحویل نشده.\n- `q`: جست‌وجوی بخشی از یوزرنیم (بدون @).\n- `notify_status`: وضعیت ارسال وب‌هوک آن شرکت‌کننده.", "operationId": "listCampaignParticipants", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "pattern": "^(completed|in_progress|notify_failed)$"}, {"type": "null"}]}, "description": "فیلتر وضعیت: `completed` (همه‌ی مأموریت‌ها انجام شده)، `in_progress` (هنوز کامل نشده) یا `notify_failed` (نتیجه تحویل نشده)."}, {"name": "q", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}]}, "description": "بخشی از یوزرنیم اینستاگرام (بدون @ و بدون حساسیت به حروف بزرگ و کوچک)؛ حداکثر ۶۴ نویسه."}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 1, "default": 50}, "description": "تعداد ردیف در هر صفحه."}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0}, "description": "تعداد ردیفی که از ابتدا رد می‌شود."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ParticipantList"}, "examples": {"example": {"summary": "نمونه", "value": {"total": 61, "items": [{"id": "2f9a4e68-b1c7-4d03-9e5a-6c0b8d3f7a66", "ig_user_id": "17841400000000001", "username": "sara.mze", "dm_url": "https://ig.me/m/sara.mze", "done_count": 2, "total": 2, "completed": true, "completed_at": "2026-12-03T10:02:11Z", "first_event_at": "2026-12-03T09:40:05Z", "last_event_at": "2026-12-03T10:02:11Z", "notify_status": "sent", "notify_attempts": 1, "notified_at": "2026-12-03T10:02:12Z", "notify_error": null, "followed": true, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "mission_type": "ig_follow", "label": "فالو پیج", "done": true, "done_at": "2026-12-03T09:40:06.512345+00:00", "evidence": "فالو کردم", "page_username": "example_page", "posts": null}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "done": true, "done_at": "2026-12-03T10:02:11.100200+00:00", "evidence": "story_mention", "page_username": "example_page", "posts": null}], "quality_flags": [], "quality_info": null, "status_note": null}]}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپینی با این شناسه در حساب شما نیست (کمپین حساب دیگران هم همین جواب را می‌دهد).", "x-when-en": "No campaign with this id exists in your account (another account's campaign gives the same answer).", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/campaigns/{campaign_id}/participants/{participant_id}/resend": {"post": {"tags": ["شرکت‌کننده‌ها و استعلام"], "summary": "ارسال دوباره‌ی نتیجه به وب‌هوک", "x-summary-en": "Resend a participant's result to your webhook", "description": "نتیجه‌ی یک شرکت‌کننده‌ی کامل‌شده را همین الان دوباره به وب‌هوک شما می‌فرستد؛ پاسخ، وضعیت ارسال (`notify_status`) است.\n\n- فقط برای شرکت‌کننده‌ای که همه‌ی مأموریت‌ها را کامل کرده (وگرنه 404).\n- اگر نتیجه قبلاً با موفقیت تحویل شده باشد 409 می‌دهد؛ اگر ارسالش همین الان در جریان باشد هم 409.\n- `X-Kavosh-Event-Id` همان رویداد قبلی است؛ سرور شما باید تکراری‌ها را با آن حذف کند.\n- نتیجه‌ی ارسال: `sent`، `failed` یا `no_webhook` (آدرس وب‌هوکی ثبت نشده).", "operationId": "resendParticipantResult", "x-kavosh-effect": "external", "x-kavosh-consequence": {"fa": "یک وب‌هوک واقعی به سرور شما می‌فرستد. اگر سرور شما آن را دوباره پردازش کند اثرش دو بار می‌شود، مگر `X-Kavosh-Event-Id` را حذف تکراری کنید.", "en": "Sends a real webhook to your server. If your server processes it again the effect doubles, unless you deduplicate on `X-Kavosh-Event-Id`."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی کمپین (UUID)."}, {"name": "participant_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}, "description": "شناسه‌ی شرکت‌کننده (UUID، از `GET .../participants`)."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResendResult"}, "examples": {"example": {"summary": "نمونه", "value": {"notify_status": "sent"}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "کمپین در حساب شما نیست، یا این شرکت‌کننده در این کمپین نیست، یا هنوز همه‌ی مأموریت‌ها را کامل نکرده است.", "x-when-en": "The campaign is not in your account, or the participant is not in this campaign, or has not completed every mission yet.", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "participant not found"}}}}}}, "409": {"description": "نتیجه پیش‌تر با موفقیت تحویل شده، یا ارسالش همین الان در جریان است.", "x-when-en": "The result was already delivered, or its delivery is in progress right now.", "x-error-codes": ["conflict"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "conflict", "message": "result was already delivered"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}, "/v2/participants": {"get": {"tags": ["شرکت‌کننده‌ها و استعلام"], "summary": "شرکت‌کننده‌های همه‌ی کمپین‌ها", "x-summary-en": "List participants across all campaigns", "description": "شرکت‌کننده‌های همه‌ی کمپین‌های حساب، یا اگر `campaign_id` بدهید فقط یک کمپین (کمپین دیگران 404). صفحه‌بندی با `limit` (۱ تا ۵۰۰، پیش‌فرض ۵۰) و `offset`. فیلترهای `status` و `q` مثل فهرست شرکت‌کننده‌های یک کمپین‌اند. هر ردیف علاوه بر فیلدهای شرکت‌کننده، `campaign_id`، `campaign_title` و `page_username` دارد.", "operationId": "listParticipants", "x-kavosh-effect": "read", "x-kavosh-consequence": {"fa": "فقط می‌خواند؛ هیچ هزینه‌ای ندارد.", "en": "Read-only; no cost."}, "security": [{"ApiKey": []}], "parameters": [{"name": "campaign_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}]}, "description": "فقط شرکت‌کننده‌های این کمپین (UUID)؛ خالی = همه‌ی کمپین‌ها."}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "pattern": "^(completed|in_progress|notify_failed)$"}, {"type": "null"}]}, "description": "فیلتر وضعیت: `completed` (همه‌ی مأموریت‌ها انجام شده)، `in_progress` (هنوز کامل نشده) یا `notify_failed` (نتیجه تحویل نشده)."}, {"name": "q", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}]}, "description": "بخشی از یوزرنیم اینستاگرام (بدون @ و بدون حساسیت به حروف بزرگ و کوچک)؛ حداکثر ۶۴ نویسه."}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 500, "minimum": 1, "default": 50}, "description": "تعداد ردیف در هر صفحه."}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0}, "description": "تعداد ردیفی که از ابتدا رد می‌شود."}], "responses": {"200": {"description": "موفق", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ParticipantWithCampaignList"}, "examples": {"example": {"summary": "نمونه", "value": {"total": 61, "items": [{"id": "2f9a4e68-b1c7-4d03-9e5a-6c0b8d3f7a66", "ig_user_id": "17841400000000001", "username": "sara.mze", "dm_url": "https://ig.me/m/sara.mze", "done_count": 2, "total": 2, "completed": true, "completed_at": "2026-12-03T10:02:11Z", "first_event_at": "2026-12-03T09:40:05Z", "last_event_at": "2026-12-03T10:02:11Z", "notify_status": "sent", "notify_attempts": 1, "notified_at": "2026-12-03T10:02:12Z", "notify_error": null, "followed": true, "missions": [{"id": "5a3f8c20-91d4-4e7b-a6c2-d18b0f4e9a33", "mission_type": "ig_follow", "label": "فالو پیج", "done": true, "done_at": "2026-12-03T09:40:06.512345+00:00", "evidence": "فالو کردم", "page_username": "example_page", "posts": null}, {"id": "e04b6d71-2c8a-43f9-8d15-7b3a9c0e5f44", "mission_type": "ig_story_mention", "label": "منشن پیج در استوری", "done": true, "done_at": "2026-12-03T10:02:11.100200+00:00", "evidence": "story_mention", "page_username": "example_page", "posts": null}], "quality_flags": [], "quality_info": null, "status_note": null, "campaign_id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "campaign_title": "جشنواره‌ی شب یلدا", "page_username": "example_page"}]}}}}}}, "401": {"description": "کلید API نیامده، فرمتش درست نیست، باطل شده، یا صاحب حسابش غیرفعال است.", "x-when-en": "The API key is missing, malformed, revoked, or its account is inactive.", "x-error-codes": ["unauthorized"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "unauthorized", "message": "invalid api key"}}}}}}, "404": {"description": "`campaign_id` داده شده و آن کمپین در حساب شما نیست.", "x-when-en": "`campaign_id` was given and that campaign is not in your account.", "x-error-codes": ["not_found"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "not_found", "message": "campaign not found"}}}}}}, "422": {"description": "شکل ورودی غلط است، مثلاً شناسه UUID نیست یا `limit` یا `status` خارج از بازه است. بدنه: `{\"detail\": [...]}`.", "x-when-en": "The request shape is invalid, e.g. an id is not a UUID or `limit`/`status` is out of range. Body: `{\"detail\": [...]}`.", "x-error-codes": [], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}, "examples": {"validation": {"summary": "خطای اعتبارسنجی FastAPI", "value": {"detail": [{"type": "uuid_parsing", "loc": ["path", "campaign_id"], "msg": "Input should be a valid UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1", "input": "not-a-uuid"}]}}}}}}, "429": {"description": "تعداد درخواست‌های این کلید در همین دقیقه از سقف گذشته است.", "x-when-en": "This key exceeded its per-minute request limit.", "x-error-codes": ["too_many_requests"], "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}, "examples": {"error": {"summary": "نمونه", "value": {"error": "too_many_requests", "message": "درخواست بیش از حد؛ چند ثانیه بعد دوباره تلاش کنید"}}}}}}}}}}, "components": {"schemas": {"CampaignCreate": {"properties": {"title": {"type": "string", "maxLength": 255, "minLength": 1, "description": "نام کمپین (۱ تا ۲۵۵ نویسه)."}, "kind": {"type": "string", "enum": ["page", "public"], "description": "`page`: کمپین روی یک پیج متصل (`page_id` الزامی)؛ `public`: بدون پیج، فقط مأموریت‌هایی که کاوش خودش بررسی می‌کند (`page_id` نادیده گرفته می‌شود).", "default": "page"}, "page_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "description": "شناسه‌ی پیج متصل (از `GET /v2/pages`)؛ برای `kind=page` الزامی."}, "missions": {"items": {"$ref": "#/components/schemas/MissionSpec"}, "type": "array", "maxItems": 10, "minItems": 1, "description": "۱ تا ۱۰ مأموریت. همه‌ی آن‌ها باید برای شرکت‌کننده انجام شود تا نتیجه کامل حساب شود."}, "start": {"type": "string", "enum": ["now", "schedule", "draft"], "default": "now", "description": "`now` (پیش‌فرض، همین الان فعال می‌شود)، `schedule` (با `starts_at`) یا `draft` (فقط ذخیره، چیزی شروع نمی‌شود)."}, "starts_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "فقط برای `start=schedule`: زمان شروع در آینده، ISO 8601 (UTC)."}, "ends_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان پایان، ISO 8601 (UTC)؛ بعد از شروع و حداکثر ۹۰ روز بعد از آن."}, "days": {"anyOf": [{"type": "integer", "maximum": 90.0, "minimum": 1.0}, {"type": "null"}], "description": "جایگزین `ends_at`: طول کمپین به روز (۱ تا ۹۰) از لحظه‌ی شروع."}, "reply_progress": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "description": "متن دایرکت پیشرفت برای کاربر (حداکثر ۵۰۰ نویسه)؛ خالی = متن پیش‌فرض. می‌تواند `{done}`، `{total}` و `{remaining}` داشته باشد. فقط برای کمپین `kind=page` که دایرکت می‌فرستد."}, "reply_done": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "description": "متن دایرکت وقتی همه‌ی شرط‌ها انجام شد (حداکثر ۵۰۰ نویسه)؛ خالی = متن پیش‌فرض."}, "quality": {"anyOf": [{"$ref": "#/components/schemas/Quality"}, {"type": "null"}], "description": "فیلتر اصالت اختیاری؛ برای این‌که شرکت‌کننده‌ی کامل‌شده هم از آن بگذرد."}}, "type": "object", "required": ["title", "missions"], "description": "بدنه‌ی ساخت کمپین."}, "CampaignMissionsChange": {"properties": {"missions": {"items": {"$ref": "#/components/schemas/MissionSpec"}, "type": "array", "maxItems": 10, "minItems": 1, "description": "فهرست کامل جدید مأموریت‌ها (۱ تا ۱۰)؛ جایگزین فهرست قبلی می‌شود."}}, "type": "object", "required": ["missions"], "description": "بدنه‌ی جایگزینی مأموریت‌های کمپین."}, "CampaignUpdate": {"properties": {"title": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "description": "نام تازه (حداکثر ۲۵۵ نویسه)."}, "ends_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "پایان تازه؛ باید در آینده و بعد از شروع باشد و حداکثر ۹۰ روز بعد از آن."}, "reply_progress": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "description": "متن دایرکت پیشرفت (حداکثر ۵۰۰ نویسه)؛ رشته‌ی خالی = برگشت به متن پیش‌فرض."}, "reply_done": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "description": "متن دایرکت تکمیل (حداکثر ۵۰۰ نویسه)؛ رشته‌ی خالی = برگشت به متن پیش‌فرض."}, "quality": {"anyOf": [{"$ref": "#/components/schemas/Quality"}, {"type": "null"}], "description": "فیلتر اصالت؛ `null` صریح = خاموش کردن. اگر کلید `quality` را نفرستید تغییر نمی‌کند."}}, "type": "object", "description": "بدنه‌ی ویرایش کمپین؛ فقط کلیدهای فرستاده‌شده عوض می‌شوند."}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "description": "فهرست خطاهای اعتبارسنجی FastAPI، هر خطا با `loc`، `msg` و `type`."}}, "type": "object", "description": "بدنه‌ی خطای اعتبارسنجی ورودی که FastAPI می‌سازد (غیر از بدنه‌ی `Error`)."}, "MissionSpec": {"description": "یک مأموریت کمپین. شکل `rules` به `mission_type` بستگی دارد؛ هر نوع یکی از گزینه‌های `oneOf` است. فهرست زنده‌ی نوع‌ها و ورودی‌هایشان در `GET /v2/campaign-types` است.", "oneOf": [{"$ref": "#/components/schemas/FollowMission"}, {"$ref": "#/components/schemas/DmKeywordMission"}, {"$ref": "#/components/schemas/CommentKeywordMission"}, {"$ref": "#/components/schemas/StoryReplyMission"}, {"$ref": "#/components/schemas/StoryMentionMission"}, {"$ref": "#/components/schemas/ShareMission"}, {"$ref": "#/components/schemas/LikeMission"}, {"$ref": "#/components/schemas/TagPostMission"}, {"$ref": "#/components/schemas/CommentMission"}, {"$ref": "#/components/schemas/MentionMission"}, {"$ref": "#/components/schemas/HashtagCommentMission"}, {"$ref": "#/components/schemas/HashtagPostMission"}, {"$ref": "#/components/schemas/AudioReelMission"}, {"$ref": "#/components/schemas/LocationPostMission"}, {"$ref": "#/components/schemas/CollabMission"}, {"$ref": "#/components/schemas/RepostMission"}, {"$ref": "#/components/schemas/StoryMentionPublicMission"}, {"$ref": "#/components/schemas/CommentLikeMission"}, {"$ref": "#/components/schemas/CommentReplyMission"}]}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "description": "مسیر فیلد خطادار."}, "msg": {"type": "string", "description": "پیام خطا (انگلیسی)."}, "type": {"type": "string", "description": "نوع خطا."}, "input": {"description": "مقدار دریافتی (اختیاری)."}, "ctx": {"type": "object", "description": "جزئیات اضافه (اختیاری)."}}, "type": "object", "required": ["loc", "msg", "type"], "description": "یک خطا داخل `HTTPValidationError.detail`."}, "Campaign": {"properties": {"id": {"type": "string", "format": "uuid", "description": "شناسه‌ی کمپین (UUID)."}, "title": {"type": "string", "description": "نام کمپین."}, "status": {"type": "string", "description": "وضعیت: `draft` | `scheduled` | `active` | `paused` | `ended` | `stopped`."}, "status_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "دلیل وضعیت فعلی یا null. مقدارهای شناخته‌شده: `paused_by_user`، `stopped_by_user`، `ended_on_schedule`، `plan_inactive`، `hours_exhausted`، `window_passed_before_start`، و برای کمپین `scheduled` که هنوز شروع نشده: `active_campaign_limit`، `type_paused`. فهرست باز است؛ مقدار ناشناخته را به‌عنوان متن ببینید."}, "kind": {"type": "string", "description": "`page`: با پیج متصل؛ `public`: بدون پیج.", "default": "page"}, "page_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیج کمپین؛ در `kind=public` برابر null."}, "account_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی داخلی کاوش برای پیج. فقط یک مقدار مبهم است؛ تفسیرش نکنید."}, "starts_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان شروع، ISO 8601 (UTC)؛ برای پیش‌نویس‌ها null."}, "ends_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان پایان، ISO 8601 (UTC)؛ می‌تواند null باشد (پیش‌نویس)."}, "created_at": {"type": "string", "format": "date-time", "description": "زمان ساخت، ISO 8601 (UTC)."}, "reply_progress": {"type": "string", "description": "متن دایرکت پیشرفت (پیش‌فرض اگر خالی فرستاده باشید)."}, "reply_done": {"type": "string", "description": "متن دایرکت تکمیل (پیش‌فرض اگر خالی فرستاده باشید)."}, "monitoring_hours": {"type": "number", "description": "ساعتی از پایش پلن که این کمپین تا الان مصرف کرده (فقط وقتی `active` بوده)."}, "missions": {"items": {"$ref": "#/components/schemas/CampaignMission"}, "type": "array", "description": "مأموریت‌های کمپین به ترتیب `position`."}, "participants": {"type": "integer", "description": "تعداد شرکت‌کننده‌هایی که حداقل یک اقدام ثبت‌شده دارند."}, "completed": {"type": "integer", "description": "تعداد شرکت‌کننده‌هایی که همه‌ی مأموریت‌ها را کامل کرده‌اند."}, "notified": {"type": "integer", "description": "تعداد نتیجه‌هایی که با موفقیت به وب‌هوک تحویل شده‌اند."}, "notify_failed": {"type": "integer", "description": "تعداد نتیجه‌هایی که تحویل وب‌هوکشان با شکست مواجه شده."}, "by_done": {"items": {"type": "integer"}, "type": "array", "description": "`by_done[k]` = تعداد شرکت‌کننده‌هایی که دقیقاً k مأموریت را انجام داده‌اند؛ طول آن `تعداد مأموریت‌ها + 1` است."}, "quality": {"anyOf": [{"$ref": "#/components/schemas/Quality"}, {"type": "null"}], "description": "فیلتر اصالت کمپین یا null."}}, "type": "object", "required": ["id", "title", "status", "status_reason", "page_username", "account_id", "starts_at", "ends_at", "created_at", "reply_progress", "reply_done", "monitoring_hours", "missions", "participants", "completed", "notified", "notify_failed", "by_done"], "description": "یک کمپین با مأموریت‌ها و آمار."}, "CampaignMission": {"properties": {"id": {"type": "string", "format": "uuid", "description": "شناسه‌ی مأموریت (UUID). با هر جایگزینی که ردیف را عوض کند شناسه هم عوض می‌شود."}, "position": {"type": "integer", "description": "ترتیب مأموریت در کمپین، از صفر."}, "mission_type": {"type": "string", "description": "کد نوع مأموریت."}, "label": {"type": "string", "description": "نام فارسی نوع مأموریت."}, "rules": {"$ref": "#/components/schemas/MissionRulesOut", "description": "`rules` ذخیره‌شده (نرمال‌شده؛ ممکن است با ورودی شما فرق کند)."}, "done_count": {"type": "integer", "description": "چند شرکت‌کننده این مأموریت را انجام داده‌اند."}, "page_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "description": "شناسه‌ی پیج متصل این مأموریت (همان `id` در `GET /v2/pages`) یا null."}, "account_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی داخلی کاوش برای پیج. فقط یک مقدار مبهم است."}, "page_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیج این مأموریت یا null."}}, "type": "object", "required": ["id", "position", "mission_type", "label", "rules", "done_count", "page_id", "account_id", "page_username"], "description": "یک مأموریت داخل کمپین."}, "Participant": {"properties": {"id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "description": "شناسه‌ی شرکت‌کننده (UUID)."}, "ig_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی عددی اینستاگرام شرکت‌کننده به صورت رشته؛ ممکن است null باشد."}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم اینستاگرام؛ ممکن است هنوز null باشد."}, "dm_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "لینک مستقیم به دایرکت این کاربر در اینستاگرام."}, "done_count": {"type": "integer", "description": "تعداد مأموریت‌های انجام‌شده."}, "total": {"type": "integer", "description": "تعداد کل مأموریت‌های کمپین."}, "completed": {"type": "boolean", "description": "همه‌ی مأموریت‌ها انجام شده است."}, "completed_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "لحظه‌ی کامل‌شدن، ISO 8601 (UTC)، یا null."}, "first_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "اولین اقدام ثبت‌شده، ISO 8601 (UTC)."}, "last_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "آخرین اقدام ثبت‌شده، ISO 8601 (UTC)."}, "notify_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "وضعیت ارسال نتیجه به وب‌هوک: `pending` (در صف)، `sending`، `sent`، `failed`، `no_webhook` (آدرس وب‌هوک ثبت نشده) یا null (هنوز کامل نشده)."}, "notify_attempts": {"type": "integer", "description": "تعداد تلاش‌های ارسال تا الان."}, "notified_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان آخرین ارسال موفق، ISO 8601 (UTC)."}, "notify_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "کوتاه‌ترین دلیل آخرین شکست ارسال (مثلاً `http 500`)؛ متن آزاد."}, "followed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "برای کمپین دارای مأموریت فالو: آیا فالو تأیید شد؛ در غیر این صورت null."}, "missions": {"items": {"$ref": "#/components/schemas/ParticipantMission"}, "type": "array", "description": "وضعیت هر مأموریت کمپین برای این شرکت‌کننده."}, "quality_flags": {"items": {"type": "string"}, "type": "array", "description": "نشانه‌های احتیاط، نه حکم: `no_profile_pic`، `no_display_name`، `numeric_username`، `paid_check_failed`."}, "quality_info": {"anyOf": [{"$ref": "#/components/schemas/QualityInfo"}, {"type": "null"}], "description": "نتیجه‌ی فیلتر اصالت؛ null = فیلتر خاموش یا هنوز بررسی نشده."}, "status_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "`quality_rejected` = همه‌ی شرط‌ها انجام شد ولی فیلتر اصالت (حالت `block`) رد کرد؛ وگرنه null."}}, "type": "object", "required": ["id", "ig_user_id", "username", "done_count", "total", "completed", "completed_at", "first_event_at", "last_event_at", "notify_status", "notify_attempts", "notified_at", "notify_error", "followed", "missions"], "description": "یک شرکت‌کننده‌ی کمپین و پیشرفتش."}, "ParticipantMission": {"properties": {"id": {"type": "string", "format": "uuid", "description": "شناسه‌ی مأموریت (UUID)."}, "mission_type": {"type": "string", "description": "کد نوع مأموریت."}, "label": {"type": "string", "description": "نام فارسی مأموریت (برای کامنت و دایرکت با کلمه‌ی کلیدی خودش را می‌آورد)."}, "done": {"type": "boolean", "description": "این شرکت‌کننده مأموریت را انجام داده است."}, "done_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "زمان انجام. رشته‌ی ISO 8601 با افست `+00:00` و میکروثانیه؛ همیشه UTC."}, "evidence": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "مدرک انجام؛ متن آزاد و مبهم (حداکثر ۳۰۰ نویسه) و روی قالبش نباید حساب کرد."}, "page_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیج این مأموریت یا null."}, "posts": {"anyOf": [{"$ref": "#/components/schemas/PostsProgress"}, {"type": "null"}], "description": "پیشرفت روی پست‌ها وقتی مأموریت ۲ تا ۵ پست دارد و همه‌ی آن‌ها لازم است؛ وگرنه null."}}, "type": "object", "required": ["id", "mission_type", "label", "done", "done_at", "evidence"], "description": "وضعیت یک مأموریت برای یک شرکت‌کننده."}, "ParticipantWithCampaign": {"properties": {"id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "description": "شناسه‌ی شرکت‌کننده (UUID)."}, "ig_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی عددی اینستاگرام شرکت‌کننده به صورت رشته؛ ممکن است null باشد."}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم اینستاگرام؛ ممکن است هنوز null باشد."}, "dm_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "لینک مستقیم به دایرکت این کاربر در اینستاگرام."}, "done_count": {"type": "integer", "description": "تعداد مأموریت‌های انجام‌شده."}, "total": {"type": "integer", "description": "تعداد کل مأموریت‌های کمپین."}, "completed": {"type": "boolean", "description": "همه‌ی مأموریت‌ها انجام شده است."}, "completed_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "لحظه‌ی کامل‌شدن، ISO 8601 (UTC)، یا null."}, "first_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "اولین اقدام ثبت‌شده، ISO 8601 (UTC)."}, "last_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "آخرین اقدام ثبت‌شده، ISO 8601 (UTC)."}, "notify_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "وضعیت ارسال نتیجه به وب‌هوک: `pending` (در صف)، `sending`، `sent`، `failed`، `no_webhook` (آدرس وب‌هوک ثبت نشده) یا null (هنوز کامل نشده)."}, "notify_attempts": {"type": "integer", "description": "تعداد تلاش‌های ارسال تا الان."}, "notified_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان آخرین ارسال موفق، ISO 8601 (UTC)."}, "notify_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "کوتاه‌ترین دلیل آخرین شکست ارسال (مثلاً `http 500`)؛ متن آزاد."}, "followed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "برای کمپین دارای مأموریت فالو: آیا فالو تأیید شد؛ در غیر این صورت null."}, "missions": {"items": {"$ref": "#/components/schemas/ParticipantMission"}, "type": "array", "description": "وضعیت هر مأموریت کمپین برای این شرکت‌کننده."}, "quality_flags": {"items": {"type": "string"}, "type": "array", "description": "نشانه‌های احتیاط، نه حکم: `no_profile_pic`، `no_display_name`، `numeric_username`، `paid_check_failed`."}, "quality_info": {"anyOf": [{"$ref": "#/components/schemas/QualityInfo"}, {"type": "null"}], "description": "نتیجه‌ی فیلتر اصالت؛ null = فیلتر خاموش یا هنوز بررسی نشده."}, "status_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "`quality_rejected` = همه‌ی شرط‌ها انجام شد ولی فیلتر اصالت (حالت `block`) رد کرد؛ وگرنه null."}, "campaign_id": {"type": "string", "format": "uuid", "description": "شناسه‌ی کمپینی که این شرکت‌کننده در آن است."}, "campaign_title": {"type": "string", "description": "نام آن کمپین."}, "page_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیج آن کمپین یا null."}}, "type": "object", "required": ["id", "ig_user_id", "username", "done_count", "total", "completed", "completed_at", "first_event_at", "last_event_at", "notify_status", "notify_attempts", "notified_at", "notify_error", "followed", "missions", "campaign_id", "campaign_title", "page_username"], "description": "شرکت‌کننده به‌همراه کمپین خودش."}, "ParticipantList": {"properties": {"total": {"type": "integer", "description": "تعداد کل بعد از فیلتر."}, "items": {"items": {"$ref": "#/components/schemas/Participant"}, "type": "array", "description": "شرکت‌کننده‌های این صفحه."}}, "type": "object", "required": ["total", "items"], "description": "یک صفحه از شرکت‌کننده‌ها."}, "ParticipantWithCampaignList": {"properties": {"total": {"type": "integer", "description": "تعداد کل بعد از فیلتر."}, "items": {"items": {"$ref": "#/components/schemas/ParticipantWithCampaign"}, "type": "array", "description": "شرکت‌کننده‌های این صفحه."}}, "type": "object", "required": ["total", "items"], "description": "یک صفحه از شرکت‌کننده‌ها در همه‌ی کمپین‌ها."}, "CheckResult": {"properties": {"id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "description": "شناسه‌ی شرکت‌کننده؛ وقتی `found=false` برابر null."}, "ig_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی عددی اینستاگرام یا null."}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم استعلام‌شده (نرمال‌شده: بدون @ و با حروف کوچک)."}, "dm_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "لینک مستقیم دایرکت این یوزرنیم."}, "done_count": {"type": "integer", "description": "تعداد مأموریت‌های انجام‌شده."}, "total": {"type": "integer", "description": "تعداد کل مأموریت‌های کمپین."}, "completed": {"type": "boolean", "description": "همه‌ی مأموریت‌ها انجام شده است."}, "completed_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "لحظه‌ی کامل‌شدن یا null."}, "first_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "اولین اقدام ثبت‌شده یا null."}, "last_event_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "آخرین اقدام ثبت‌شده یا null."}, "notify_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "وضعیت ارسال وب‌هوک؛ همان مقدارهای `Participant.notify_status`."}, "notify_attempts": {"type": "integer", "description": "تعداد تلاش‌های ارسال."}, "notified_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "زمان آخرین ارسال موفق یا null."}, "notify_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "دلیل آخرین شکست ارسال یا null."}, "followed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "نتیجه‌ی فالو برای مأموریت فالو یا null."}, "missions": {"items": {"$ref": "#/components/schemas/ParticipantMission"}, "type": "array", "description": "وضعیت هر مأموریت."}, "campaign_id": {"type": "string", "format": "uuid", "description": "شناسه‌ی کمپین."}, "campaign_status": {"type": "string", "description": "وضعیت کمپین: `draft` | `scheduled` | `active` | `paused` | `ended` | `stopped`."}, "found": {"type": "boolean", "description": "`false` = هنوز هیچ اقدامی از این یوزرنیم ثبت نشده."}, "inquiry": {"$ref": "#/components/schemas/Inquiry", "description": "هزینه‌ی این استعلام."}}, "type": "object", "required": ["id", "ig_user_id", "username", "done_count", "total", "completed", "completed_at", "first_event_at", "last_event_at", "notify_status", "notify_attempts", "notified_at", "notify_error", "followed", "missions", "campaign_id", "campaign_status", "found", "inquiry"], "description": "جواب استعلام یک یوزرنیم در کمپین."}, "Inquiry": {"properties": {"billable": {"type": "boolean", "description": "`true`: این اولین استعلام این یوزرنیم در این کمپین بود و یک استعلام از پلن کم شد."}, "remaining": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "سهمیه‌ی استعلام باقی‌مانده‌ی پلن؛ ممکن است null باشد."}}, "type": "object", "required": ["billable", "remaining"], "description": "هزینه‌ی استعلام."}, "ResendResult": {"properties": {"notify_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "`sent`، `failed` یا `no_webhook` (آدرس وب‌هوک ثبت نشده)."}}, "type": "object", "required": ["notify_status"], "description": "وضعیت ارسال بعد از ارسال دوباره."}, "Page": {"properties": {"id": {"type": "string", "format": "uuid", "description": "شناسه‌ی پیج (UUID)، همان `page_id` کمپین."}, "username": {"type": "string", "description": "یوزرنیم اینستاگرام پیج."}, "is_active": {"type": "boolean", "description": "پیج متصل است."}, "last_event_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "زمان آخرین رویدادی که از پیج رسیده، یا null."}, "needs_reconnect": {"type": "boolean", "default": false, "description": "`true`: اتصال پیج قطع شده و باید از پنل دوباره وصل شود."}, "reconnect_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "جمله‌ی توضیحی وقتی `needs_reconnect=true`؛ وگرنه null."}}, "type": "object", "required": ["id", "username", "is_active"], "description": "یک پیج اینستاگرام متصل."}, "Quality": {"description": "The authenticity filter of a campaign: a participant who completes every mission is also checked against these\nconditions. Every condition is optional; send only the ones you want.", "properties": {"mode": {"description": "`flag`: فقط نشانه در پنل؛ نتیجه به وب‌هوک می‌رود. `block`: تا گذر از فیلتر نتیجه به وب‌هوک نمی‌رود.", "enum": ["flag", "block"], "type": "string"}, "min_age_months": {"anyOf": [{"maximum": 600, "minimum": 0, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل عمر حساب (ماه)."}, "iran_only": {"default": false, "description": "فقط حساب‌های ایرانی.", "type": "boolean"}, "min_followers": {"anyOf": [{"maximum": 100000000, "minimum": 0, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل فالوور."}, "min_posts": {"anyOf": [{"maximum": 1000000, "minimum": 0, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل تعداد پست."}, "min_following": {"anyOf": [{"maximum": 10000000, "minimum": 0, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل فالووینگ."}, "min_follower_ratio": {"anyOf": [{"maximum": 10000, "minimum": 0, "type": "number"}, {"type": "null"}], "default": null, "description": "حداقل نسبت فالوور به فالووینگ (مثلاً 0.5)."}, "require_profile_pic": {"default": false, "description": "حساب بدون عکس پروفایل رد شود.", "type": "boolean"}}, "required": ["mode"], "type": "object"}, "AudioReelMission": {"description": "مأموریت `ig_audio_reel`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_audio_reel"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/AudioReelRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "AudioReelRules": {"properties": {"audio_url": {"description": "لینک صفحه‌ی آهنگ در اینستاگرام (به شکل `instagram.com/reels/audio/<id>/`) یا فقط شناسه‌ی عددی آهنگ.", "type": "string"}, "min_views": {"anyOf": [{"maximum": 1000000000, "minimum": 1, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل بازدید ریل (عدد صحیح ۱ تا ۱٬۰۰۰٬۰۰۰٬۰۰۰)؛ خالی = هر پستی قبول است."}}, "required": ["audio_url"], "type": "object", "description": "ورودی‌های `rules` برای `ig_audio_reel`: ریل با آهنگ انتخاب‌شده."}, "CampaignLimits": {"additionalProperties": false, "description": "The limits in force right now. They can change; read them from here rather than copying the numbers.", "properties": {"max_missions_per_campaign": {"type": "integer", "description": "حداکثر مأموریت در یک کمپین."}, "max_days": {"type": "integer", "description": "حداکثر طول کمپین به روز."}, "keyword_max_length": {"type": "integer", "description": "حداکثر طول یک کلمه‌ی کلیدی (نویسه)."}, "max_keywords_per_mission": {"type": "integer", "description": "حداکثر کلمه‌ی کلیدی در یک مأموریت."}, "max_posts_per_mission": {"type": "integer", "description": "حداکثر پست در مأموریت کامنت با کلمه‌ی کلیدی."}, "max_like_posts_per_mission": {"type": "integer", "description": "حداکثر پست در مأموریت لایک."}, "max_comment_posts_per_mission": {"type": "integer", "description": "حداکثر پست در مأموریت‌های کامنت، منشن و کامنت با هشتگ."}, "max_mentions": {"type": "integer", "description": "بیشترین مقدار `min_mentions`."}, "reply_text_max_length": {"type": "integer", "description": "حداکثر طول متن‌های دایرکت (نویسه)."}, "missions_change_cooldown_hours": {"type": "integer", "description": "کمترین فاصله‌ی دو تغییر مأموریت‌های یک کمپین (ساعت)."}, "info": {"type": "string", "description": "توضیح فارسی کوتاه."}}, "required": ["max_missions_per_campaign", "max_days", "keyword_max_length", "max_keywords_per_mission", "max_posts_per_mission", "max_like_posts_per_mission", "max_comment_posts_per_mission", "max_mentions", "reply_text_max_length", "missions_change_cooldown_hours", "info"], "type": "object"}, "CampaignParticipantCompletedData": {"additionalProperties": false, "properties": {"campaign_id": {"description": "شناسه‌ی کمپین (UUID).", "type": "string"}, "campaign_title": {"type": "string", "description": "نام کمپین."}, "kind": {"description": "`page`: کمپین با پیج متصل؛ `public`: بدون پیج.", "enum": ["page", "public"], "type": "string"}, "page": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیج کمپین؛ برای `kind=public` برابر `null`."}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم اینستاگرام شرکت‌کننده؛ می‌تواند `null` باشد."}, "ig_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "شناسه‌ی عددی اینستاگرام شرکت‌کننده، به صورت رشته."}, "completed_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "لحظه‌ی کامل‌شدن همه‌ی مأموریت‌ها، قالب `YYYY-MM-DDTHH:MM:SSZ` (UTC)."}, "missions": {"description": "همه‌ی مأموریت‌های کمپین به ترتیب `position`.", "items": {"$ref": "#/components/schemas/ResultMission"}, "type": "array"}}, "required": ["campaign_id", "campaign_title", "kind", "page", "username", "ig_user_id", "completed_at", "missions"], "type": "object", "description": "محتوای `data` رویداد `campaign.participant.completed`."}, "CampaignParticipantCompletedEvent": {"additionalProperties": false, "properties": {"event_id": {"description": "شناسه‌ی رویداد (`evt_` و ۱۲ نویسه). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ برای حذف تکراری‌ها از آن استفاده کنید.", "type": "string"}, "created_at": {"description": "زمان ساخت رویداد، `YYYY-MM-DDTHH:MM:SSZ` (UTC).", "type": "string"}, "event": {"type": "string", "description": "نام رویداد؛ برابر هدر `X-Kavosh-Event`.", "enum": ["campaign.participant.completed"]}, "data": {"$ref": "#/components/schemas/CampaignParticipantCompletedData"}}, "required": ["event_id", "created_at", "event", "data"], "type": "object", "description": "بدنه‌ی وب‌هوک `campaign.participant.completed`."}, "CampaignTypes": {"additionalProperties": false, "description": "The answer of `GET /v2/campaign-types`.", "properties": {"types": {"items": {"$ref": "#/components/schemas/MissionTypeInfo"}, "type": "array", "description": "همه‌ی نوع‌های مأموریت."}, "groups": {"items": {"$ref": "#/components/schemas/MissionGroup"}, "type": "array", "description": "دو گروه نوع‌ها: با پیج و بدون پیج."}, "limits": {"$ref": "#/components/schemas/CampaignLimits"}}, "required": ["types", "groups", "limits"], "type": "object"}, "CollabMission": {"description": "مأموریت `ig_collab`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_collab"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/CollabRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "CollabRules": {"properties": {"target_username": {"anyOf": [{"maxLength": 30, "type": "string"}, {"type": "null"}], "default": null, "description": "یوزرنیم اینستاگرامِ پیجی که مأموریت درباره‌ی آن است، بدون @. فقط در کمپین `kind=public` لازم است؛ در کمپین `kind=page` همان پیج کمپین حساب می‌شود."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_collab`: پست مشترک با پیج."}, "CommentKeywordMission": {"description": "مأموریت `ig_comment_kw`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_comment_kw"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/CommentKeywordRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "CommentKeywordRules": {"properties": {"keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}, "match": {"anyOf": [{"enum": ["keywords", "any"], "type": "string"}, {"type": "null"}], "default": null, "description": "`keywords` (پیش‌فرض) یا `any` (هر کامنتی قبول است)."}, "post_urls": {"anyOf": [{"items": {"type": "string"}, "maxItems": 20, "type": "array"}, {"type": "null"}], "default": null, "description": "فقط کامنت زیر این پست‌های پیج حساب شود (حداکثر ۲۰ پست). خالی = زیر همه‌ی پست‌های پیج. لینک کامل پست یا ریل، یا فقط شورت‌کد آن. هر آیتم می‌تواند چند لینک جداشده با فاصله، کاما یا خط جدید باشد. تکراری‌ها یک بار شمرده می‌شوند."}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "maxItems": 20, "type": "array"}, {"type": "null"}], "default": null, "description": "هم‌ارز `post_urls`؛ هر دو را بفرستید با هم ترکیب می‌شوند."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_comment_kw`: کامنت با کلمه‌ی کلیدی زیر پست‌های پیج."}, "CommentLikeMission": {"description": "مأموریت `ig_comment_like`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_comment_like"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/CommentLikeRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "CommentLikeRules": {"properties": {"comment_url": {"description": "لینک یک کامنت (به شکل `instagram.com/p/<کد پست>/c/<شناسه‌ی کامنت>/`؛ در اینستاگرام روی کامنت «کپی لینک» بزنید).", "type": "string"}}, "required": ["comment_url"], "type": "object", "description": "ورودی‌های `rules` برای `ig_comment_like`: لایک یک کامنت مشخص."}, "CommentMission": {"description": "مأموریت `ig_comment`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_comment"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/CommentRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "CommentReplyMission": {"description": "مأموریت `ig_comment_reply`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_comment_reply"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/CommentReplyRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "CommentReplyRules": {"properties": {"comment_url": {"description": "لینک کامنتی که باید زیرش ریپلای گذاشته شود (همان شکل `comment_url` لایک کامنت).", "type": "string"}, "keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد. خالی = هر ریپلای قبول است."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}}, "required": ["comment_url"], "type": "object", "description": "ورودی‌های `rules` برای `ig_comment_reply`: ریپلای زیر یک کامنت مشخص."}, "CommentRules": {"properties": {"post_urls": {"description": "پست‌هایی که باید زیرشان کامنت گذاشته شود (۱ تا ۵ پست؛ کاربر باید زیر همه کامنت بگذارد). لینک کامل پست یا ریل، یا فقط شورت‌کد آن. هر آیتم می‌تواند چند لینک جداشده با فاصله، کاما یا خط جدید باشد. تکراری‌ها یک بار شمرده می‌شوند.", "items": {"type": "string"}, "maxItems": 5, "minItems": 1, "type": "array"}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "هم‌ارز `post_urls`."}, "keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد. خالی = هر کامنتی قبول است."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}}, "required": ["post_urls"], "type": "object", "description": "ورودی‌های `rules` برای `ig_comment`: کامنت زیر ۱ تا ۵ پست عمومی."}, "DmKeywordMission": {"description": "مأموریت `ig_dm_keyword`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_dm_keyword"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/DmKeywordRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "DmKeywordRules": {"properties": {"keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}, "match": {"anyOf": [{"enum": ["keywords", "any"], "type": "string"}, {"type": "null"}], "default": null, "description": "`keywords` (پیش‌فرض): پیام باید یکی از کلمه‌های کلیدی را داشته باشد. `any`: هر پیامی قبول است و کلمه‌ی کلیدی لازم نیست."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_dm_keyword`: دایرکت با کلمه‌ی کلیدی به پیج."}, "Error": {"description": "بدنه‌ی هر خطا غیر از خطای اعتبارسنجی FastAPI. روی `error` و کد وضعیت HTTP تصمیم بگیرید؛ `message` پایدار نیست.", "properties": {"error": {"description": "کد پایدار خطا؛ روی این شاخه بزنید.", "enum": ["unauthorized", "not_found", "conflict", "invalid_input", "plan_expired", "quota_exceeded", "too_many_requests"], "type": "string"}, "message": {"description": "متن توضیحی، فارسی یا انگلیسی؛ پایدار نیست و نباید پارس شود.", "type": "string"}}, "required": ["error", "message"], "type": "object"}, "FollowMission": {"description": "مأموریت `ig_follow`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_follow"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/FollowRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "FollowRules": {"properties": {"keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد. برای فالو حداقل یک کلمه‌ی کلیدی لازم است و `match=any` مجاز نیست."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}, "match": {"anyOf": [{"type": "string", "enum": ["keywords"]}, {"type": "null"}], "default": null, "description": "برای فالو فقط `keywords` مجاز است."}, "reply_pass": {"anyOf": [{"maxLength": 500, "type": "string"}, {"type": "null"}], "default": null, "description": "متن دایرکتی که وقتی فالو تأیید شد برای کاربر فرستاده می‌شود؛ خالی = متن پیش‌فرض کاوش."}, "reply_fail": {"anyOf": [{"maxLength": 500, "type": "string"}, {"type": "null"}], "default": null, "description": "متن دایرکتی که وقتی کاربر کلمه‌ی کلیدی را فرستاده ولی هنوز فالو نکرده فرستاده می‌شود؛ خالی = متن پیش‌فرض."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_follow`: فالو پیج، با ارسال کلمه‌ی کلیدی در دایرکت."}, "HashtagCommentMission": {"description": "مأموریت `ig_hashtag`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_hashtag"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/HashtagCommentRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "HashtagCommentRules": {"properties": {"post_urls": {"description": "پست‌هایی که باید زیرشان کامنت با هشتگ گذاشته شود (۱ تا ۵ پست). لینک کامل پست یا ریل، یا فقط شورت‌کد آن. هر آیتم می‌تواند چند لینک جداشده با فاصله، کاما یا خط جدید باشد. تکراری‌ها یک بار شمرده می‌شوند.", "items": {"type": "string"}, "maxItems": 5, "minItems": 1, "type": "array"}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "هم‌ارز `post_urls`."}, "hashtag": {"description": "یک هشتگ، با یا بدون `#`. تفاوت ی/ک عربی و فارسی و نیم‌فاصله نادیده گرفته می‌شود.", "maxLength": 100, "type": "string"}}, "required": ["post_urls", "hashtag"], "type": "object", "description": "ورودی‌های `rules` برای `ig_hashtag`: کامنت با هشتگ زیر ۱ تا ۵ پست."}, "HashtagPostMission": {"description": "مأموریت `ig_hashtag_post`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_hashtag_post"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/HashtagPostRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "HashtagPostRules": {"properties": {"hashtag": {"description": "یک هشتگ، با یا بدون `#`.", "maxLength": 100, "type": "string"}, "media": {"anyOf": [{"enum": ["any", "reel"], "type": "string"}, {"type": "null"}], "default": null, "description": "`any` (پیش‌فرض): هر پستی؛ `reel`: فقط ریل."}, "min_views": {"anyOf": [{"maximum": 1000000000, "minimum": 1, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل بازدید ریل (عدد صحیح ۱ تا ۱٬۰۰۰٬۰۰۰٬۰۰۰)؛ خالی = هر پستی قبول است."}}, "required": ["hashtag"], "type": "object", "description": "ورودی‌های `rules` برای `ig_hashtag_post`: پست یا ریل تازه با یک هشتگ."}, "LikeMission": {"description": "مأموریت `ig_like`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_like"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/LikeRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "LikeRules": {"properties": {"post_urls": {"description": "پست‌هایی که باید لایک شوند (۱ تا ۵ پست؛ کاربر باید همه را لایک کند). پست می‌تواند مال هر پیج عمومی باشد. لینک کامل پست یا ریل، یا فقط شورت‌کد آن. هر آیتم می‌تواند چند لینک جداشده با فاصله، کاما یا خط جدید باشد. تکراری‌ها یک بار شمرده می‌شوند.", "items": {"type": "string"}, "maxItems": 5, "minItems": 1, "type": "array"}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "هم‌ارز `post_urls`؛ هر دو با هم ترکیب می‌شوند."}}, "required": ["post_urls"], "type": "object", "description": "ورودی‌های `rules` برای `ig_like`: لایک ۱ تا ۵ پست."}, "LocationPostMission": {"description": "مأموریت `ig_location_post`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_location_post"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/LocationPostRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "LocationPostRules": {"properties": {"location_url": {"description": "لینک صفحه‌ی لوکیشن در اینستاگرام (به شکل `instagram.com/explore/locations/<id>/...`) یا فقط شناسه‌ی عددی آن.", "type": "string"}}, "required": ["location_url"], "type": "object", "description": "ورودی‌های `rules` برای `ig_location_post`: پست با لوکیشن انتخاب‌شده."}, "MentionMission": {"description": "مأموریت `ig_mention`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_mention"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/MentionRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "MentionRules": {"properties": {"post_urls": {"description": "پست‌هایی که باید زیرشان کامنت با منشن گذاشته شود (۱ تا ۵ پست). لینک کامل پست یا ریل، یا فقط شورت‌کد آن. هر آیتم می‌تواند چند لینک جداشده با فاصله، کاما یا خط جدید باشد. تکراری‌ها یک بار شمرده می‌شوند.", "items": {"type": "string"}, "maxItems": 5, "minItems": 1, "type": "array"}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "هم‌ارز `post_urls`."}, "min_mentions": {"anyOf": [{"maximum": 10, "minimum": 1, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل تعداد منشن متفاوت در کامنت (۱ تا ۱۰، پیش‌فرض ۱). منشن تکراری یک بار شمرده می‌شود."}}, "required": ["post_urls"], "type": "object", "description": "ورودی‌های `rules` برای `ig_mention`: کامنت با منشن چند نفر زیر ۱ تا ۵ پست."}, "MissionCheckCompletedData": {"description": "The result of a check of a mission created in the panel (not a /v2 campaign). Fields can be added; ignore the\nones you do not know.", "properties": {"mission_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "mission_type": {"type": "string", "description": "کد نوع مأموریت پنل."}, "rules": {"type": "object", "description": "`rules` عمومی مأموریت (بدون راز؛ کلیدهای داخلی حذف می‌شوند)."}, "username": {"type": "string", "description": "یوزرنیم استعلام‌شده، یا در مأموریت‌های پیام‌رسان `tg:…`، `bale:…`، `rubika:…`."}, "total_posts": {"type": "integer", "description": "تعداد هدف‌های مأموریت (برای مأموریت‌های رسمی همیشه 1)."}, "commented_count": {"type": "integer", "description": "تعداد هدف‌هایی که کاربر در آن‌ها اقدام کرده است."}, "all_commented": {"type": "boolean", "description": "کاربر در همه‌ی هدف‌ها اقدام کرده است."}, "passed_count": {"default": 0, "type": "integer", "description": "تعداد هدف‌هایی که شرط در آن‌ها برقرار است."}, "passed": {"default": false, "type": "boolean", "description": "شرط مأموریت برای این کاربر برقرار است."}, "posts": {"items": {"$ref": "#/components/schemas/MissionCheckPostOut"}, "type": "array", "description": "نتیجه‌ی هر هدف."}, "inquiry": {"anyOf": [{"$ref": "#/components/schemas/MissionCheckInquiry"}, {"type": "null"}], "default": null}, "followed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "فقط برای مأموریت فالو."}, "ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "فقط در مأموریت‌های پیام‌رسان: شناسه‌ی شما برای کاربر."}}, "required": ["mission_type", "username", "total_posts", "commented_count", "all_commented", "posts"], "type": "object"}, "MissionCheckCompletedEvent": {"additionalProperties": false, "properties": {"event_id": {"description": "شناسه‌ی رویداد (`evt_` و ۱۲ نویسه). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ برای حذف تکراری‌ها از آن استفاده کنید.", "type": "string"}, "created_at": {"description": "زمان ساخت رویداد، `YYYY-MM-DDTHH:MM:SSZ` (UTC).", "type": "string"}, "event": {"type": "string", "description": "نام رویداد؛ برابر هدر `X-Kavosh-Event`.", "enum": ["mission.check.completed"]}, "data": {"$ref": "#/components/schemas/MissionCheckCompletedData"}}, "required": ["event_id", "created_at", "event", "data"], "type": "object", "description": "بدنه‌ی وب‌هوک `mission.check.completed`."}, "MissionCheckInquiry": {"additionalProperties": false, "properties": {"billable": {"type": "boolean", "description": "این استعلام از سهمیه کم شد."}, "remaining": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "سهمیه‌ی باقی‌مانده یا null."}}, "required": ["billable"], "type": "object", "description": "هزینه‌ی استعلام در `data` رویدادهای مأموریت پنل."}, "MissionCheckPostOut": {"properties": {"post_url": {"type": "string", "description": "لینک هدف (پست، پیج، گروه یا کانال)."}, "commented": {"type": "boolean", "description": "کاربر در این هدف اقدام کرده است."}, "passed": {"default": false, "type": "boolean", "description": "شرط برای این هدف برقرار است."}, "matched_comment": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "comments": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "فقط در بعضی نوع‌ها؛ دیده نشدنش خطا نیست."}, "post_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}}, "required": ["post_url", "commented"], "type": "object", "description": "نتیجه‌ی استعلام برای یک هدف (پست، پیج، گروه یا کانال)."}, "MissionField": {"additionalProperties": false, "description": "One input of a mission type, i.e. one key of `rules`. Optional attributes are absent when they do not apply.", "properties": {"key": {"description": "نام کلید در `rules`.", "type": "string"}, "label": {"description": "برچسب فارسی.", "type": "string"}, "placeholder": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "required": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "آیا این ورودی الزامی است."}, "info": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "توضیح فارسی."}, "max_length": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "max_items": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "min": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "max": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "`number` یا `select` (خالی = متن)."}, "ltr": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "مقدار چپ‌به‌راست است (لینک، یوزرنیم)."}, "kinds": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "فقط در این نوع کمپین‌ها ورودی است (مثلاً `public`)."}, "pattern": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "الگوی مقدار معتبر."}, "options": {"anyOf": [{"items": {"$ref": "#/components/schemas/MissionFieldOption"}, "type": "array"}, {"type": "null"}], "default": null}}, "required": ["key", "label"], "type": "object"}, "MissionFieldOption": {"additionalProperties": false, "properties": {"value": {"type": "string", "description": "مقدار ارسالی."}, "label": {"type": "string", "description": "برچسب فارسی."}}, "required": ["value", "label"], "type": "object", "description": "یک گزینه‌ی ورودی از نوع `select`."}, "MissionGroup": {"additionalProperties": false, "properties": {"code": {"enum": ["page", "public"], "type": "string", "description": "`page` یا `public`."}, "label": {"type": "string", "description": "نام فارسی گروه."}, "needs_page": {"type": "boolean", "description": "گروه به پیج متصل نیاز دارد."}, "info": {"type": "string", "description": "توضیح فارسی."}, "types": {"description": "کد نوع‌های این گروه.", "items": {"type": "string"}, "type": "array"}}, "required": ["code", "label", "needs_page", "info", "types"], "type": "object", "description": "یکی از دو گروه نوع‌های مأموریت (با پیج، بدون پیج)."}, "MissionMemberLeftData": {"additionalProperties": false, "properties": {"mission_id": {"type": "string", "description": "شناسه‌ی مأموریت."}, "mission_type": {"type": "string", "description": "کد نوع مأموریت."}, "username": {"description": "شناسه‌ی کاربر در پیام‌رسان، مثل `tg:5521904473`.", "type": "string"}, "ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "chat": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "لینک گروه، کانال یا ربات."}, "joined_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "left_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "retained_hours": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null}, "min_retention_hours": {"default": 0, "type": "integer", "description": "حداقل ماندگاری مأموریت به ساعت؛ 0 = بدون حداقل."}, "left_early": {"description": "`true`: قبل از حداقل ماندگاری رفته است.", "type": "boolean"}, "was_passed": {"default": true, "type": "boolean", "description": "کاربر پیش‌تر قبول شده بود."}}, "required": ["mission_id", "mission_type", "username", "left_early"], "type": "object", "description": "محتوای `data` رویداد `mission.member.left`."}, "MissionMemberLeftEvent": {"additionalProperties": false, "properties": {"event_id": {"description": "شناسه‌ی رویداد (`evt_` و ۱۲ نویسه). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ برای حذف تکراری‌ها از آن استفاده کنید.", "type": "string"}, "created_at": {"description": "زمان ساخت رویداد، `YYYY-MM-DDTHH:MM:SSZ` (UTC).", "type": "string"}, "event": {"type": "string", "description": "نام رویداد؛ برابر هدر `X-Kavosh-Event`.", "enum": ["mission.member.left"]}, "data": {"$ref": "#/components/schemas/MissionMemberLeftData"}}, "required": ["event_id", "created_at", "event", "data"], "type": "object", "description": "بدنه‌ی وب‌هوک `mission.member.left`."}, "MissionRulesOut": {"additionalProperties": false, "description": "The stored form of a mission's `rules`: normalised, so it can differ from what you sent (links become\nshortcodes in `post_codes`, `keywords` also fills `keyword`). Only the keys the mission type uses are present.", "properties": {"target_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "پیجِ هدف (فقط کمپین بدون پیج)."}, "post_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "شورت‌کد پست‌ها (از `post_urls` یا `post_codes` ورودی)."}, "post_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "شورت‌کد پست (ریپست و کامنت‌محور)."}, "keywords": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "کلمه‌های کلیدیِ نرمال‌شده."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "اولین کلمه‌ی کلیدی؛ برای سازگاری با خواننده‌های قدیمی."}, "match": {"anyOf": [{"enum": ["keywords", "any"], "type": "string"}, {"type": "null"}], "default": null, "description": "شیوه‌ی تطبیق."}, "reply_pass": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "متن دایرکت تأیید فالو."}, "reply_fail": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "متن دایرکت رد."}, "keep_hours": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل ماندگاری استوری (ساعت)."}, "min_mentions": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل منشن متفاوت."}, "hashtag": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "هشتگ، بدون `#`."}, "media": {"anyOf": [{"enum": ["any", "reel"], "type": "string"}, {"type": "null"}], "default": null, "description": "نوع پست هشتگ."}, "min_views": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل بازدید ریل."}, "audio_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "شناسه‌ی آهنگ."}, "audio_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "لینک استاندارد صفحه‌ی آهنگ."}, "location_pk": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "شناسه‌ی لوکیشن."}, "location_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "لینک استاندارد صفحه‌ی لوکیشن."}, "comment_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "شناسه‌ی کامنت."}, "comment_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "لینک استاندارد کامنت."}}, "type": "object"}, "MissionStatusChangedData": {"additionalProperties": false, "properties": {"mission_id": {"type": "string", "description": "شناسه‌ی مأموریت."}, "mission_type": {"type": "string", "description": "کد نوع مأموریت."}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "previous_status": {"type": "string", "description": "وضعیت قبلی، همیشه `active`."}, "status": {"description": "مثلاً `paused` یا `completed`.", "type": "string"}, "status_reason": {"description": "مثلاً `plan_inactive`، `hours_exhausted`، `all_posts_finished` یا `error:<دلیل>`.", "type": "string"}}, "required": ["mission_id", "mission_type", "previous_status", "status", "status_reason"], "type": "object", "description": "محتوای `data` رویداد `mission.status.changed`."}, "MissionStatusChangedEvent": {"additionalProperties": false, "properties": {"event_id": {"description": "شناسه‌ی رویداد (`evt_` و ۱۲ نویسه). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ برای حذف تکراری‌ها از آن استفاده کنید.", "type": "string"}, "created_at": {"description": "زمان ساخت رویداد، `YYYY-MM-DDTHH:MM:SSZ` (UTC).", "type": "string"}, "event": {"type": "string", "description": "نام رویداد؛ برابر هدر `X-Kavosh-Event`.", "enum": ["mission.status.changed"]}, "data": {"$ref": "#/components/schemas/MissionStatusChangedData"}}, "required": ["event_id", "created_at", "event", "data"], "type": "object", "description": "بدنه‌ی وب‌هوک `mission.status.changed`."}, "MissionTypeInfo": {"additionalProperties": false, "properties": {"code": {"description": "مقدار `mission_type` در کمپین.", "enum": ["ig_follow", "ig_dm_keyword", "ig_comment_kw", "ig_story_reply", "ig_story_mention", "ig_share", "ig_like", "ig_tag_post", "ig_comment", "ig_mention", "ig_hashtag", "ig_hashtag_post", "ig_audio_reel", "ig_location_post", "ig_collab", "ig_repost", "ig_story_mention_public", "ig_comment_like", "ig_comment_reply"], "type": "string"}, "label": {"description": "نام فارسی.", "type": "string"}, "info": {"description": "توضیح کامل.", "type": "string"}, "rule": {"description": "قانونی که قبول یا رد شدن را تعیین می‌کند.", "type": "string"}, "fields": {"description": "ورودی‌های `rules` این نوع.", "items": {"$ref": "#/components/schemas/MissionField"}, "type": "array"}, "needs_page": {"description": "`true`: فقط کمپین با پیج متصل (`kind=page`) می‌تواند داشته باشدش.", "type": "boolean"}, "group": {"description": "گروه: `page` یا `public`.", "enum": ["page", "public"], "type": "string"}, "requires": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "سطح لازم؛ مقدار کنونی همیشه `standard` است."}, "disabled": {"description": "`true`: این نوع موقتاً از سوی کاوش بسته است و ساخت یا شروع کمپین با آن 409 می‌دهد.", "type": "boolean"}, "disabled_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "فقط وقتی `disabled=true` است."}}, "required": ["code", "label", "info", "rule", "fields", "needs_page", "group", "disabled"], "type": "object", "description": "یک نوع مأموریت در کاتالوگ زنده."}, "PostsProgress": {"description": "Progress of a mission that needs every one of 2 to 5 posts (like, comment, mention, hashtag comment).", "properties": {"done": {"description": "چند پست انجام شده.", "type": "integer"}, "total": {"description": "چند پست لازم است.", "type": "integer"}}, "required": ["done", "total"], "type": "object"}, "QualityInfo": {"additionalProperties": false, "description": "The result of the authenticity filter for one participant. Every field except `pass` can be null when that\ninformation was not available.", "properties": {"pass": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "`true`: گذشت، `false`: رد شد، `null`: هنوز تصمیم گرفته نشده."}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "joined": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "زمان ساخت حساب."}, "followers": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "posts": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "following": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null}, "has_profile_pic": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null}, "reasons": {"description": "دلیل‌های رد یا نکته‌های نامعلوم، به فارسی.", "items": {"type": "string"}, "type": "array"}}, "type": "object"}, "RepostMission": {"description": "مأموریت `ig_repost`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_repost"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/RepostRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type", "rules"], "type": "object"}, "RepostRules": {"properties": {"post_url": {"description": "لینک یک پست یا ریل که باید ریپست شود (دقیقاً یکی).", "type": "string"}}, "required": ["post_url"], "type": "object", "description": "ورودی‌های `rules` برای `ig_repost`: ریپست یک پست."}, "ResultMission": {"additionalProperties": false, "properties": {"type": {"description": "کد نوع مأموریت.", "enum": ["ig_follow", "ig_dm_keyword", "ig_comment_kw", "ig_story_reply", "ig_story_mention", "ig_share", "ig_like", "ig_tag_post", "ig_comment", "ig_mention", "ig_hashtag", "ig_hashtag_post", "ig_audio_reel", "ig_location_post", "ig_collab", "ig_repost", "ig_story_mention_public", "ig_comment_like", "ig_comment_reply"], "type": "string"}, "label": {"description": "نام فارسی نوع مأموریت.", "type": "string"}, "rules": {"$ref": "#/components/schemas/MissionRulesOut", "description": "`rules` ذخیره‌شده‌ی مأموریت (همان‌که در `GET /v2/campaigns/{id}` می‌آید)."}, "page": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "یوزرنیم پیجی که مأموریت روی آن بود؛ در کمپین بدون پیج `null`."}, "done_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "زمان انجام، ISO 8601 (UTC)."}, "evidence": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "مدرک انجام؛ متن آزاد و مبهم، حداکثر ۳۰۰ نویسه. روی قالبش حساب نکنید."}}, "required": ["type", "label", "rules", "page", "done_at", "evidence"], "type": "object", "description": "نتیجه‌ی یک مأموریت کمپین برای شرکت‌کننده‌ی کامل‌شده."}, "ShareMission": {"description": "مأموریت `ig_share`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_share"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/ShareRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "ShareRules": {"description": "ig_share has no input.", "properties": {}, "type": "object"}, "StoryMentionMission": {"description": "مأموریت `ig_story_mention`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_story_mention"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/StoryMentionRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "StoryMentionPublicMission": {"description": "مأموریت `ig_story_mention_public`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_story_mention_public"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/StoryMentionPublicRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "StoryMentionPublicRules": {"properties": {"target_username": {"anyOf": [{"maxLength": 30, "type": "string"}, {"type": "null"}], "default": null, "description": "یوزرنیم اینستاگرامِ پیجی که مأموریت درباره‌ی آن است، بدون @. فقط در کمپین `kind=public` لازم است؛ در کمپین `kind=page` همان پیج کمپین حساب می‌شود."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_story_mention_public`: منشن پیج در استوری، بدون اتصال پیج."}, "StoryMentionRules": {"properties": {"keep_hours": {"anyOf": [{"maximum": 23, "minimum": 0, "type": "integer"}, {"type": "null"}], "default": null, "description": "حداقل ماندگاری استوری به ساعت (۰ تا ۲۳). ۰ یا خالی = منشن همان لحظه حساب می‌شود. با عدد بزرگ‌تر از صفر، منشن وقتی حساب می‌شود که استوری بعد از آن مدت هنوز برداشته نشده باشد."}, "reply_fail": {"anyOf": [{"maxLength": 500, "type": "string"}, {"type": "null"}], "default": null, "description": "متن دایرکت وقتی استوری زودتر از `keep_hours` برداشته شد. فقط وقتی `keep_hours` بزرگ‌تر از صفر است ذخیره می‌شود."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_story_mention`: منشن پیج متصل در استوری."}, "StoryReplyMission": {"description": "مأموریت `ig_story_reply`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_story_reply"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/StoryReplyRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "StoryReplyRules": {"properties": {"keywords": {"anyOf": [{"items": {"type": "string"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "default": null, "description": "فهرست کلمه‌های کلیدی (حداکثر ۱۰ کلمه، هر کدام حداکثر ۶۰ نویسه). تفاوت ی/ک عربی و فارسی، حروف بزرگ و کوچک و فاصله‌ی اضافه نادیده گرفته می‌شود. هر کلمه‌ی کلیدی در یک پیج فقط در یک کمپین زنده می‌تواند باشد. خالی = هر ریپلای به استوری قبول است."}, "keyword": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "روش دیگر برای ارسال کلمه‌ی کلیدی: یک رشته که با خط جدید، کاما یا ویرگول فارسی به چند کلمه جدا می‌شود. اگر `keywords` را بفرستید این فیلد لازم نیست."}, "match": {"anyOf": [{"enum": ["keywords", "any"], "type": "string"}, {"type": "null"}], "default": null, "description": "`keywords` (پیش‌فرض) یا `any`."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_story_reply`: ریپلای به استوری پیج."}, "TagPostMission": {"description": "مأموریت `ig_tag_post`.", "properties": {"mission_type": {"description": "کد نوع مأموریت.", "type": "string", "enum": ["ig_tag_post"]}, "page_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "default": null, "description": "پیج متصل این مأموریت؛ خالی = پیج کمپین. در کمپین `kind=public` نباید پر باشد."}, "rules": {"$ref": "#/components/schemas/TagPostRules", "description": "ورودی‌های این نوع مأموریت."}}, "required": ["mission_type"], "type": "object"}, "TagPostRules": {"properties": {"target_username": {"anyOf": [{"maxLength": 30, "type": "string"}, {"type": "null"}], "default": null, "description": "یوزرنیم اینستاگرامِ پیجی که مأموریت درباره‌ی آن است، بدون @. فقط در کمپین `kind=public` لازم است؛ در کمپین `kind=page` همان پیج کمپین حساب می‌شود."}}, "type": "object", "description": "ورودی‌های `rules` برای `ig_tag_post`: تگ پیج در پست."}, "WebhookTestData": {"description": "`webhook.test` carries a sample of another event inside `data`, plus `sample_of`, the name of that event.\nThe sample depends on the mission type chosen in the panel: for most types it has the shape of\n`mission.check.completed`; for types without posts it is a shorter preview (`preview=true`, `target`). Treat `data` as\na sample and ignore the keys you do not know.", "properties": {"mission_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}, "mission_type": {"type": "string", "description": "کد نوع مأموریت پنل."}, "rules": {"type": "object", "description": "`rules` عمومی مأموریت (بدون راز؛ کلیدهای داخلی حذف می‌شوند)."}, "username": {"type": "string", "description": "یوزرنیم استعلام‌شده، یا در مأموریت‌های پیام‌رسان `tg:…`، `bale:…`، `rubika:…`."}, "passed": {"default": false, "type": "boolean", "description": "شرط مأموریت برای این کاربر برقرار است."}, "total_posts": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "تعداد هدف‌های مأموریت (برای مأموریت‌های رسمی همیشه 1)."}, "commented_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "تعداد هدف‌هایی که کاربر در آن‌ها اقدام کرده است."}, "all_commented": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "کاربر در همه‌ی هدف‌ها اقدام کرده است."}, "passed_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "تعداد هدف‌هایی که شرط در آن‌ها برقرار است."}, "posts": {"anyOf": [{"items": {"$ref": "#/components/schemas/MissionCheckPostOut"}, "type": "array"}, {"type": "null"}], "default": null, "description": "نتیجه‌ی هر هدف."}, "inquiry": {"anyOf": [{"$ref": "#/components/schemas/MissionCheckInquiry"}, {"type": "null"}], "default": null}, "followed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "فقط برای مأموریت فالو."}, "ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "فقط در مأموریت‌های پیام‌رسان: شناسه‌ی شما برای کاربر."}, "sample_of": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "نام رویدادی که این نمونه از آن است."}, "preview": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "`true`: نمونه‌ی کوتاه پیش‌نمایش برای نوعی که پست ندارد."}, "target": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "در نمونه‌ی پیش‌نمایش: هدف مأموریت (پیج یا کانال)."}}, "required": ["mission_type", "username"], "type": "object"}, "WebhookTestEvent": {"additionalProperties": false, "properties": {"event_id": {"description": "شناسه‌ی رویداد (`evt_` و ۱۲ نویسه). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ برای حذف تکراری‌ها از آن استفاده کنید.", "type": "string"}, "created_at": {"description": "زمان ساخت رویداد، `YYYY-MM-DDTHH:MM:SSZ` (UTC).", "type": "string"}, "event": {"type": "string", "description": "نام رویداد؛ برابر هدر `X-Kavosh-Event`.", "enum": ["webhook.test"]}, "data": {"$ref": "#/components/schemas/WebhookTestData"}}, "required": ["event_id", "created_at", "event", "data"], "type": "object", "description": "بدنه‌ی وب‌هوک `webhook.test`."}}, "securitySchemes": {"ApiKey": {"type": "http", "scheme": "bearer", "bearerFormat": "kv_live_…", "description": "کلید API کاوش: `Authorization: Bearer kv_live_…`. تا ۵ کلید فعال برای هر حساب؛ کلیدهای پیش از ۲۳ آبان ۱۴۰۵ (2026-11-14) پذیرفته نمی‌شوند."}}}, "tags": [{"name": "کاتالوگ", "x-slug": "catalog", "x-title-en": "Catalogue", "description": "فهرست زنده‌ی نوع مأموریت‌ها، ورودی هر کدام و محدودیت‌های فعلی."}, {"name": "پیج‌ها", "x-slug": "pages", "x-title-en": "Pages", "description": "پیج‌های اینستاگرامی که در پنل به حساب شما وصل شده‌اند."}, {"name": "کمپین‌ها", "x-slug": "campaigns", "x-title-en": "Campaigns", "description": "ساخت، خواندن، ویرایش و تغییر مأموریت‌های کمپین."}, {"name": "چرخه‌ی کمپین", "x-slug": "lifecycle", "x-title-en": "Campaign lifecycle", "description": "شروع، توقف موقت و پایان کمپین."}, {"name": "شرکت‌کننده‌ها و استعلام", "x-slug": "participants", "x-title-en": "Participants and check", "description": "شرکت‌کننده‌ها، استعلام یک یوزرنیم و ارسال دوباره‌ی نتیجه."}], "webhooks": {"campaign.participant.completed": {"post": {"summary": "نتیجه‌ی یک شرکت‌کننده‌ی کامل‌شده در کمپین", "x-summary-en": "Result of a participant who completed a campaign", "description": "وقتی یک شرکت‌کننده همه‌ی مأموریت‌های یک کمپین را انجام می‌دهد (و اگر فیلتر اصالت در حالت `block` است، از آن هم می‌گذرد) یک بار فرستاده می‌شود. همین رویداد با `POST .../resend` هم دوباره فرستاده می‌شود و `event_id`اش همان قبلی است.\n\nپاسخ 2xx یعنی تحویل موفق؛ هر پاسخ دیگر شکست است. ارسال با timeout ۵ ثانیه و بدون دنبال‌کردن ریدایرکت انجام می‌شود. آدرس باید HTTPS و عمومی باشد. امضا را روی بایت‌های خام بدنه راستی‌آزمایی کنید.", "parameters": [{"name": "X-Kavosh-Event", "in": "header", "required": true, "description": "نام رویداد، مثل `campaign.participant.completed`.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Event-Id", "in": "header", "required": true, "description": "شناسه‌ی رویداد (`evt_…`). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ حذف تکراری‌ها با این مقدار.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Timestamp", "in": "header", "required": true, "description": "زمان ارسال این تلاش، ثانیه‌ی یونیکس. در هر تلاش تازه می‌شود. تلورانس بازپخش ۳۰۰ ثانیه است.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Signature", "in": "header", "required": true, "description": "امضای HMAC-SHA256 به شکل `sha256=<hex>` روی رشته‌ی `{timestamp}.{بدنه‌ی خام}` با کلید وب‌هوک شما.", "schema": {"type": "string"}}], "requestBody": {"required": true, "description": "بدنه‌ی JSON با UTF-8 و حروف فارسی بدون escape.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignParticipantCompletedEvent"}, "examples": {"example": {"summary": "نمونه", "value": {"event": "campaign.participant.completed", "event_id": "evt_3f1c9a2b7d10", "created_at": "2026-12-03T10:02:12Z", "data": {"campaign_id": "7d2e9b1c-84a3-4f60-b5d7-0a9e3c6f1b22", "campaign_title": "جشنواره‌ی شب یلدا", "kind": "page", "page": "example_page", "username": "sara.mze", "ig_user_id": "17841400000000001", "completed_at": "2026-12-03T10:02:11Z", "missions": [{"type": "ig_follow", "label": "فالو پیج", "rules": {"match": "keywords", "keywords": ["فالو کردم"], "keyword": "فالو کردم"}, "page": "example_page", "done_at": "2026-12-03T09:40:06.512345+00:00", "evidence": "فالو کردم"}, {"type": "ig_story_mention", "label": "منشن پیج در استوری", "rules": {"keep_hours": 6}, "page": "example_page", "done_at": "2026-12-03T10:02:11.100200+00:00", "evidence": "story_mention"}]}}}}}}}, "responses": {"200": {"description": "هر پاسخ 2xx تحویل موفق است."}}}}, "webhook.test": {"post": {"summary": "ارسال آزمایشی از پنل", "x-summary-en": "Test delivery from the panel", "description": "وقتی در پنل «ارسال آزمایشی» را می‌زنید فرستاده می‌شود. `data` نمونه‌ی رویداد دیگری است و `data.sample_of` نامش را دارد. یک بار فرستاده می‌شود و تلاش دوباره ندارد.\n\nپاسخ 2xx یعنی تحویل موفق؛ هر پاسخ دیگر شکست است. ارسال با timeout ۵ ثانیه و بدون دنبال‌کردن ریدایرکت انجام می‌شود. آدرس باید HTTPS و عمومی باشد. امضا را روی بایت‌های خام بدنه راستی‌آزمایی کنید.", "parameters": [{"name": "X-Kavosh-Event", "in": "header", "required": true, "description": "نام رویداد، مثل `campaign.participant.completed`.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Event-Id", "in": "header", "required": true, "description": "شناسه‌ی رویداد (`evt_…`). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ حذف تکراری‌ها با این مقدار.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Timestamp", "in": "header", "required": true, "description": "زمان ارسال این تلاش، ثانیه‌ی یونیکس. در هر تلاش تازه می‌شود. تلورانس بازپخش ۳۰۰ ثانیه است.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Signature", "in": "header", "required": true, "description": "امضای HMAC-SHA256 به شکل `sha256=<hex>` روی رشته‌ی `{timestamp}.{بدنه‌ی خام}` با کلید وب‌هوک شما.", "schema": {"type": "string"}}], "requestBody": {"required": true, "description": "بدنه‌ی JSON با UTF-8 و حروف فارسی بدون escape.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookTestEvent"}, "examples": {"example": {"summary": "نمونه", "value": {"event": "webhook.test", "event_id": "evt_a81c04d29b3e", "created_at": "2026-12-03T10:15:30Z", "data": {"mission_id": "abcce8ed-4b9a-4043-bde3-d5dd11f6e4a4", "mission_type": "ig_follow", "rules": {"page_username": "example_page", "keyword": "فالو کردم"}, "username": "sara.mze", "passed": true, "total_posts": 1, "passed_count": 1, "all_commented": true, "commented_count": 1, "followed": true, "posts": [{"post_url": "https://instagram.com/example_page", "commented": true, "passed": true, "matched_comment": "فالو کردم"}], "inquiry": {"billable": true, "remaining": 59999}, "sample_of": "mission.check.completed"}}}}}}}, "responses": {"200": {"description": "هر پاسخ 2xx تحویل موفق است."}}}}, "mission.check.completed": {"post": {"summary": "نتیجه‌ی استعلام یک مأموریت پنل", "x-summary-en": "Check result of a panel mission", "description": "برای مأموریت‌هایی که در پنل ساخته‌اید (نه کمپین‌های `/v2`): بعد از هر استعلام دستی و برای مأموریت‌های پیام‌رسان وقتی کاربری قبول می‌شود.\n\nپاسخ 2xx یعنی تحویل موفق؛ هر پاسخ دیگر شکست است. ارسال با timeout ۵ ثانیه و بدون دنبال‌کردن ریدایرکت انجام می‌شود. آدرس باید HTTPS و عمومی باشد. امضا را روی بایت‌های خام بدنه راستی‌آزمایی کنید.", "parameters": [{"name": "X-Kavosh-Event", "in": "header", "required": true, "description": "نام رویداد، مثل `campaign.participant.completed`.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Event-Id", "in": "header", "required": true, "description": "شناسه‌ی رویداد (`evt_…`). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ حذف تکراری‌ها با این مقدار.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Timestamp", "in": "header", "required": true, "description": "زمان ارسال این تلاش، ثانیه‌ی یونیکس. در هر تلاش تازه می‌شود. تلورانس بازپخش ۳۰۰ ثانیه است.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Signature", "in": "header", "required": true, "description": "امضای HMAC-SHA256 به شکل `sha256=<hex>` روی رشته‌ی `{timestamp}.{بدنه‌ی خام}` با کلید وب‌هوک شما.", "schema": {"type": "string"}}], "requestBody": {"required": true, "description": "بدنه‌ی JSON با UTF-8 و حروف فارسی بدون escape.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MissionCheckCompletedEvent"}, "examples": {"example": {"summary": "نمونه", "value": {"event": "mission.check.completed", "event_id": "evt_3f1c9a2b7d10", "created_at": "2026-10-20T08:15:30Z", "data": {"mission_id": "abcce8ed-4b9a-4043-bde3-d5dd11f6e4a4", "mission_type": "ig_dm_keyword", "rules": {"page_username": "example_page"}, "username": "sara.mze", "total_posts": 1, "commented_count": 1, "all_commented": true, "passed_count": 1, "passed": true, "posts": [{"post_url": "https://instagram.com/example_page", "commented": true, "passed": true, "matched_comment": "شرکت کردم"}], "inquiry": {"billable": true, "remaining": 59999}}}}}}}}, "responses": {"200": {"description": "هر پاسخ 2xx تحویل موفق است."}}}}, "mission.member.left": {"post": {"summary": "خروج عضو از گروه یا کانال", "x-summary-en": "A member left the chat", "description": "فقط برای مأموریت‌های پیام‌رسان که عضویت را پایش می‌کنند: وقتی کسی که قبلاً قبول شده بود گروه یا کانال را ترک می‌کند. `left_early=true` یعنی قبل از حداقل ماندگاری رفته.\n\nپاسخ 2xx یعنی تحویل موفق؛ هر پاسخ دیگر شکست است. ارسال با timeout ۵ ثانیه و بدون دنبال‌کردن ریدایرکت انجام می‌شود. آدرس باید HTTPS و عمومی باشد. امضا را روی بایت‌های خام بدنه راستی‌آزمایی کنید.", "parameters": [{"name": "X-Kavosh-Event", "in": "header", "required": true, "description": "نام رویداد، مثل `campaign.participant.completed`.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Event-Id", "in": "header", "required": true, "description": "شناسه‌ی رویداد (`evt_…`). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ حذف تکراری‌ها با این مقدار.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Timestamp", "in": "header", "required": true, "description": "زمان ارسال این تلاش، ثانیه‌ی یونیکس. در هر تلاش تازه می‌شود. تلورانس بازپخش ۳۰۰ ثانیه است.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Signature", "in": "header", "required": true, "description": "امضای HMAC-SHA256 به شکل `sha256=<hex>` روی رشته‌ی `{timestamp}.{بدنه‌ی خام}` با کلید وب‌هوک شما.", "schema": {"type": "string"}}], "requestBody": {"required": true, "description": "بدنه‌ی JSON با UTF-8 و حروف فارسی بدون escape.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MissionMemberLeftEvent"}, "examples": {"example": {"summary": "نمونه", "value": {"event": "mission.member.left", "event_id": "evt_c20d7e41a95f", "created_at": "2026-10-21T19:02:11Z", "data": {"mission_id": "abcce8ed-4b9a-4043-bde3-d5dd11f6e4a4", "mission_type": "tg_join", "username": "tg:5521904473", "ref": "user-1042", "chat": "https://t.me/kavosh_channel", "joined_at": "2026-10-20T08:15:30Z", "left_at": "2026-10-21T19:02:11Z", "retained_hours": 34.8, "min_retention_hours": 72, "left_early": true, "was_passed": true}}}}}}}, "responses": {"200": {"description": "هر پاسخ 2xx تحویل موفق است."}}}}, "mission.status.changed": {"post": {"summary": "تغییر وضعیت یک مأموریت پنل", "x-summary-en": "A panel mission changed status", "description": "وقتی یک مأموریت پنل خودکار متوقف یا تمام می‌شود، مثلاً با پایان پلن یا اتمام ساعت پایش.\n\nپاسخ 2xx یعنی تحویل موفق؛ هر پاسخ دیگر شکست است. ارسال با timeout ۵ ثانیه و بدون دنبال‌کردن ریدایرکت انجام می‌شود. آدرس باید HTTPS و عمومی باشد. امضا را روی بایت‌های خام بدنه راستی‌آزمایی کنید.", "parameters": [{"name": "X-Kavosh-Event", "in": "header", "required": true, "description": "نام رویداد، مثل `campaign.participant.completed`.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Event-Id", "in": "header", "required": true, "description": "شناسه‌ی رویداد (`evt_…`). در همه‌ی تلاش‌های دوباره‌ی همین رویداد یکی است؛ حذف تکراری‌ها با این مقدار.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Timestamp", "in": "header", "required": true, "description": "زمان ارسال این تلاش، ثانیه‌ی یونیکس. در هر تلاش تازه می‌شود. تلورانس بازپخش ۳۰۰ ثانیه است.", "schema": {"type": "string"}}, {"name": "X-Kavosh-Signature", "in": "header", "required": true, "description": "امضای HMAC-SHA256 به شکل `sha256=<hex>` روی رشته‌ی `{timestamp}.{بدنه‌ی خام}` با کلید وب‌هوک شما.", "schema": {"type": "string"}}], "requestBody": {"required": true, "description": "بدنه‌ی JSON با UTF-8 و حروف فارسی بدون escape.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MissionStatusChangedEvent"}, "examples": {"example": {"summary": "نمونه", "value": {"event": "mission.status.changed", "event_id": "evt_5d8e2f1a0b67", "created_at": "2026-10-20T08:15:30Z", "data": {"mission_id": "abcce8ed-4b9a-4043-bde3-d5dd11f6e4a4", "mission_type": "ig_dm_keyword", "title": "مسابقه یلدا", "previous_status": "active", "status": "paused", "status_reason": "plan_inactive"}}}}}}}, "responses": {"200": {"description": "هر پاسخ 2xx تحویل موفق است."}}}}}, "x-generated-from": "21add61"}