Reason Machines Cloud Access API

Keyless cloud sign-in for sessions: Reason's OIDC issuer facts and the AWS, Google Cloud and Azure connections a workspace trusts, including which run triggers each one signs in.

GitHub OpenAPI

Operations 4

GET /v3/organizations/{orgId}/cloud-access Read cloud access #
PUT /v3/organizations/{orgId}/cloud-access/{provider} Create or replace a cloud access connection #
DELETE /v3/organizations/{orgId}/cloud-access/{provider} Delete a cloud access connection #
POST /v3/organizations/{orgId}/cloud-access/{provider}/test Test a cloud access connection #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/reasonmachines-com:reasonmachines-com-cloud-access-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

reasonmachines-com-cloud-access-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reason Cloud Access API
  version: 3.0.0
  description: 'The Reason HTTP API. Drive cloud software-engineering agents: open sessions against your repositories, stream their work, and manage the secrets, skills, and automations they run with.


    Authenticate with a Reason API key sent as a bearer token. New keys use `reason_`; legacy `ara_` keys remain accepted. Every resource is scoped to an organization; resolve your `org_id` once with `GET /v3/self`.'
servers:
- url: https://api.reasonmachines.com
security:
- reasonApiKey: []
tags:
- name: Cloud Access
  description: 'Keyless cloud sign-in for sessions: Reason''s OIDC issuer facts and the AWS, Google Cloud and Azure connections a workspace trusts, including which run triggers each one signs in.'
