> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runaether.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Sentry route

> Creates a route that starts a task in an Aether project from each new error issue of a Sentry project, storing the Sentry project's slug and name as Sentry lists them now.

Use this tool when you need to:
- Have Aether start work on each new error of a Sentry project automatically
- Point a Sentry project's issues at the Aether project whose repository holds its code

Examples:
- POST /orgs/{orgID}/sentry/routes {"sentry_project_id": "4505829373526016", "aether_project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "enabled": true}

Hints:
- sentry_project_id (a non-empty string, from listSentryProjects), aether_project_id (a uuid) and enabled are required; agent_profile_id is an optional uuid, omitted for the project's defaults. The schema answers 422 for a body out of that shape, an unknown field included.
- The Aether project must be the organization's and have a linked GitHub repository with an App installation (importGithubRepo with installation_id); the Sentry project must be one the connected Sentry organization lists now, which the create reads live from Sentry.
- Answers 201 with the SentryRoute. Each Sentry project takes one route; enabled false keeps the route without starting tasks.
- Use updateSentryRoute instead to change an existing route, and listSentryRoutes to find one.
- Org owners and admins only, with a session or a platform API key: a member, viewer or billing member is refused with 403 org_role_insufficient before the body is validated, a non-member with 403 org_membership_required, an orgID that is not a uuid with 400, and an agent host's grant with 403 agent_host_route_not_allowed.
- Refused, in this order, with 404 not_connected, 404 project_not_found for a project the organization does not hold, 422 project_repo_required for a project without that repository and installation, 409 reauthorization_required when Sentry refuses to mint the installation a token, 502 bad_gateway when Sentry fails to answer, and 404 sentry_project_not_found for a project Sentry does not list; then 409 route_exists for a Sentry project already routed or 422 agent_profile_not_found for a profile the organization does not hold.



## OpenAPI

````yaml api-reference/openapi.json POST /orgs/{orgID}/sentry/routes
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /orgs/{orgID}/sentry/routes:
    post:
      tags:
        - sentry
      summary: Create Sentry route
      description: >-
        Creates a route that starts a task in an Aether project from each new
        error issue of a Sentry project, storing the Sentry project's slug and
        name as Sentry lists them now.


        Use this tool when you need to:

        - Have Aether start work on each new error of a Sentry project
        automatically

        - Point a Sentry project's issues at the Aether project whose repository
        holds its code


        Examples:

        - POST /orgs/{orgID}/sentry/routes {"sentry_project_id":
        "4505829373526016", "aether_project_id":
        "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "enabled": true}


        Hints:

        - sentry_project_id (a non-empty string, from listSentryProjects),
        aether_project_id (a uuid) and enabled are required; agent_profile_id is
        an optional uuid, omitted for the project's defaults. The schema answers
        422 for a body out of that shape, an unknown field included.

        - The Aether project must be the organization's and have a linked GitHub
        repository with an App installation (importGithubRepo with
        installation_id); the Sentry project must be one the connected Sentry
        organization lists now, which the create reads live from Sentry.

        - Answers 201 with the SentryRoute. Each Sentry project takes one route;
        enabled false keeps the route without starting tasks.

        - Use updateSentryRoute instead to change an existing route, and
        listSentryRoutes to find one.

        - Org owners and admins only, with a session or a platform API key: a
        member, viewer or billing member is refused with 403
        org_role_insufficient before the body is validated, a non-member with
        403 org_membership_required, an orgID that is not a uuid with 400, and
        an agent host's grant with 403 agent_host_route_not_allowed.

        - Refused, in this order, with 404 not_connected, 404 project_not_found
        for a project the organization does not hold, 422 project_repo_required
        for a project without that repository and installation, 409
        reauthorization_required when Sentry refuses to mint the installation a
        token, 502 bad_gateway when Sentry fails to answer, and 404
        sentry_project_not_found for a project Sentry does not list; then 409
        route_exists for a Sentry project already routed or 422
        agent_profile_not_found for a profile the organization does not hold.
      operationId: createSentryRoute
      parameters:
        - in: path
          name: orgID
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSentryRouteInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryRoute'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentryErrorResponse'
          description: Bad Gateway
components:
  schemas:
    CreateSentryRouteInput:
      additionalProperties: false
      properties:
        aether_project_id:
          format: uuid
          type: string
        agent_profile_id:
          description: 'Omitted: the project''s defaults.'
          format: uuid
          type: string
        enabled:
          type: boolean
        sentry_project_id:
          minLength: 1
          type: string
      required:
        - sentry_project_id
        - aether_project_id
        - enabled
      type: object
    SentryRoute:
      additionalProperties: false
      properties:
        aether_project_id:
          format: uuid
          type: string
        agent_profile_id:
          description: >-
            The agent profile tasks the route starts run with; null for the
            project's defaults.
          format: uuid
          type:
            - string
            - 'null'
        enabled:
          type: boolean
        route_id:
          format: uuid
          type: string
        sentry_project_id:
          minLength: 1
          type: string
        sentry_project_name:
          minLength: 1
          type: string
        sentry_project_slug:
          minLength: 1
          type: string
      required:
        - route_id
        - aether_project_id
        - enabled
        - agent_profile_id
        - sentry_project_id
        - sentry_project_slug
        - sentry_project_name
      type: object
    SentryErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - agent_profile_not_found
            - bad_gateway
            - bad_request
            - conflict
            - default_actor_not_member
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - method_not_allowed
            - not_acceptable
            - not_connected
            - not_found
            - not_implemented
            - payment_required
            - precondition_failed
            - project_not_found
            - project_repo_required
            - rate_limited
            - reauthorization_required
            - request_canceled
            - request_timeout
            - request_too_large
            - route_exists
            - route_not_found
            - sentry_project_not_found
            - service_unavailable
            - unauthenticated
            - unsupported_media_type
            - validation_failed
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.