{"openapi":"3.1.0","info":{"title":"Tahrireh Public API","description":"API عمومی تحریریه؛ احراز هویت با کلید API در سرآیند Authorization: Bearer","version":"1.0"},"paths":{"/me":{"get":{"summary":"V1 Me","operationId":"v1_me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connections":{"get":{"summary":"V1 Connections","operationId":"v1_connections_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/articles":{"post":{"summary":"V1 Create","operationId":"v1_create_articles_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Article"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"V1 List","operationId":"v1_list_articles_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/articles/{article_id}":{"get":{"summary":"V1 Get","operationId":"v1_get_articles__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/articles/{article_id}/publish":{"post":{"summary":"V1 Publish","operationId":"v1_publish_articles__article_id__publish_post","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Publish"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/articles/{article_id}/media/{filename}":{"get":{"summary":"V1 Media","operationId":"v1_media_articles__article_id__media__filename__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ledger":{"get":{"summary":"V1 Ledger","operationId":"v1_ledger_ledger_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"V1Article":{"properties":{"keywords":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Keywords"},"sources":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Sources"},"article_url":{"type":"string","maxLength":2000,"title":"Article Url","default":""},"article_type":{"type":"string","enum":["news","analysis","report","tech"],"title":"Article Type","default":"analysis"},"media_mode":{"type":"string","enum":["text","image","video","motion"],"title":"Media Mode","default":"text"},"web_search":{"type":"boolean","title":"Web Search","default":true},"connection_ids":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Connection Ids","description":"در صورت پر بودن، مطلب پس از عبور از کنترل کیفیت خودکار منتشر می‌شود"},"webhook_url":{"type":"string","maxLength":500,"title":"Webhook Url","default":""}},"type":"object","title":"V1Article"},"V1Publish":{"properties":{"connection_ids":{"items":{"type":"string"},"type":"array","maxItems":30,"minItems":1,"title":"Connection Ids"},"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version"}},"type":"object","required":["connection_ids"],"title":"V1Publish"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"/v1"}]}