{"openapi":"3.1.0","info":{"title":"Devin (BYOK) API","version":"0.1.0","description":"Devin (BYOK) lets an AI assistant read your own Devin data through the Devin API with a key you supply (Devin service user API key (starts with cog_, organization scope)). Read-only: 12 tools (get_self, list_sessions, get_session, get_daily_consumption, get_usage_metrics, get_session_metrics, get_pr_metrics, get_daily_active_users, list_schedules, list_playbooks, list_automations,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-devin.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-devin/docs"},"termsOfService":"https://connectorbay.com/byok-devin/terms"},"servers":[{"url":"https://byok-devin.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-devin/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_self":{"post":{"operationId":"get_self","summary":"Show which Devin service user and organization the API key belongs to. Reads metadata only: it starts no Devin session a","description":"Show which Devin service user and organization the API key belongs to. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which Devin organization is my API key for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_selfArguments","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_sessions":{"post":{"operationId":"list_sessions","summary":"List Devin sessions with status, title, tags, origin, category and ACUs consumed, newest first. Reads metadata only: it ","description":"List Devin sessions with status, title, tags, origin, category and ACUs consumed, newest first. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"What Devin sessions ran this week and how many ACUs did they use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"first":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return (1 to 200).","title":"First"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the end_cursor of the previous answer.","title":"After"},"created_after":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only sessions created after this Unix timestamp in seconds.","title":"Created After"},"created_before":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only sessions created before this Unix timestamp in seconds.","title":"Created Before"},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Only archived (true) or only active (false) sessions.","title":"Is Archived"}},"required":["org_id"],"title":"list_sessionsArguments","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_session":{"post":{"operationId":"get_session","summary":"Get one Devin session: status, title, tags, pull requests, ACUs consumed, origin and category. Reads metadata only: it s","description":"Get one Devin session: status, title, tags, pull requests, ACUs consumed, origin and category. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"What happened in Devin session devin-0123456789abcdef\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"devin_id":{"description":"Devin session id, as returned by list_sessions (session_id).","maxLength":100,"title":"Devin Id","type":"string"}},"required":["org_id","devin_id"],"title":"get_sessionArguments","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_daily_consumption":{"post":{"operationId":"get_daily_consumption","summary":"Get ACUs consumed per day by the organization over a time range, with the total. Reads metadata only: it starts no Devin","description":"Get ACUs consumed per day by the organization over a time range, with the total. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"How many ACUs did my Devin organization use each day this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"time_after":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Start of the range as a Unix timestamp in seconds.","title":"Time After"},"time_before":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"End of the range as a Unix timestamp in seconds.","title":"Time Before"}},"required":["org_id"],"title":"get_daily_consumptionArguments","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_metrics":{"post":{"operationId":"get_usage_metrics","summary":"Get the organization's session, search and pull request counts over a time range. Reads metadata only: it starts no Devi","description":"Get the organization's session, search and pull request counts over a time range. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"How much has my team used Devin\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"time_after":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Start of the range as a Unix timestamp in seconds.","title":"Time After"},"time_before":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"End of the range as a Unix timestamp in seconds.","title":"Time Before"}},"required":["org_id"],"title":"get_usage_metricsArguments","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_session_metrics":{"post":{"operationId":"get_session_metrics","summary":"Get how many Devin sessions were created, by size and origin, how many used playbooks and merged PRs, and the average AC","description":"Get how many Devin sessions were created, by size and origin, how many used playbooks and merged PRs, and the average ACUs per session. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which sizes and sources are my Devin sessions coming from\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"time_after":{"description":"Start of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time After","type":"integer"},"time_before":{"description":"End of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time Before","type":"integer"}},"required":["org_id","time_after","time_before"],"title":"get_session_metricsArguments","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_pr_metrics":{"post":{"operationId":"get_pr_metrics","summary":"Get pull requests Devin created, opened, merged, closed or had taken over by people over a time range. Reads metadata on","description":"Get pull requests Devin created, opened, merged, closed or had taken over by people over a time range. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"How many pull requests did Devin merge last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"time_after":{"description":"Start of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time After","type":"integer"},"time_before":{"description":"End of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time Before","type":"integer"}},"required":["org_id","time_after","time_before"],"title":"get_pr_metricsArguments","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_daily_active_users":{"post":{"operationId":"get_daily_active_users","summary":"Get the number of people and service users active with Devin per day over a time range. Reads metadata only: it starts n","description":"Get the number of people and service users active with Devin per day over a time range. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"How many people used Devin each day this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"time_after":{"description":"Start of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time After","type":"integer"},"time_before":{"description":"End of the range as a Unix timestamp in seconds.","minimum":0,"title":"Time Before","type":"integer"},"min_sessions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count a user as active only with at least this many sessions.","title":"Min Sessions"}},"required":["org_id","time_after","time_before"],"title":"get_daily_active_usersArguments","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_schedules":{"post":{"operationId":"list_schedules","summary":"List Devin schedules with name, frequency, whether they are enabled, last run and last error. Reads metadata only: it st","description":"List Devin schedules with name, frequency, whether they are enabled, last run and last error. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which scheduled Devin runs do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many schedules to return (1 to 200).","title":"Limit"},"offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many schedules to skip.","title":"Offset"}},"required":["org_id"],"title":"list_schedulesArguments","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_playbooks":{"post":{"operationId":"list_playbooks","summary":"List the organization's Devin playbooks: title, macro, access type and who last updated them. Reads metadata only: it st","description":"List the organization's Devin playbooks: title, macro, access type and who last updated them. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which Devin playbooks do we have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"first":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return (1 to 200).","title":"First"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the end_cursor of the previous answer.","title":"After"},"include_enterprise":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Also include enterprise-level playbooks.","title":"Include Enterprise"}},"required":["org_id"],"title":"list_playbooksArguments","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_automations":{"post":{"operationId":"list_automations","summary":"List Devin automations with name, whether they are enabled, last update and next run. Reads metadata only: it starts no ","description":"List Devin automations with name, whether they are enabled, last update and next run. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which Devin automations are enabled\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"first":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return (1 to 200).","title":"First"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the end_cursor of the previous answer.","title":"After"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only automations whose name contains this text.","title":"Search"}},"required":["org_id"],"title":"list_automationsArguments","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_indexed_repositories":{"post":{"operationId":"list_indexed_repositories","summary":"List repositories Devin indexes for the organization, with branches and indexing status. Reads metadata only: it starts ","description":"List repositories Devin indexes for the organization, with branches and indexing status. Reads metadata only: it starts no Devin session and uses no ACUs. Use for \"Which repositories is Devin indexing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"description":"Devin organization id (starts with org-), shown under Settings > Devin API.","maxLength":60,"title":"Org Id","type":"string"},"first":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return (1 to 200).","title":"First"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the end_cursor of the previous answer.","title":"After"},"filter_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only repositories whose path contains this text.","title":"Filter Name"}},"required":["org_id"],"title":"list_indexed_repositoriesArguments","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}}}}