paths:
  /v3/organizations/{orgId}/cloud-access:
    parameters:
    - $ref: '#/components/parameters/orgId'
    get:
      operationId: getCloudAccess
      x-reason-mcp-description: 'Returns what a cloud trust policy needs to give runs temporary credentials: `issuer`, `jwks_uri`, `workspace_id`, `subject_format` and `token_url`, plus saved `connections` with `config`, `enabled`, `allowed_triggers` and `last_test_ok`. Read it before `setCloudAccessConnection`; 404 when it is off.'
      tags:
      - Cloud Access
      summary: Read cloud access
      description: 'Read cloud access: the OIDC issuer facts a cloud''s trust policy needs and the workspace''s saved connections. Answers 404 while cloud access is not enabled.


        Returns the OIDC issuer facts a cloud''s trust policy needs and the workspace''s saved connections. Answers 404 while cloud access is not enabled for the workspace.


        Scope: `org:read`'
      responses:
        '200':
          description: Issuer facts and connections.
          content:
            application/json:
              schema:
                type: object
                required:
                - issuer
                - jwks_uri
                - workspace_id
                - subject_format
                - connections
                properties:
                  issuer:
                    type: string
                    description: OIDC issuer URL to trust in the cloud account's identity provider settings.
                  jwks_uri:
                    type: string
                    description: URL of the issuer's public signing keys.
                  workspace_id:
                    type: string
                    description: This workspace's id, as it appears in token subjects.
                  subject_format:
                    type: string
                    description: Template of the token `sub` claim, for writing trust-policy conditions; the project and repository parts read `none` when absent; the project is a Project, or where the workspace has Reason-as-project identity tokens (oidc_reason_project) the Reason a Session is filed under.
                  token_url:
                    type:
                    - string
                    - 'null'
                    description: Endpoint a session calls to obtain an identity token; null when the public origin is not configured.
                  connections:
                    type: array
                    items:
                      type: object
                      required:
                      - provider
                      - config
                      - enabled
                      - allowed_triggers
                      - updated_at
                      properties:
                        provider:
                          type: string
                          enum:
                          - aws
                          - gcp
                          - azure
                          description: Cloud provider of this connection; each workspace has at most one per provider.
                        config:
                          type: object
                          description: 'Provider identifiers: aws `role_arn`, `region`; gcp `workload_identity_provider`, `service_account`, `project_id`; azure `tenant_id`, `client_id`, `subscription_id`.'
                        enabled:
                          type: boolean
                          description: Whether eligible sessions receive this connection's credentials.
                        allowed_triggers:
                          type: array
                          items:
                            type: string
                            enum:
                            - manual
                            - api
                            - schedule
                            - github_event
                            - webhook
                            - slack
                            - linear
                          description: Run triggers this connection signs in.
                        updated_at:
                          type: string
                          format: date-time
                          description: When the connection was last saved.
                        last_tested_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                          description: When `testCloudAccessConnection` last recorded a result; null if never, or since the config changed.
                        last_test_ok:
                          type:
                          - boolean
                          - 'null'
                          description: Whether that last test's exchange succeeded; null when untested.
                        last_test_message:
                          type:
                          - string
                          - 'null'
                          description: The last test's granted identity on success, or the provider's error message on failure; null when untested.
                        last_used_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                          description: When a session last received credentials through this connection; null if never.
                    description: Saved connections, at most one per provider.
              example:
                issuer: https://oidc.reasonmachines.com
                jwks_uri: https://oidc.reasonmachines.com/.well-known/jwks.json
                workspace_id: 6f1d3c1e-8a4b-4c5d-9e6f-0a1b2c3d4e5f
                subject_format: workspace:6f1d3c1e-8a4b-4c5d-9e6f-0a1b2c3d4e5f:project:<project|none>:repo:<provider/owner/name|none>
                token_url: https://api.reasonmachines.com/identity/token
                connections:
                - provider: aws
                  config:
                    role_arn: arn:aws:iam::123456789012:role/reason
                    region: us-east-1
                  enabled: true
                  allowed_triggers:
                  - manual
                  - api
                  updated_at: '2026-10-16T09:00:00Z'
                  last_tested_at: '2026-10-16T09:01:00Z'
                  last_test_ok: true
                  last_test_message: arn:aws:sts::123456789012:assumed-role/reason/reason-connection-test
                  last_used_at: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
      - reasonApiKey:
        - org:read
  /v3/organizations/{orgId}/cloud-access/{provider}:
    parameters:
    - $ref: '#/components/parameters/orgId'
    - name: provider
      description: Cloud service whose workspace connection to manage or test. Existing connections identify their provider in the connections returned by `getCloudAccess`.
      in: path
      required: true
      schema:
        type: string
        enum:
        - aws
        - gcp
        - azure
    put:
      operationId: setCloudAccessConnection
      x-reason-destructive: true
      x-reason-mcp-description: Saves the workspace's one connection for a cloud `provider`, replacing its `config` of cloud-side identifiers (never secret keys). Owner or admin only. A changed config clears the last test; a new one is enabled for `manual` and `api` triggers. Verify it with `testCloudAccessConnection`.
      tags:
      - Cloud Access
      summary: Create or replace a cloud access connection
      description: 'Create or replace the workspace''s one cloud access connection for a provider: aws, gcp or azure. Requires an owner or admin; config replaces the stored config.


        Saves the workspace''s one connection for a provider (`aws`, `gcp` or `azure`). Requires owner/admin. `config` is required and replaces the stored config; a changed config clears the last test. `enabled` and `allowed_triggers` keep their stored values when omitted; a new connection is enabled and allows `manual` and `api`. A connection signs in only runs whose trigger it allows: `manual` sessions started in the reason app; `api` sessions started with the api, the cli or by another session; `schedule` scheduled automations; `github_event` github mentions, issues and pull requests; `webhook` automation webhooks; `slack` slack mentions; `linear` linear issues.


        Scope: `org:write`'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - config
              properties:
                config:
                  type: object
                  description: 'Cloud-side identifiers for the trusted identity, replacing the saved configuration: aws role_arn and region; gcp workload_identity_provider, service_account and project_id; azure tenant_id, client_id and subscription_id. Obtain them from the cloud account, not secret credential values.'
                enabled:
                  type: boolean
                  description: Whether eligible runs receive this connection. Omit to keep the stored state; a new connection starts enabled.
                allowed_triggers:
                  type: array
                  items:
                    type: string
                    enum:
                    - manual
                    - api
                    - schedule
                    - github_event
                    - webhook
                    - slack
                    - linear
                  minItems: 1
                  description: How a session must have started to receive this connection's credentials, such as from the app, through the API, on a schedule, or from a GitHub, webhook, Slack or Linear event. Omit to keep the stored selection; a new connection allows manual and api.
            example:
              config:
                role_arn: arn:aws:iam::123456789012:role/reason
                region: us-east-1
              allowed_triggers:
              - manual
              - api
              - schedule
      responses:
        '200':
          description: The saved connection.
          content:
            application/json:
              schema:
                type: object
                required:
                - provider
                - config
                - enabled
                - allowed_triggers
                - updated_at
                properties:
                  provider:
                    type: string
                    enum:
                    - aws
                    - gcp
                    - azure
                    description: Cloud provider of this connection; each workspace has at most one per provider.
                  config:
                    type: object
                    description: 'Provider identifiers: aws `role_arn`, `region`; gcp `workload_identity_provider`, `service_account`, `project_id`; azure `tenant_id`, `client_id`, `subscription_id`.'
                  enabled:
                    type: boolean
                    description: Whether eligible sessions receive this connection's credentials.
                  allowed_triggers:
                    type: array
                    items:
                      type: string
                      enum:
                      - manual
                      - api
                      - schedule
                      - github_event
                      - webhook
                      - slack
                      - linear
                    description: Run triggers this connection signs in.
                  updated_at:
                    type: string
                    format: date-time
                    description: When the connection was last saved.
                  last_tested_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                    description: When `testCloudAccessConnection` last recorded a result; null if never, or since the config changed.
                  last_test_ok:
                    type:
                    - boolean
                    - 'null'
                    description: Whether that last test's exchange succeeded; null when untested.
                  last_test_message:
                    type:
                    - string
                    - 'null'
                    description: The last test's granted identity on success, or the provider's error message on failure; null when untested.
                  last_used_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                    description: When a session last received credentials through this connection; null if never.
              example:
                provider: aws
                config:
                  role_arn: arn:aws:iam::123456789012:role/reason
                  region: us-east-1
                enabled: true
                allowed_triggers:
                - manual
                - api
                updated_at: '2026-10-16T09:00:00Z'
                last_tested_at: '2026-10-16T09:01:00Z'
                last_test_ok: true
                last_test_message: arn:aws:sts::123456789012:assumed-role/reason/reason-connection-test
                last_used_at: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
      - reasonApiKey:
        - org:write
    delete:
      operationId: deleteCloudAccessConnection
      x-reason-mcp-description: Removes the workspace's cloud access connection for one provider. Requires owner or admin. Sessions are no longer issued that provider's credentials; a missing connection also succeeds. Returns no content (204).
      tags:
      - Cloud Access
      summary: Delete a cloud access connection
      description: 'Delete the workspace''s cloud access connection for a provider. Requires an owner or admin; Sessions stop receiving that provider''s credentials.


        Removes the workspace''s connection for a provider. Requires owner/admin. Sessions stop receiving that provider''s credentials; a missing connection also answers 204.


        Scope: `org:write`'
      responses:
        '204':
          description: Deleted, or there was nothing to delete.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
      - reasonApiKey:
        - org:write
  /v3/organizations/{orgId}/cloud-access/{provider}/test:
    parameters:
    - $ref: '#/components/parameters/orgId'
    - name: provider
      description: Cloud service whose workspace connection to manage or test. Existing connections identify their provider in the connections returned by `getCloudAccess`.
      in: path
      required: true
      schema:
        type: string
        enum:
        - aws
        - gcp
        - azure
    post:
      operationId: testCloudAccessConnection
      x-reason-open-world: true
      x-reason-mcp-description: Tests a saved connection with a real token exchange; the result is saved as its last test when possible, never on a signing or issuer failure. Owner or admin only. Returns `ok`, `subject`, `tested_at` (null if not saved), and `identity` or an `error` (`code`, `message`); a refusal is `ok` false.
      tags:
      - Cloud Access
      summary: Test a cloud access connection
      description: 'Signs a token as the workspace (or one repository) and runs the provider''s real exchange from Reason''s servers. Requires owner/admin. The outcome becomes the connection''s last test. A provider refusal is HTTP 200 with `ok: false`.


        Scope: `org:write`'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                repository:
                  type: string
                  description: Repository whose token subject to test, as `github/<owner>/<name>`, to check a trust condition scoped to that repository. Omit to test the workspace subject, with no project and no repository.
            example:
              repository: github/acme/api
      responses:
        '200':
          description: The provider's verdict.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - subject
                - tested_at
                properties:
                  ok:
                    type: boolean
                    description: Whether the provider accepted the token and granted credentials.
                  identity:
                    type: string
                    description: The identity the provider granted, when ok.
                  error:
                    type: object
                    description: Why the exchange failed, when not ok.
                    required:
                    - code
                    - message
                    properties:
                      code:
                        type: string
                        description: Stable failure code, such as `issuer_unconfigured`.
                      message:
                        type: string
                        description: The provider's or Reason's explanation.
                  subject:
                    type: string
                    description: The token `sub` claim that was tested, to compare with the trust policy.
                  tested_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                    description: When the result was saved as the connection's last test; null when it was not saved.
              example:
                ok: true
                identity: arn:aws:sts::123456789012:assumed-role/reason/reason-connection-test
                subject: workspace:6f1d3c1e-8a4b-4c5d-9e6f-0a1b2c3d4e5f:project:none:repo:github/acme/api
                tested_at: '2026-10-16T09:01:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
      - reasonApiKey:
        - org:write
