Skip to content

Integrations

GET /api/v1/companies/{id}/integrations/atlassian

Returns the organization identity and every agent’s service account, including which are still waiting for an API token and what each one may actually do in the projects it works in.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKAtlassianStatusResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse

Disconnect the company’s Atlassian organization

Section titled “Disconnect the company’s Atlassian organization”

DELETE /api/v1/companies/{id}/integrations/atlassian

Removes the stored organization credential and Crewlet’s record of the service accounts. The accounts themselves are left in place, because they own issues and appear in history.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
remove_agentsquerybooleanNoAlso remove the identities Crewlet provisioned in the provider. Defaults to false, which leaves them in place.
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse

Connect the company’s Atlassian organization

Section titled “Connect the company’s Atlassian organization”

POST /api/v1/companies/{id}/integrations/atlassian/connect

Stores the organization API key Crewlet provisions per-agent service accounts with, after proving it authenticates. Reconnecting replaces the stored credential in place.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: AtlassianConnectRequest

Organization credential

FieldTypeRequiredDescription
api_keystringYes
cloud_idstringNo
org_idstringYes
site_urlstringNo
StatusDescriptionBody
200OKAtlassianStatusResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
503Service UnavailableErrorResponse

POST /api/v1/companies/{id}/integrations/atlassian/credentials

Accepts an API token an operator created for one agent’s service account, proves it authenticates as that account, and seals it. This is a fallback: a sync mints each agent’s token itself, so this is only needed when minting failed or the agent should use a credential a human made.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: AtlassianAdoptRequest

Agent credential

FieldTypeRequiredDescription
agent_keystringYes
expires_atstringNo
tokenstringYes
StatusDescriptionBody
200OKAtlassianStatusResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Provision Atlassian service accounts for the company’s agents

Section titled “Provision Atlassian service accounts for the company’s agents”

POST /api/v1/companies/{id}/integrations/atlassian/sync

Creates one service account per Atlassian-enabled agent, adopts any the organization already had whose display name matches, mints each one’s API token scoped to the products it works in, grants product access per product, and places it in the projects and spaces its org chart names. Removes the accounts of agents that left the chart. An agent’s account and credential are shared across Jira and Confluence; only the seat and the permissions differ. Each outcome reports what the agent may actually do in each project or space, as the product itself reports it: missing names contract permissions it did not get, and excess names administrative or destructive permissions the tenant’s own permission scheme granted on top, which Crewlet reports but cannot revoke. An outcome carrying needs_token means minting failed for that agent; placement_error on the result means the Crewlet app is not installed, so no agent could be placed.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse
503Service UnavailableErrorResponse

GET /api/v1/companies/{id}/integrations/datadog

Returns the organization identity and every agent’s service account, including what each one may actually do as Datadog reports it.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKDatadogStatusResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse

Disconnect the company’s Datadog organization

Section titled “Disconnect the company’s Datadog organization”

DELETE /api/v1/companies/{id}/integrations/datadog

Disables every agent service account Crewlet created, then removes the stored credentials and Crewlet’s record of the accounts. Disabling rather than deleting keeps what the agents built attributable, and stops keys Crewlet is about to forget from still working.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
remove_agentsquerybooleanNoAlso remove the identities Crewlet provisioned in the provider. Defaults to false, which leaves them in place.
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse

Connect the company’s Datadog organization

Section titled “Connect the company’s Datadog organization”

POST /api/v1/companies/{id}/integrations/datadog/connect

Stores the API key and application key Crewlet provisions per-agent service accounts with, after proving they authenticate and reporting which organization they belong to. Reconnecting replaces the stored credentials in place.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: DatadogConnectRequest

Organization credentials

FieldTypeRequiredDescription
api_keystringYes
app_keystringYes
sitestringYes
StatusDescriptionBody
200OKDatadogStatusResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
503Service UnavailableErrorResponse

Provision Datadog service accounts for the company’s agents

Section titled “Provision Datadog service accounts for the company’s agents”

