{"openapi":"3.1.0","info":{"title":"Scrive (BYOK) API","version":"0.1.0","description":"Scrive (BYOK) lets an AI assistant read your own Scrive data through the Scrive API with a key you supply (Scrive personal access credentials, pasted exactly as: oauth_consumer_key=\"<apitoken>\", oauth_token=\"<accesstoken>\", oauth_signature=\"<apisecret>&<accesssecret>\"). Read-only: 9 tools (get_system_status, list_user_groups, get_user_group, get_user_group_settings, get_folder,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-scrive.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-scrive/docs"},"termsOfService":"https://connectorbay.com/byok-scrive/terms"},"servers":[{"url":"https://byok-scrive.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-scrive/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_system_status":{"post":{"operationId":"get_system_status","summary":"Check Scrive's system status; returns status ok when the service is healthy. Use for \"Is Scrive up right now\".","description":"Check Scrive's system status; returns status ok when the service is healthy. Use for \"Is Scrive up right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_system_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_user_groups":{"post":{"operationId":"list_user_groups","summary":"List the user groups you can access with id, name and parent group id; optionally filtered by name. Use for \"Which Scriv","description":"List the user groups you can access with id, name and parent group id; optionally filtered by name. Use for \"Which Scrive user groups can I see\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"filter":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"JSON list of filters, for example [{\"filter_by\":\"name\",\"value\":\"sales\"}]; omit for all groups.","title":"Filter"}},"title":"list_user_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user_group":{"post":{"operationId":"get_user_group","summary":"Get one user group: name, parent, child groups, settings including data retention policy, and tags (contact details are ","description":"Get one user group: name, parent, child groups, settings including data retention policy, and tags (contact details are not returned). Use for \"Show the Scrive user group 5 with its children and retention settings\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user_group_id":{"description":"User group id (a number given as text), for example '5'.","maxLength":200,"title":"User Group Id","type":"string"}},"required":["user_group_id"],"title":"get_user_groupArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user_group_settings":{"post":{"operationId":"get_user_group_settings","summary":"Get a user group's settings: where they are inherited from and the data retention policy (idle timeouts per document sta","description":"Get a user group's settings: where they are inherited from and the data retention policy (idle timeouts per document state, immediate trash). Use for \"What data retention policy applies to Scrive user group 5\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user_group_id":{"description":"User group id (a number given as text), for example '5'.","maxLength":200,"title":"User Group Id","type":"string"}},"required":["user_group_id"],"title":"get_user_group_settingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_folder":{"post":{"operationId":"get_folder","summary":"Get a folder's metadata: name, parent, home owner ids and child folders (not the documents inside); recursive lists all ","description":"Get a folder's metadata: name, parent, home owner ids and child folders (not the documents inside); recursive lists all descendants. Use for \"How is my Scrive folder 1 organised\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"folder_id":{"description":"Folder id (a number given as text), for example '1'.","maxLength":200,"title":"Folder Id","type":"string"},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include all descendant folders instead of immediate children.","title":"Recursive"}},"required":["folder_id"],"title":"get_folderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_data_retention_policy":{"post":{"operationId":"get_data_retention_policy","summary":"Get the data retention policies that apply to your user and company. Use for \"How long does Scrive keep my documents bef","description":"Get the data retention policies that apply to your user and company. Use for \"How long does Scrive keep my documents before deleting them\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_data_retention_policyArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_user_tags":{"post":{"operationId":"list_user_tags","summary":"List the name/value tags attached to the API user. Use for \"Which tags are set on my Scrive user\".","description":"List the name/value tags attached to the API user. Use for \"Which tags are set on my Scrive user\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_user_tagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_usage_stats_days":{"post":{"operationId":"get_usage_stats_days","summary":"Get document-count usage statistics per day for the last 30 days (or a date range), for the user or the whole company. U","description":"Get document-count usage statistics per day for the last 30 days (or a date range), for the user or the whole company. Use for \"How many Scrive documents did we process per day last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"with_company":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include a summary of the company's statistics (needed for the user group options below).","title":"With Company"},"user_group_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"User group id to report on; only used when with_company is true and must be a child of your group.","title":"User Group Id"},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include child user groups; only used when with_company is true.","title":"Recursive"},"include_zero_records":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include days or months without any usage.","title":"Include Zero Records"},"from_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Lower date bound as YYYY-MM-DD or YYYY-MM.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Upper date bound as YYYY-MM-DD or YYYY-MM.","title":"To Date"}},"title":"get_usage_stats_daysArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_usage_stats_months":{"post":{"operationId":"get_usage_stats_months","summary":"Get document-count usage statistics per month for up to the last 12 months (or a date range), for the user or the whole ","description":"Get document-count usage statistics per month for up to the last 12 months (or a date range), for the user or the whole company. Use for \"How many Scrive documents did we process per month this year\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"with_company":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include a summary of the company's statistics (needed for the user group options below).","title":"With Company"},"user_group_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"User group id to report on; only used when with_company is true and must be a child of your group.","title":"User Group Id"},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include child user groups; only used when with_company is true.","title":"Recursive"},"include_zero_records":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include days or months without any usage.","title":"Include Zero Records"},"from_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Lower date bound as YYYY-MM-DD or YYYY-MM.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Upper date bound as YYYY-MM-DD or YYYY-MM.","title":"To Date"}},"title":"get_usage_stats_monthsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}