{"openapi":"3.1.0","info":{"title":"GroupApp API","version":"1"},"servers":[{"url":"https://api.groupapp.co.il"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/bots":{"get":{"operationId":"list_bots","summary":"List bots","parameters":[{"name":"limit","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page; repeat the same filters with it.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"status","in":"query","required":false,"description":"Only bots in this state.","schema":{"type":"string","enum":["connected","alive-unknown","stale","down","degraded"]}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Bot"}}}}]}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/bots/{botId}":{"get":{"operationId":"get_bot","summary":"Get a bot","parameters":[{"name":"botId","in":"path","required":true,"description":"The bot id.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDetail"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/groups":{"get":{"operationId":"list_groups","summary":"List a bot's groups","parameters":[{"name":"botId","in":"query","required":true,"description":"The bot whose groups to list.","schema":{"type":"string","minLength":1}},{"name":"superGroupId","in":"query","required":false,"description":"Only the groups of this super group.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page; repeat the same filters with it.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}]}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/posts":{"get":{"operationId":"list_bot_posts","summary":"List a bot's posts","parameters":[{"name":"botId","in":"query","required":true,"description":"The bot whose posts to list.","schema":{"type":"string","minLength":1}},{"name":"superGroupId","in":"query","required":false,"description":"Only the posts of this super group.","schema":{"type":"string","minLength":1}},{"name":"createdGte","in":"query","required":false,"description":"Only posts created at or after this time. With neither createdGte nor createdLt the last 7 days are listed; with only createdGte, from it to now (it must not be in the future). A window spans at most 31 days and starts at most 400 days back.","schema":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"}},{"name":"createdLt","in":"query","required":false,"description":"Only posts created before this time. With only createdLt, the 31 days before it are listed. A window spans at most 31 days and starts at most 400 days back.","schema":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"}},{"name":"limit","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page; repeat the same filters with it.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PostSummary"}}}}]}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"send_message","summary":"Send a post","parameters":[{"name":"wait","in":"query","required":false,"description":"Whole seconds to hold the response until the send settles; when it settles in time the answer is `200` with the finished request, else `202`.","schema":{"type":"integer","minimum":0,"maximum":10,"default":0}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a retry safe: the same key and body replays the stored `202` (with `Idempotent-Replayed: true`); the same key with another body is `422`. Kept 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"200":{"description":"With `wait`, the send settled in time: the finished request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"202":{"description":"Accepted; the send completes after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when the stored `202` of an earlier request with the same `Idempotency-Key` is replayed; absent otherwise.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The idempotency key was already used with another body.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/posts/{postId}":{"delete":{"operationId":"delete_post","summary":"Delete a post","parameters":[{"name":"postId","in":"path","required":true,"description":"The post id from a post list or a finished request.","schema":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$"}},{"name":"confirmed","in":"query","required":false,"description":"Send `true` to carry out the deletion the plan described.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Without `confirmed=true`: the plan, and nothing was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"202":{"description":"Accepted; every copy is deleted after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_bot_post","summary":"Get a post","parameters":[{"name":"postId","in":"path","required":true,"description":"The post id from a post list or a finished request.","schema":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"edit_post","summary":"Edit a post","parameters":[{"name":"postId","in":"path","required":true,"description":"The post id from a post list or a finished request.","schema":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostEdit"}}}},"responses":{"200":{"description":"Without `confirmed: true`: the plan, and nothing was edited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"202":{"description":"Accepted; every copy is edited after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/requests/{requestId}":{"get":{"operationId":"get_capability_result","summary":"Get a request","parameters":[{"name":"requestId","in":"path","required":true,"description":"The request id, `req_` and a uuid.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The request.","headers":{"Retry-After":{"description":"Seconds to wait before polling again; present only while the request is still open.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/schedules":{"get":{"operationId":"list_schedules","summary":"List a bot's schedules","parameters":[{"name":"botId","in":"query","required":true,"description":"The bot whose schedules to list.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page; repeat the same filters with it.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}]}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"create_schedule","summary":"Create a schedule","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a retry safe: the same key and body replays the stored `202` (with `Idempotent-Replayed: true`); the same key with another body is `422`. Kept 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCreate"}}}},"responses":{"202":{"description":"Accepted; the schedule is created after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when the stored `202` of an earlier request with the same `Idempotency-Key` is replayed; absent otherwise.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The idempotency key was already used with another body.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/schedules/{scheduleId}":{"delete":{"operationId":"delete_schedule","summary":"Delete a schedule","parameters":[{"name":"scheduleId","in":"path","required":true,"description":"The schedule id from a schedule list or a create answer.","schema":{"type":"string","pattern":"^sch_[A-Za-z0-9_-]+$"}},{"name":"confirmed","in":"query","required":false,"description":"Send `true` to carry out the deletion the plan described.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Without `confirmed=true`: the plan, and nothing was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"202":{"description":"Accepted; the schedule is deleted after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_schedule","summary":"Get a schedule","parameters":[{"name":"scheduleId","in":"path","required":true,"description":"The schedule id from a schedule list or a create answer.","schema":{"type":"string","pattern":"^sch_[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"update_schedule","summary":"Change a schedule","parameters":[{"name":"scheduleId","in":"path","required":true,"description":"The schedule id from a schedule list or a create answer.","schema":{"type":"string","pattern":"^sch_[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePatch"}}}},"responses":{"202":{"description":"Accepted; the change is applied after the response.","headers":{"Location":{"description":"The request to poll, `/v1/requests/{id}`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An earlier request with the same idempotency key is still in flight, or the send is already in progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/super-groups":{"get":{"operationId":"list_super_groups","summary":"List a bot's super groups","parameters":[{"name":"botId","in":"query","required":true,"description":"The bot whose super groups to list.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page; repeat the same filters with it.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SuperGroup"}}}}]}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/super-groups/{superGroupId}":{"get":{"operationId":"get_super_group","summary":"Get a super group","parameters":[{"name":"superGroupId","in":"path","required":true,"description":"The super group id.","schema":{"type":"string","minLength":1}},{"name":"botId","in":"query","required":true,"description":"The bot the super group belongs to.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperGroupDetail"}}}},"400":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The API key is missing, invalid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key is not allowed to do this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or outside the key’s scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"The bot is retired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A rate limit was exceeded; wait for `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Bot":{"type":"object","description":"A bot.","properties":{"object":{"type":"string","const":"bot"},"id":{"type":"string","description":"The bot id."},"displayName":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["connected","alive-unknown","stale","down",null],"description":"Connection state; null when it is not available to this key."},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"messagesToday":{"type":["integer","null"]}},"required":["object","id","displayName","status","lastSeenAt","messagesToday"]},"BotDetail":{"type":"object","description":"A bot with its numbers.","properties":{"object":{"type":"string","const":"bot"},"id":{"type":"string","description":"The bot id."},"displayName":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["connected","alive-unknown","stale","down",null],"description":"Connection state; null when it is not available to this key."},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"messagesToday":{"type":["integer","null"]},"instances":{"type":"array","description":"The bot's numbers.","items":{"type":"object","properties":{"id":{"type":"string","description":"The instance id."},"label":{"type":["string","null"]},"state":{"type":"string","enum":["connected","qr","rescan","ban","logout","unknown"],"description":"The WhatsApp session state."},"liveness":{"type":"string","enum":["connected","alive-unknown","stale","down"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","label","state","liveness","lastSeenAt"]}}},"required":["object","id","displayName","status","lastSeenAt","messagesToday","instances"]},"SuperGroup":{"type":"object","description":"A super group in a list.","properties":{"object":{"type":"string","const":"super_group"},"id":{"type":"string"},"botId":{"type":"string"},"name":{"type":"string"},"groupCount":{"type":["integer","null"]},"participantsTotal":{"type":["integer","null"]},"uniqueMembers":{"type":["integer","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["object","id","botId","name","groupCount","participantsTotal","uniqueMembers","updatedAt"]},"SuperGroupDetail":{"type":"object","description":"One super group with the groups it connects.","properties":{"object":{"type":"string","const":"super_group"},"id":{"type":"string"},"botId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["full","one_way"]},"mainGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]},{"type":"null"}]},"connectedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]}},"senderGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]}}},"required":["object","id","botId","name","type","mainGroup","connectedGroups","senderGroups"]},"Group":{"type":"object","description":"A WhatsApp group the bot tracks.","properties":{"object":{"type":"string","const":"group"},"id":{"type":"string","description":"The WhatsApp group id."},"botId":{"type":"string"},"name":{"type":["string","null"]},"superGroupId":{"type":"string"},"receiveOnly":{"type":"boolean"}},"required":["object","id","botId","name","superGroupId","receiveOnly"]},"PostSummary":{"type":"object","description":"A post and how its copies ended.","properties":{"object":{"type":"string","const":"post"},"id":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$","description":"The post id: `pst_` and an opaque token. Treat it as opaque."},"botId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["groupSync","api","scheduled","campaign","status"]},"superGroupId":{"type":["string","null"]},"sourceGroupId":{"type":["string","null"]},"media":{"type":["string","null"],"enum":["text","image","video","audio","document","sticker","location","contact","poll","other",null]},"edited":{"type":"boolean"},"targets":{"type":"object","properties":{"groups":{"type":"integer"},"channels":{"type":"integer"},"telegram":{"type":"integer"},"status":{"type":"integer"}},"required":["groups","channels","telegram","status"]},"sent":{"type":"integer"},"skipped":{"type":"integer"},"failed":{"type":"integer"}},"required":["object","id","botId","createdAt","source","superGroupId","sourceGroupId","media","edited","targets","sent","skipped","failed"]},"PostCreate":{"type":"object","description":"The post to send: to the listed groups, or to every group of a super group. Give exactly one of `targetIds` and `superGroupId`, and `text` or `mediaUrl` or both.","properties":{"botId":{"type":"string","minLength":1,"maxLength":200,"description":"The bot that sends."},"targetIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1},"description":"WhatsApp group ids to send to; duplicates are dropped."},"superGroupId":{"type":"string","minLength":1,"maxLength":200,"description":"A super group to post to."},"text":{"type":"string","minLength":1,"maxLength":65536},"mediaUrl":{"type":"string","minLength":1,"description":"A media file to send. For a customer key it must be an https URL to a public host."},"quotedMessageId":{"type":"string","minLength":1,"maxLength":300,"description":"A message to quote; needs `targetIds` with exactly one target."},"asVoice":{"type":"boolean","description":"Send the audio as a voice note; needs `targetIds` and `mediaUrl`."},"linkPreview":{"type":"boolean"},"sendMediaAsDocument":{"type":"boolean"},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"pattern":"^[A-Za-z0-9_-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string pairs, kept on the request and on the post it makes."}},"required":["botId"],"additionalProperties":false,"oneOf":[{"required":["targetIds"]},{"required":["superGroupId"]}],"anyOf":[{"required":["text"]},{"required":["mediaUrl"]}]},"RequestAccepted":{"type":"object","description":"A request the API accepted; the send runs on after the response.","properties":{"object":{"type":"string","const":"request"},"id":{"type":"string","pattern":"^req_[0-9a-f-]{36}$","description":"The request id; read it at `GET /v1/requests/{id}`."},"status":{"type":"string","const":"accepted"},"botId":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["object","id","status","botId"]},"Request":{"type":"object","description":"A request and how it ended.","properties":{"object":{"type":"string","const":"request"},"id":{"type":"string","pattern":"^req_[0-9a-f-]{36}$"},"status":{"type":"string","enum":["accepted","in_progress","succeeded","failed","unknown"],"description":"An open request (`accepted`, `in_progress`) answers with `Retry-After`."},"botId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"result":{"type":"object","description":"Only for a send: `postId` for a super-group post, `targets` for a send to groups.","properties":{"postId":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$"},"targets":{"type":"array","items":{"type":"object","properties":{"targetId":{"type":"string"},"status":{"type":"string","enum":["sent","failed"]},"messageId":{"type":"string"},"error":{"type":"string"},"refused":{"type":"boolean"}},"required":["targetId","status"]}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"required":["type","title","code","detail"]}},"required":["object","id","status","botId","createdAt"]},"Post":{"type":"object","description":"One post with the outcome of each copy.","properties":{"object":{"type":"string","const":"post"},"id":{"type":"string","pattern":"^pst_[A-Za-z0-9_-]+$","description":"The post id; treat it as opaque."},"botId":{"type":"string"},"superGroupId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"media":{"type":["string","null"],"description":"The media kind, null for a text post."},"targets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"groupId":{"type":"string"},"status":{"type":"string"},"at":{"type":"string","format":"date-time"},"error":{"type":"string"}},"required":["kind","groupId","status","at"]}},"requestId":{"type":"string","pattern":"^req_[0-9a-f-]{36}$","description":"The API request that made the post, only for the owner who sent it."},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["object","id","botId","superGroupId","createdAt","media","targets"]},"PostEdit":{"type":"object","description":"The whole new text of a post. Every copy of the post is edited to it. A call without `confirmed: true` answers a plan and changes nothing.","properties":{"text":{"type":"string","minLength":1,"maxLength":65536,"description":"The new text; it replaces the old text entirely."},"confirmed":{"type":"boolean","description":"Send `true` to carry out the edit the plan described."}},"required":["text"],"additionalProperties":false},"Plan":{"type":"object","description":"What a call that needs confirmation would do. Nothing was changed; repeat the call with `confirmed: true` (a `confirmed=true` query parameter on a call with no body) to carry it out.","properties":{"object":{"type":"string","const":"plan"},"planned":{"type":"boolean","const":true},"plan":{"type":"string","description":"A sentence naming the target and the effect."}},"required":["object","planned","plan"]},"Schedule":{"type":"object","description":"A scheduled send. `recurrence.time` is a clock time and `recurrence.endDate` a calendar date, both Asia/Jerusalem local; `runAt`, `nextRunAt` and every other timestamp are RFC 3339 instants in UTC.","properties":{"object":{"type":"string","const":"schedule"},"id":{"type":"string","pattern":"^sch_[A-Za-z0-9_-]+$","description":"The schedule id: `sch_` and an opaque token. Treat it as opaque."},"botId":{"type":"string"},"kind":{"type":"string","enum":["once","recurring"]},"runAt":{"type":"string","format":"date-time","description":"When a one-time schedule runs."},"recurrence":{"type":"object","properties":{"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Days of the week, 0 is Sunday."},"time":{"type":"string","description":"HH:MM, 24-hour, Asia/Jerusalem local time."},"timeZone":{"type":"string","const":"Asia/Jerusalem"},"endDate":{"type":"string","description":"The last day, YYYY-MM-DD, an Asia/Jerusalem calendar date."}},"required":["daysOfWeek","time","timeZone"]},"nextRunAt":{"type":"string","format":"date-time","description":"The next time it runs."},"message":{"type":"object","description":"The message a schedule made through the API sends; absent for a schedule made another way.","properties":{"text":{"type":"string"},"targetIds":{"type":"array","items":{"type":"string"}},"superGroupId":{"type":"string"},"mediaUrl":{"type":"string"}}}},"required":["object","id","botId","kind"]},"ScheduleCreate":{"type":"object","description":"The schedule to create. Give exactly one of `runAt` and `recurrence`, exactly one of `targetIds` and `superGroupId`, and `text` or `mediaUrl` or both. `recurrence.time` and `recurrence.endDate` are Asia/Jerusalem local; `runAt` is RFC 3339 with an explicit offset or `Z`.","properties":{"botId":{"type":"string","minLength":1,"maxLength":200,"description":"The bot that sends."},"runAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$","description":"When to send once, RFC 3339 with an explicit offset or `Z`, such as `2026-12-01T09:00:00+02:00`."},"recurrence":{"type":"object","description":"A weekly repeat.","properties":{"daysOfWeek":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"type":"integer","minimum":0,"maximum":6},"description":"Days of the week, 0 is Sunday."},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"HH:MM, 24-hour, Asia/Jerusalem local time."},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day, YYYY-MM-DD, an Asia/Jerusalem calendar date."}},"required":["daysOfWeek","time"],"additionalProperties":false},"targetIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1},"description":"WhatsApp group ids to send to; duplicates are dropped."},"superGroupId":{"type":"string","minLength":1,"maxLength":200,"description":"A super group to send to."},"text":{"type":"string","minLength":1,"maxLength":65536},"mediaUrl":{"type":"string","pattern":"^https://\\S+$","description":"A media file to send, an https URL. For a customer key it must be a public host."}},"required":["botId"],"additionalProperties":false,"oneOf":[{"required":["runAt"]},{"required":["recurrence"]}],"anyOf":[{"required":["text"]},{"required":["mediaUrl"]}]},"SchedulePatch":{"type":"object","description":"A change to a schedule: a new `runAt` and/or a whole replacement message, at least one. A message change gives exactly one of `targetIds` and `superGroupId` and `text` or `mediaUrl`, and replaces the old message entirely. `runAt` is RFC 3339 with an explicit offset or `Z`.","properties":{"runAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$","description":"The new time, RFC 3339 with an explicit offset or `Z`."},"targetIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1},"description":"WhatsApp group ids to send to; duplicates are dropped."},"superGroupId":{"type":"string","minLength":1,"maxLength":200,"description":"A super group to send to."},"text":{"type":"string","minLength":1,"maxLength":65536},"mediaUrl":{"type":"string","pattern":"^https://\\S+$","description":"A media file to send, an https URL."}},"additionalProperties":false},"List":{"type":"object","description":"A page of a list.","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{}},"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor`, with the same filters, for the next page."},"asOf":{"type":"string","format":"date-time","description":"How fresh the data is."}},"required":["object","data","hasMore","nextCursor","asOf"]},"Problem":{"type":"object","description":"An RFC 9457 problem details body.","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"type":"string","enum":["invalid-request","missing-key","invalid-key","revoked-key","expired-key","forbidden","not-found","conflict","gone","unprocessable","rate-limited","internal","unavailable"]},"requestId":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string"},"message":{"type":"string"}},"required":["param","message"]}}},"required":["type","title","status","detail","instance","code","requestId"]}}}}