POST /api/v1/companies/{id}/integrations/datadog/sync

Creates one Datadog service account per enabled agent, adopts any the organization already had that Crewlet made earlier, gives each the role carrying the agent contract, and creates the application key the agent acts with. Removes the accounts of agents that left the org chart. Each outcome reports what the agent may actually do, as Datadog itself reports it: missing names contract permissions it did not get, and excess names administrative or destructive permissions another of the tenant’s roles granted on top, which Crewlet reports but cannot revoke. Agents that already hold exactly the right access are skipped, so a pass over an unchanged company costs no requests.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse
503Service UnavailableErrorResponse

GET /api/v1/companies/{id}/integrations/github

Returns the account the app is installed on, what the installation grants, and every agent’s repositories and tier with what its token actually carries. The installation is re-read from GitHub on every call, because the tenant can change it at any time.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKGitHubStatusResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse

Disconnect the company’s GitHub installation

Section titled “Disconnect the company’s GitHub installation”

DELETE /api/v1/companies/{id}/integrations/github

Forgets the installation and every agent’s access. The app itself is left installed, because uninstalling is the tenant’s to do from GitHub. No credential outlives this: tokens are minted per request and cannot be minted without a row.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
remove_agentsquerybooleanNoAlso remove the identities Crewlet provisioned in the provider. Defaults to false, which leaves them in place.
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse

Record the company’s GitHub App installation

Section titled “Record the company’s GitHub App installation”

POST /api/v1/companies/{id}/integrations/github/connect

Stores the installation GitHub redirected back with, after reading it back from GitHub to learn what the tenant actually granted. No credential is accepted or stored: agent tokens are minted from the app’s own key and expire within the hour.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: GitHubConnectRequest

Installation

FieldTypeRequiredDescription
installation_idintegerYes
StatusDescriptionBody
200OKGitHubStatusResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
503Service UnavailableErrorResponse

POST /api/v1/companies/{id}/integrations/github/dedicated/install

Called after somebody installs an agent’s app on the account that holds the repositories. The installation is read back from GitHub rather than trusted, because the ID arrives on a redirect. Until this completes the agent holds no credential and cannot act: there is no shared identity to fall back to.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: GitHubDedicatedInstallRequest

Agent and its installation

FieldTypeRequiredDescription
agent_keystringYes
installation_idintegerYes
StatusDescriptionBody
204RecordedNone
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
409ConflictErrorResponse
503Service UnavailableErrorResponse

Start giving an agent its own GitHub identity

Section titled “Start giving an agent its own GitHub identity”

POST /api/v1/companies/{id}/integrations/github/dedicated/manifest

Returns the GitHub App manifest for one agent, plus the URL to POST it to. Every agent acts under its own app, so this is how one is registered: GitHub has no API that creates an app, and a person has to confirm the registration in a browser. The manifest is scoped to the account the installation belongs to, so an organization install registers the app on the organization rather than on the person confirming it.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: GitHubManifestRequest

Agent to give an identity

FieldTypeRequiredDescription
agent_keystringYes
agent_namestringYes
StatusDescriptionBody
200OKManifestStart
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
409ConflictErrorResponse
503Service UnavailableErrorResponse

Bring the company’s GitHub access in line with its org chart

Section titled “Bring the company’s GitHub access in line with its org chart”

POST /api/v1/companies/{id}/integrations/github/sync

Records which repositories and tier each agent should have, then proves it by minting that agent’s token and reading back what GitHub granted. Nothing is created upstream: there is no account to make, and isolation comes from what each token can reach. Reports repositories the installation does not cover, permissions it cannot provide, and any it holds beyond what agents ever ask for.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse
503Service UnavailableErrorResponse

GET /api/v1/companies/{id}/integrations/gitlab

Returns the group identity and every agent’s service account, including the standing each one holds per project as GitLab reports it.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKGitLabStatusResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse

DELETE /api/v1/companies/{id}/integrations/gitlab