components:
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: session_not_found
    Unauthorized:
      description: Missing, invalid, or expired key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing_bearer
            message: Authorization required
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: prompt_required
    Forbidden:
      description: The key lacks the required scope or role.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing_scope
            required_scope: sessions:read
    RateLimited:
      description: Too many requests. Retry after the number of seconds in the `Retry-After` response header.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
          required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: rate_limited
              message: This API key exceeded its request-rate limit
  schemas:
    Error:
      type: object
      properties:
        error:
          oneOf:
          - type: string
          - type: object
            required:
            - type
            - message
            properties:
              type:
                type: string
              message:
                type: string
              request_id:
                type:
                - string
                - 'null'
        message:
          type: string
        required_scope:
          type: string
          description: The capability required when the request was denied for a missing scope.
  parameters:
    orgId:
      name: orgId
      in: path
      required: true
      description: Organization id or slug. Resolve it with `GET /v3/self`.
      schema:
        type: string
  securitySchemes:
    loopWebhookKey:
      type: http
      scheme: bearer
      description: A Loop's webhook key, returned once by the createReasonLoop or updateReasonLoop call that adds the webhook. It only delivers events to that Loop's webhook; every other operation rejects it.
    loopWebhookSignature:
      type: apiKey
      in: header
      name: X-Signature-256
      description: 'An HMAC-SHA256 of the exact request body keyed with the Loop''s webhook key or its stored signing secret: hex in `X-Signature-256` (optionally `sha256=`-prefixed), or the sender''s own header (`X-Hub-Signature-256`, `Stripe-Signature`, `Webhook-Signature`, `Svix-Signature`, `Linear-Signature`, `Sentry-Hook-Signature`, `X-Shopify-Hmac-Sha256`).'
    reasonMachineToken:
      type: http
      scheme: bearer
      bearerFormat: rmt_<hex>
      description: A Machine token from createMachineToken. It can only create enrollment tickets for its own Machine; every other operation rejects it.
    reasonUserOAuth:
      type: http
      scheme: bearer
      description: A workspace-bound human user OAuth grant with org:write scope. The user must be an organization owner/admin. API keys and browser sessions are not accepted.
    reasonApiKey:
      type: http
      scheme: bearer
      bearerFormat: 'reason_<hex> (legacy: ara_<hex>)'
      description: 'Your Reason API key from Settings › API keys. New keys use `reason_`; legacy `ara_` keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, devices:read, devices:write, devices:use, computers:read, computers:write, ssh:write, knowledge:read, memory:read, memory:write, skills:read, skills:write, pages:read, pages:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. devices:write, devices:use, computers:read, computers:write, ssh:write, network:read and network:write are opt-in, excluded from default keys. computers:read lists visible cloud and connected computers without waking them or granting execution access. devices:read discovers local Device targets; devices:use separately consents to local execution, so a discover-and-run local workflow needs both. devices:write manages enrollment and device grants; computers:write creates or deletes cloud computers; ssh:write manages retained SSH access. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).'