{"tags":[{"name":"article","description":"Articles that contain academic citations and\/or files"},{"name":"label","description":"Labels used when assigning answers or extracting data from articles"},{"name":"org.billing","description":"Organization billing and usage records"},{"name":"project","description":"Projects that contain articles and labels"},{"name":"user","description":"User accounts"},{"name":"user.billing","description":"User account billing and usage records"},{"name":"webhook","description":"Webhook creation and management"}],"security":[{"bearerAuth":[]}],"paths":{"\/api\/v2\/project\/{project_id}\/export\/{project_export_id}":{"get":{"operationId":"GetProjectExport","description":"Get a project export by ID.","parameters":[{"in":"path","name":"project_id","schema":{"type":"string","example":"proj_125327"},"required":true},{"in":"path","name":"project_export_id","required":true,"schema":{"type":"string","example":"project_export_1"}}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the project export object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectExport"}}}}},"tags":["project"]}},"\/api\/v2\/user\/{user_id}\/billing\/subscription":{"get":{"operationId":"GetUserBillingSubscription","description":"Get an user's subscription to Sysrev.","parameters":[{"in":"path","name":"user_id","schema":{"type":"string","example":"user_139"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the BillingSubscription object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BillingSubscription"}}}}},"tags":["user.billing"]}},"\/api\/v2\/org\/{org_id}\/billing\/auto-label":{"get":{"operationId":"GetOrgAutoLabelBilling","description":"Get an organization's project billing breakdown (XLSX).","parameters":[{"in":"path","name":"org_id","schema":{"type":"string","example":"org_2"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Billing breakdown file","content":{"application\/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["org.billing"]}},"\/api\/v2\/webhook_endpoint":{"post":{"operationId":"CreateWebhookEndpoint","description":"Create a new webhook endpoint.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["event_types","owner_id","url"],"properties":{"event_types":{"type":"array","description":"The list of event types that can be sent to this endpoint. [\"*\"] indicates all event types.","items":{"$ref":"#\/components\/schemas\/WebhookEventTypesItems"},"maxItems":20,"minItems":1},"owner_id":{"type":"string","description":"The ID of organization that the webhook endpoint belongs to.","example":"org_1"},"url":{"type":"string","example":"https:\/\/example.com\/my_endpoint","maxLength":1024,"minLength":10}}}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The webhook endpoint was created successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookEndpoint"}}}}},"tags":["webhook"]}},"\/api\/v2\/project\/{project_id}\/label_stats":{"get":{"operationId":"GetProjectLabelStats","description":"Get label statistics for a project, including both user-created and auto-generated label counts.","parameters":[{"in":"path","name":"project_id","schema":{"type":"string","example":"proj_125327"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns label statistics with separate counts for user and auto labels.","content":{"application\/json":{"schema":{"type":"object","required":["user_labels","auto_labels"],"properties":{"user_labels":{"type":"array","items":{"$ref":"#\/components\/schemas\/LabelStat"},"description":"Counts for human-created labels"},"auto_labels":{"type":"array","items":{"$ref":"#\/components\/schemas\/LabelStat"},"description":"Counts for auto-generated labels"}}}}}}},"tags":["project"]}},"\/api\/v2\/webhook_endpoint\/{webhook_endpoint_id}":{"get":{"operationId":"GetWebhookEndpoint","description":"Get a webhook endpoint by ID.","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"type":"string","example":"we_1"}}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the webhook endpoint object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookEndpoint"}}}}},"tags":["webhook"]},"delete":{"operationId":"DeleteWebhookEndpoint","description":"Delete a webhook endpoint.","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"type":"string","example":"we_1"}}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"The webhook endpoint was deleted successfully.","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["webhook"]},"post":{"operationId":"UpdateWebhookEndpoint","description":"Update an existing webhook endpoint.","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"type":"string","example":"we_1"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["event_types","owner_id","url"],"properties":{"event_types":{"type":"array","description":"The list of event types that can be sent to this endpoint. [\"*\"] indicates all event types.","items":{"$ref":"#\/components\/schemas\/WebhookEventTypesItems"},"maxItems":20,"minItems":1},"owner_id":{"type":"string","description":"The ID of organization that the webhook endpoint belongs to.","example":"org_1"},"url":{"type":"string","example":"https:\/\/example.com\/my_endpoint","maxLength":1024,"minLength":10}}}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"The webhook endpoint was updated successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookEndpoint"}}}}},"tags":["webhook"]}},"\/api\/v2\/label\/{label_id}":{"get":{"operationId":"GetLabel","description":"Get a label by ID.","parameters":[{"in":"path","name":"label_id","schema":{"type":"string","example":"label_1"},"required":true},{"in":"query","name":"quote_schema","schema":{"type":"boolean"}}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the label object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Label"}}}}},"tags":["label"]},"post":{"operationId":"SetLabel","description":"Get a label by ID.","parameters":[{"in":"path","name":"label_id","schema":{"type":"string","example":"label_1"},"required":true},{"in":"query","name":"quote_schema","schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"settings":{"$ref":"#\/components\/schemas\/LabelSettings"}}}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the label object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Label"}}}}},"tags":["label"]}},"\/api\/v2\/label":{"post":{"operationId":"NewLabel","description":"Create a new label.","parameters":[{"in":"query","name":"project_id","schema":{"type":"string","example":"proj_125327"}},{"in":"query","name":"quote_schema","schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"settings":{"$ref":"#\/components\/schemas\/LabelSettings"}}}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the label object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Label"}}}}},"tags":["label"]}},"\/api\/v2\/article\/{article_id}\/labels":{"post":{"operationId":"UpdateArticleLabels","description":"Create or update labels on an article without affecting labels that aren\u2019t included in the request.\n\nUse this endpoint to upsert labels on an article.\nOnly the labels explicitly provided in the request are created or updated; all other existing labels on the article remain unchanged.\n\nThis is useful when you want to incrementally an article or update a subset of labels without having to read and resend the entire label state.","parameters":[{"in":"path","name":"article_id","schema":{"type":"string","example":"art_3"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SetArticleLabelsRequest"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Success","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["article"]},"put":{"operationId":"SetArticleLabels","description":"Replace the entire label state for an article with the labels provided in the request.\n\nUse this endpoint to set the complete label set for an article in one shot.\nAfter this call, the article\u2019s labels will match the labels object in the request exactly. Any labels that existed before but are not present in the request are cleared\/removed.\n\nThis is useful when you have the full set of labels for an article and want to enforce that state.","parameters":[{"in":"path","name":"article_id","schema":{"type":"string","example":"art_3"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SetArticleLabelsRequest"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Success","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["article"]}},"\/api\/v2\/project\/{project_id}":{"get":{"operationId":"GetProject","description":"Get a project by ID.","parameters":[{"in":"path","name":"project_id","schema":{"type":"string","example":"proj_125327"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the project object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Project"}}}}},"tags":["project"]}},"\/api\/v2\/user\/{user_id}\/billing\/settings":{"get":{"operationId":"GetUserBillingSettings","description":"Get a user's billing settings.","parameters":[{"in":"path","name":"user_id","schema":{"type":"string","example":"user_139"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the UserBillingSettings object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserBillingSettings"}}}}},"tags":["user.billing"]},"post":{"operationId":"UpdateUserBillingSettings","description":"Update a user's billing settings.","parameters":[{"in":"path","name":"user_id","schema":{"type":"string","example":"user_139"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserBillingSettings"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"The user's billing settings were updated successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserBillingSettings"}}}}},"tags":["user.billing"]}},"\/api\/v2\/source":{"post":{"operationId":"CreateSource","description":"Create a new source of articles.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateSourceInput"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The source was created successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Source"}}}}},"tags":["source"]}},"\/api\/v2\/enterprise\/{enterprise_id}\/billing\/usage":{"get":{"operationId":"GetEnterpriseBillingUsage","description":"Get the allowance and credit balance of an enterprise.","parameters":[{"in":"path","name":"enterprise_id","schema":{"type":"string","example":"ent_2"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the UserBillingUsage object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserBillingUsage"}}}}},"tags":["enterprise.billing"]}},"\/api\/v2\/article":{"post":{"operationId":"CreateArticle","description":"Create a new article.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateArticleInput"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The article was created successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Article"}}}}},"tags":["article"]}},"\/api\/v2\/user\/{user_id}":{"get":{"operationId":"GetUser","description":"Get a user by ID.","parameters":[{"in":"path","name":"user_id","schema":{"type":"string","example":"user_139"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the user object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}}}}},"tags":["user"]}},"\/api\/v2\/project_highlighters":{"get":{"operationId":"ListProjectHighlighters","description":"List all article text highlighters for a project.","parameters":[{"in":"query","name":"project_id","schema":{"type":"string","example":"proj_125327"}}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns an array of highlighter objects.","content":{"application\/json":{"schema":{"type":"object","required":["highlighters"],"properties":{"highlighters":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProjectHighlighter"}}}}}}}},"tags":["project_highlighter"]},"post":{"operationId":"CreateProjectHighlighter","description":"Create a new article text highlighter for a project.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateProjectHighlighterInput"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The highlighter was created successfully.","content":{"application\/json":{"schema":{"type":"object","required":["highlighter"],"properties":{"highlighter":{"$ref":"#\/components\/schemas\/ProjectHighlighter"}}}}}}},"tags":["project_highlighter"]}},"\/api\/v2\/org\/{org_id}\/billing\/subscription":{"get":{"operationId":"GetOrgBillingSubscription","description":"Get an organization's subscription to Sysrev.","parameters":[{"in":"path","name":"org_id","schema":{"type":"string","example":"org_2"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the BillingSubscription object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BillingSubscription"}}}}},"tags":["org.billing"]}},"\/api\/v2\/article\/{article_id}\/suppression":{"put":{"operationId":"SetArticleSuppression","description":"Remove an article from review","parameters":[{"in":"path","name":"article_id","schema":{"type":"string","example":"art_3"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#\/components\/schemas\/ArticleSuppressionType"}},"required":["type"]}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Success","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["article"]},"delete":{"operationId":"DeleteArticleSuppression","description":"Remove an article from review","parameters":[{"in":"path","name":"article_id","schema":{"type":"string","example":"art_3"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Success","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["article"]}},"\/api\/v2\/project\/{project_id}\/export":{"post":{"operationId":"StartProjectExport","description":"Start a project export.","parameters":[{"in":"path","name":"project_id","schema":{"type":"string","example":"proj_125327"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/StartProjectExportInput"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The project export was started.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectExport"}}}}},"tags":["project"]}},"\/api\/v2\/article\/{article_id}":{"get":{"operationId":"GetArticle","description":"Get an article by ID.","parameters":[{"in":"path","name":"article_id","schema":{"type":"string","example":"art_3"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the article object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Article"}}}}},"tags":["article"]}},"\/api\/v2\/user\/{user_id}\/billing\/usage":{"get":{"operationId":"GetUserBillingUsage","description":"Get a user's billing usage for the current billing period.","parameters":[{"in":"path","name":"user_id","schema":{"type":"string","example":"user_139"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the UserBillingUsage object.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserBillingUsage"}}}}},"tags":["user.billing"]}},"\/api\/v2\/project":{"post":{"operationId":"CreateProject","description":"Create a new project.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateProjectInput"}}}},"examples":{"create_private":{"summary":"Create a new private project","value":{"is_public":false,"name":"My-Project"}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"201":{"description":"The project was created successfully.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Project"}}}}},"tags":["project"]}},"\/api\/v2\/project_highlighters\/{highlighter_id}":{"get":{"operationId":"GetProjectHighlighter","description":"Get a specific article text highlighter by ID.","parameters":[{"in":"path","name":"highlighter_id","schema":{"type":"string","example":"phl_1"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"Returns the highlighter object.","content":{"application\/json":{"schema":{"type":"object","required":["highlighter"],"properties":{"highlighter":{"$ref":"#\/components\/schemas\/ProjectHighlighter"}}}}}}},"tags":["project_highlighter"]},"put":{"operationId":"UpdateProjectHighlighter","description":"Update an article text highlighter.","parameters":[{"in":"path","name":"highlighter_id","schema":{"type":"string","example":"phl_1"},"required":true}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateProjectHighlighterInput"}}}},"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"The highlighter was updated successfully.","content":{"application\/json":{"schema":{"type":"object","required":["highlighter"],"properties":{"highlighter":{"$ref":"#\/components\/schemas\/ProjectHighlighter"}}}}}}},"tags":["project_highlighter"]},"delete":{"operationId":"DeleteProjectHighlighter","description":"Delete an article text highlighter.","parameters":[{"in":"path","name":"highlighter_id","schema":{"type":"string","example":"phl_1"},"required":true}],"responses":{"default":{"description":"Error response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"200":{"description":"The highlighter was deleted successfully.","content":{"application\/json":{"schema":{"type":"object"}}}}},"tags":["project_highlighter"]}}},"webhooks":{"AutoLabelAnswerUpdated":{"post":{"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AutoLabelAnswerUpdatedRequest"}}},"description":"One or more auto-label answers were updated"},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"WebhookEventTypesItems":{"type":"string","enum":["*","auto_label_answer.updated"]},"Label":{"type":"object","required":["id"],"properties":{"id":{"type":"string","example":"label_1"},"settings":{"$ref":"#\/components\/schemas\/LabelSettings"}},"example":{"id":"label_1","schema":{"type":"boolean","title":"Include","description":"Include this article?"}}},"OrgSettings":{"type":"object","properties":{"allow_member_project_access":{"type":"boolean"}}},"ArticleFullTextContentJson":{"type":"object","properties":{"json":{"type":["string","object"],"format":"json"}},"required":["json"]},"ProjectExportType":{"type":"string","enum":["parquet"]},"CreateProjectHighlighterInput":{"type":"object","required":["project_id","title","color","patterns"],"properties":{"project_id":{"type":"string","example":"proj_125327"},"title":{"type":"string","description":"The title of the highlighter"},"color":{"type":"string","description":"The hex color code for highlighting (e.g., #FF0000)"},"patterns":{"type":"array","items":{"type":"string"},"description":"Array of regular expressions to match article text for highlighting"},"position":{"type":"integer","description":"Optional position for the highlighter. If not provided, appends to end."}}},"CreateEnterpriseInput":{"type":"object","required":["root_org_id","user_id"],"properties":{"root_org_id":{"type":"string","example":"org_2","description":"The root organization of the enterprise. Admins of this org will have access to other orgs within the enterprise."},"user_id":{"type":"string","example":"user_139","description":"ID of a user whose Stripe customer id will be used for the enterprise.\n         The user can be created just for the enterprise and need not be the account of a human user."}}},"ProjectBillingSettings":{"description":"This is an object representing an project's billing settings.","type":"object","properties":{"limit":{"type":"object","properties":{"strategy":{"$ref":"#\/components\/schemas\/BillingLimitStrategy"},"amount":{"type":"integer"}},"required":["strategy","amount"]}},"required":["limit"]},"ProjectExportStatus":{"type":"string","enum":["in_progress","failed","succeeded"]},"ProjectBillingUsage":{"description":"This is an object representing an account's usage for a given billing period.","type":"object","properties":{"total":{"type":"integer"},"lifetime_usage":{"type":"integer"},"usage":{"type":"integer"},"usage_period":{"$ref":"#\/components\/schemas\/BillingUsagePeriod"},"monthly_usage":{"type":"integer"},"limit_strategy":{"$ref":"#\/components\/schemas\/BillingLimitStrategy"},"unused_limit":{"type":"integer"},"pending_charges":{"type":"integer"},"available":{"type":"integer"}},"required":["total","usage","usage-period","unused-limit","limit-strategy","pending-charges","available"]},"LibkeyInstitution":{"type":"object","properties":{"library_id":{"type":"string"},"library_name":{"type":"string"},"source":{"type":"string"}}},"ArticleLabels":{"type":"object","additionalProperties":true},"OrgProject":{"type":"object","properties":{"project_id":{"type":"string","example":"proj_125327"},"name":{"type":"string"},"member_count":{"type":"integer"},"last_active":{"type":"string"},"settings":{"$ref":"#\/components\/schemas\/ProjectSettings"},"admins":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"user_id":{"type":"string"}}}}}},"ProjectInvite":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}},"example":{"code":"3_tFlSS2Ud08B3D2Q_FQWHM44XIoOuB1IMhOKOmJRSgDDf8jbtN_iGr5QbD8UKYCE8PK_nLvsCYK1E8cVtZWfDog"}},"UserBillingSettings":{"description":"This is an object representing an user's billing settings.","type":"object","properties":{"limit":{"type":"object","properties":{"amount":{"type":"integer"}},"required":["amount"]}},"required":["limit"]},"OrgInvite":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}},"example":{"code":"3_tFlSS2Ud08B3D2Q_FQWHM44XIoOuB1IMhOKOmJRSgDDf8jbtN_iGr5QbD8UKYCE8PK_nLvsCYK1E8cVtZWfDog"}},"TransferProjectInput":{"type":"object","required":["new_owner_id"],"properties":{"new_owner_id":{"type":"string","description":"The ID of the user or organization that will be the new owner of the project.","example":"user_1"}}},"LabelStat":{"description":"Label count statistics for a specific label value.","type":"object","required":["label_id","name","value_type","value","count"],"properties":{"label_id":{"type":"string","example":"label_1"},"name":{"type":"string","description":"The short label name"},"value_type":{"type":"string","enum":["boolean","categorical"]},"value":{"description":"The label value being counted"},"count":{"type":"integer","minimum":0}},"example":{"label_id":"label_1","name":"Include","value_type":"boolean","value":true,"count":42}},"LibkeyInstitutionInput":{"type":"object","properties":{"library_id":{"type":"string"},"library_name":{"type":"string"}}},"AutoLabelAnswer":{"type":"object","required":["article_id","label_id","value"],"properties":{"article_id":{"type":"string","example":"art_3"},"label_id":{"type":"string","example":"label_1"},"explanation":{"type":"string","maxLength":2048},"probability":{"type":"number","minimum":0,"maximum":1}},"example":{"article_id":"art_1","label_id":"label_1","value":["copper","nickel"],"explanation":"High levels of copper and nickel were found in the soil samples.","probability":0.77}},"ArticleSuppressionType":{"type":"string","enum":["manual"]},"CreateSourceInput":{"type":"object","properties":{"project_id":{"type":"string","example":"proj_125327"}},"required":["project_id"]},"WebhookEndpoint":{"description":"This is an object representing a webhook endpoint.","type":"object","required":["id"],"properties":{"created_at":{"type":"integer","format":"unix_time"},"event_types":{"type":"array","description":"The list of event types that can be sent to this endpoint. [\"*\"] indicates all event types.","items":{"$ref":"#\/components\/schemas\/WebhookEventTypesItems"},"maxItems":20,"minItems":1},"id":{"type":"string","example":"we_1"},"owner_id":{"type":"string","description":"The ID of organization that the webhook endpoint belongs to.","example":"org_1"},"updated_at":{"type":"integer","format":"unix_time"},"url":{"type":"string","example":"https:\/\/example.com\/my_endpoint","maxLength":1024,"minLength":10}}},"BillingSubscription":{"description":"This is an object representing a subscription to Sysrev.","type":"object","required":["is_premium"],"properties":{"is_premium":{"description":"Whether the subscription is a premium subscription.","type":"boolean"}}},"Enterprise":{"description":"This is an object representing an enterprise.","type":"object","required":["id","org_ids"],"properties":{"created_at":{"type":"integer","format":"unix_time"},"id":{"type":"string","example":"ent_2"},"name":{"type":"string"},"org_ids":{"type":"array","items":{"type":"string","example":"org_2"}}}},"BillingLimitStrategy":{"description":"Limit by monthly or lifetime spend, or inherit owner restrictions.","type":"string","enum":["monthly","owner","lifetime"]},"AutoLabelAnswerUpdatedRequest":{"type":"object","required":["auto_label_answer","event_type"],"properties":{"auto_label_answers":{"type":"array","items":{"$ref":"#\/components\/schemas\/AutoLabelAnswer"},"maxItems":50,"minItems":1},"event_type":{"type":"string","enum":["auto_label_answer.updated"]}}},"CreateArticleInput":{"type":"object","properties":{"source_id":{"type":"string","example":"src_1"},"citation":{"type":"object","properties":{"title":{"type":"string","example":"A FAIR Platform for Data Curation"},"type":{"type":"string","example":"article-journal"}},"required":["title","type"]},"full_texts":{"type":"array","items":{"$ref":"#\/components\/schemas\/ArticleFullText"}}},"required":["source_id"],"example":{"source_id":"src_8293","citation":{"title":"Hello world","type":"article-journal"},"full_texts":[{"file_name":"president_16.json","content":{"json":{"first_name":"Abraham","last_name":"Lincoln"}}},{"file_name":"hello_world.pdf","content":{"file_data":{"mime_type":"application\/pdf","data":"<B64 string>"}}}]}},"User":{"description":"This is an object representing a Sysrev user account.","type":"object","required":["id"],"properties":{"id":{"type":"string"},"created_at":{"type":"integer","format":"unix_time"},"introduction":{"type":"string"},"username":{"type":"string"}}},"ArticleLabelsPayload":{"type":"object","properties":{"label_user_id":{"type":"string","example":"user_139"},"labels":{"$ref":"#\/components\/schemas\/ArticleLabels"}},"required":["labels"],"additionalProperties":false},"ArticleFullTextContentBlob":{"type":"object","properties":{"file_data":{"$ref":"#\/components\/schemas\/Blob"}},"required":["file_data"]},"AutoArticleLabel":{"type":"object","properties":{"label_id":{"type":"string"},"reasoning":{"type":["object","null"]},"probability":{"type":["number","null"],"minimum":0,"maximum":1},"is_failure":{"type":"boolean"},"article_id":{"type":"string"},"auto_label_run_id":{"type":"string"},"created_at":{"type":"integer","format":"unix_time"},"explanation":{"type":"string"},"is_pending":{"type":"boolean"}},"required":["auto_label_run_id","article_id","label_id","created_at","value","explanation","probability","reasoning","is_pending","is_failure"],"example":{"label_id":"label_1","reasoning":null,"probability":0.77,"is_failure":false,"article_id":"art_1","value":["copper","nickel"],"auto_label_run_id":"alr_1","created_at":1793628268440,"explanation":"High levels of copper and nickel were found in the soil samples.","is_pending":false}},"ArticleFullTextContent":{"description":"This is an object representing a source of articles.","type":"object","oneOf":[{"$ref":"#\/components\/schemas\/ArticleFullTextContentJson"},{"$ref":"#\/components\/schemas\/ArticleFullTextContentBlob"}]},"CloneProjectInput":{"type":"object","required":["owner_id"],"properties":{"copy_articles":{"type":"boolean","description":"Whether to copy articles to the new project.","default":true},"copy_label_answers":{"type":"boolean","description":"Whether to copy label answers to the new project.","default":true},"copy_labels":{"type":"boolean","description":"Whether to copy labels to the new project.","default":true},"owner_id":{"type":"string","description":"The ID of the user or organization that will be the owner of the new cloned project.","example":"user_1"}}},"SetArticleLabelsRequest":{"allOf":[{"$ref":"#\/components\/schemas\/ArticleLabelsPayload"}]},"Article":{"description":"This is an object representing an article.","type":"object","required":["id","title"],"properties":{"id":{"type":"string","example":"art_3"},"title":{"type":"string","example":"A FAIR Platform for Data Curation"}}},"LabelSettings":{"type":"object","properties":{"hidden":{"type":"boolean"},"enabled":{"type":"boolean"},"consensus":{"type":"boolean"},"overall_include":{"type":"boolean"},"auto_label_enabled":{"type":"boolean"},"auto_label_full_text":{"type":"boolean"},"auto_label_reasoning":{"type":"boolean"},"auto_label_model":{"type":"string"}}},"UserBillingUsage":{"description":"This is an object representing an account's usage for a given billing period.","type":"object","properties":{"total":{"type":"integer"},"usage":{"type":"integer"},"credit":{"type":"integer"},"usage_period":{"$ref":"#\/components\/schemas\/BillingUsagePeriod"},"monthly":{"type":"integer"},"limit_strategy":{"$ref":"#\/components\/schemas\/BillingLimitStrategy"},"unused_limit":{"type":"integer"},"pending_charges":{"type":"integer"},"available":{"type":"integer"}},"required":["credit","monthly","total","usage","usage_period","unused_limit","limit_strategy","pending_charges","available"]},"Blob":{"description":"Raw media bytes","type":"object","properties":{"mime_type":{"type":"string"},"data":{"type":"string"}},"required":["mime_type","data"]},"AutoLabelRun":{"type":"object","required":["id"],"properties":{"id":{"type":"string"}},"example":{"id":"alr_1"}},"CreateProjectInput":{"type":"object","required":["is_public","name"],"properties":{"is_public":{"type":"boolean","description":"Whether the project is public. If true, the project will be publicly visible. If false, the project will be visible only to its members. "},"name":{"type":"string","description":"The name of the project. Must be 40 characters or less. May only contain letters, numbers, and hyphens. It may not start or end with a hyphen."},"org_id":{"type":"string","description":"Optional organization to assign the new project to."}}},"Error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"ProjectSettings":{"type":"object","properties":{"auto_save_labels":{"type":"boolean","description":"Automatically save review labels"},"blind_reviewers":{"type":"boolean","description":"Label blinding"},"enabled":{"type":"boolean","description":"Project enabled"},"freeze_model":{"type":"boolean","description":"Freeze model"},"public_access":{"type":"boolean","description":"Project visibility"},"second_review_prob":{"type":["string","number"]},"unlimited_reviews":{"type":"boolean","description":"Allow unlimited reviews"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#\/components\/schemas\/Error"}},"required":["message"]},"BillingUsagePeriod":{"description":"The period by which the usage amount is tracked.","type":"string","enum":["monthly","lifetime"]},"EnterpriseLibkeyInstitution":{"type":"object","properties":{"library_id":{"type":"string"},"library_name":{"type":"string"}}},"Source":{"description":"This is an object representing a source of articles.","type":"object","required":["id"],"properties":{"id":{"type":"string","example":"src_1"}}},"ProjectHighlighter":{"description":"This is an object representing a project text highlighter for highlighting article text.","type":"object","required":["id","project_id","title","color","patterns","position"],"properties":{"id":{"type":"string","example":"phl_1"},"project_id":{"type":"string","example":"proj_125327"},"title":{"type":"string","description":"The title of the highlighter"},"color":{"type":"string","description":"The hex color code for highlighting (e.g., #FF0000)"},"patterns":{"type":"array","items":{"type":"string"},"description":"Array of regular expressions to match article text for highlighting"},"position":{"type":"integer","description":"The display order position of the highlighter"}}},"StartProjectExportInput":{"type":"object","required":["export_type"],"properties":{"export_type":{"$ref":"#\/components\/schemas\/ProjectExportType"}}},"ArticleFullText":{"description":"This is an object representing a source of articles.","type":"object","properties":{"file_name":{"type":"string"},"content":{"$ref":"#\/components\/schemas\/ArticleFullTextContent"}},"required":["file_name","content"]},"Org":{"description":"This is an object representing a Sysrev organization.","type":"object","required":["id","name","owner_user_id"],"properties":{"id":{"type":"string","example":"org_2"},"is_enterprise":{"type":"boolean"},"name":{"type":"string"},"enterprise_id":{"type":["string","null"],"example":"ent_2"},"owner_user_id":{"type":"string","example":"user_139"}}},"UpdateProjectHighlighterInput":{"type":"object","properties":{"title":{"type":"string","description":"The title of the highlighter"},"color":{"type":"string","description":"The hex color code for highlighting (e.g., #FF0000)"},"patterns":{"type":"array","items":{"type":"string"},"description":"Array of regular expressions to match article text for highlighting"},"position":{"type":"integer","description":"The display order position of the highlighter"}}},"LibkeyLink":{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}}},"ProjectExport":{"description":"This is an object representing a project export.","type":"object","required":["id"],"properties":{"id":{"type":"string","example":"project_export_1"},"created_at":{"type":"integer","format":"unix_time"},"download_url":{"type":"string","description":"The URL to download the export."},"export_type":{"$ref":"#\/components\/schemas\/ProjectExportType"},"status":{"$ref":"#\/components\/schemas\/ProjectExportStatus"}}},"Project":{"description":"This is an object representing a Sysrev project.","type":"object","required":["id"],"properties":{"id":{"type":"string","example":"proj_125327"},"created_at":{"type":"integer","format":"unix_time"},"is_public":{"type":"boolean"},"name":{"type":"string"}}}}},"info":{"title":"Sysrev API","description":"Manage Sysrev projects, articles, and labels.","version":"2.0.0"},"openapi":"3.1.0"}