Removes the stored token. Optionally deletes the service accounts Crewlet created in the group, which is what actually ends their access; without it they are kept so a reconnect can adopt them.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
remove_agentsquerybooleanNoAlso remove the identities Crewlet provisioned in the group. Defaults to false, which leaves them in place.
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse

POST /api/v1/companies/{id}/integrations/gitlab/connect

Stores the group token Crewlet provisions per-agent service accounts with, after proving it owns the group. Reconnecting replaces the stored token in place and adopts the identities already there.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: GitLabConnectRequest

Group credential

FieldTypeRequiredDescription
base_urlstringYesBaseURL is the instance the group lives on, so a self-managed tenant is not a different integration. Defaulted by the console to gitlab.com.
groupstringYesGroup is the top-level group’s path or numeric id.
tokenstringYes
StatusDescriptionBody
200OKGitLabStatusResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
503Service UnavailableErrorResponse

Bring the company’s GitLab accounts in line with its org chart

Section titled “Bring the company’s GitLab accounts in line with its org chart”

POST /api/v1/companies/{id}/integrations/gitlab/sync

Books a reconcile pass. Accounts are created, adopted, granted their seats, or removed by the loop, which is the only thing that reconciles a company.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
409ConflictErrorResponse

Get the company’s Slack connection status

Section titled “Get the company’s Slack connection status”

GET /api/v1/companies/{id}/integrations/slack

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKSlackStatusResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

Disconnect the company’s Slack workspace

Section titled “Disconnect the company’s Slack workspace”

DELETE /api/v1/companies/{id}/integrations/slack

Revokes the stored authorization with Slack and removes the installation and its managed-app records.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
remove_agentsquerybooleanNoAlso remove the identities Crewlet provisioned in the provider. Defaults to false, which leaves them in place.
StatusDescriptionBody
202AcceptedMessageResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
503Service UnavailableErrorResponse

Begin connecting the company’s Slack workspace

Section titled “Begin connecting the company’s Slack workspace”

POST /api/v1/companies/{id}/integrations/slack/connect

Returns the Slack authorize URL for the Crewlet manager app, carrying a single-use state bound to this company and operator. The frontend navigates the browser to the returned URL; Slack redirects back to the global callback, which consumes the state to bind the grant.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKSlackConnectResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
503Service UnavailableErrorResponse

Provision the company’s agents into Slack

Section titled “Provision the company’s agents into Slack”

POST /api/v1/companies/{id}/integrations/slack/sync

Brings the company’s Slack app fleet in line with its org configuration: creates an app per Slack-enabled agent, updates and reinstalls apps whose manifest changed, and deletes apps for agents that are gone. Idempotent and safe to re-run; one agent’s failure does not stop the others.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
202Acceptedobject
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
503Service UnavailableErrorResponse

Complete a dedicated GitHub App registration

Section titled “Complete a dedicated GitHub App registration”

GET /api/v1/integrations/github/manifest/callback

Where GitHub returns the browser after somebody confirms an agent’s app. The temporary code is exchanged for the app’s ID and private key, which is sealed before it is stored. Unauthenticated by design: the browser arrives here from GitHub, and the sealed state carries the company and agent it belongs to. Always redirects to the console rather than returning a body.

NameInTypeRequiredDescription
codequerystringYesTemporary code from GitHub
statequerystringYesSealed state issued when the flow began
StatusDescriptionBody
302Redirects to the console with an errorNone

Slack OAuth redirect target for the manager app

Section titled “Slack OAuth redirect target for the manager app”

GET /api/v1/integrations/slack/callback

NameInTypeRequiredDescription
codequerystringNoAuthorization code from Slack
statequerystringNoCSRF state echoed from Connect
errorquerystringNoSlack-reported error (consent denied)
StatusDescriptionBody
302FoundNone
400Bad RequestErrorResponse (text/plain)
403ForbiddenErrorResponse (text/plain)
503Service UnavailableErrorResponse (text/plain)

Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.