> ## 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 Slack route

> Routes the mentions of Aether in a Slack channel to an Aether project, storing the channel's name and privacy as Slack lists them now, and returns the route.

Use this tool when you need to:
- Let mentions of Aether in a channel start tasks in a project
- Route a channel to one more project (a channel may route to several, one route each)

Examples:
- POST /orgs/{orgID}/slack/routes {"channel_id": "C0123ABCD", "aether_project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "enabled": true}
- POST /orgs/{orgID}/slack/routes {"channel_id": "C0123ABCD", "aether_project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "enabled": false, "agent_profile_id": "0d8b1f4e-7c21-4c55-9a2e-6f1c2a9e3b7d"}

Hints:
- orgID is the org's uuid. channel_id (Slack's id, from listSlackChannels), aether_project_id (a uuid) and enabled are required, agent_profile_id (a uuid) is optional and omitted for the project's defaults; the schema answers 422 for a missing or mistyped field or any other, channel_name, is_private and post_task_cards included, and the handler 422, with no domain code, for a channel_id of white space alone.
- Answers 201 with the route. It posts no task cards until updateSlackRoute turns post_task_cards on, and enabled false creates it paused: its mentions start no task.
- Use listSlackChannels instead to find the channel's id, listAgentProfiles to find a profile, and updateSlackRoute to change an existing route.
- 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 when Slack is not installed, 404 project_not_found for a project not in the org or archived, 422 project_repo_disconnected for a project whose repository's GitHub link is disconnected (a project with no repository is routable), 502 when Slack fails to answer, and 404 slack_channel_not_found for a channel Slack does not list.
- Then 409 route_exists when the channel already routes to the project (the message names both), or 422 agent_profile_not_found for a profile the organization does not hold.



## OpenAPI

````yaml api-reference/openapi.json POST /orgs/{orgID}/slack/routes
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /orgs/{orgID}/slack/routes:
    post:
      tags:
        - slack
      summary: Create Slack route
      description: >-
        Routes the mentions of Aether in a Slack channel to an Aether project,
        storing the channel's name and privacy as Slack lists them now, and
        returns the route.


        Use this tool when you need to:

        - Let mentions of Aether in a channel start tasks in a project

        - Route a channel to one more project (a channel may route to several,
        one route each)


        Examples:

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

        - POST /orgs/{orgID}/slack/routes {"channel_id": "C0123ABCD",
        "aether_project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "enabled":
        false, "agent_profile_id": "0d8b1f4e-7c21-4c55-9a2e-6f1c2a9e3b7d"}


        Hints:

        - orgID is the org's uuid. channel_id (Slack's id, from
        listSlackChannels), aether_project_id (a uuid) and enabled are required,
        agent_profile_id (a uuid) is optional and omitted for the project's
        defaults; the schema answers 422 for a missing or mistyped field or any
        other, channel_name, is_private and post_task_cards included, and the
        handler 422, with no domain code, for a channel_id of white space alone.

        - Answers 201 with the route. It posts no task cards until
        updateSlackRoute turns post_task_cards on, and enabled false creates it
        paused: its mentions start no task.

        - Use listSlackChannels instead to find the channel's id,
        listAgentProfiles to find a profile, and updateSlackRoute to change an
        existing route.

        - 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 when Slack is not
        installed, 404 project_not_found for a project not in the org or
        archived, 422 project_repo_disconnected for a project whose repository's
        GitHub link is disconnected (a project with no repository is routable),
        502 when Slack fails to answer, and 404 slack_channel_not_found for a
        channel Slack does not list.

        - Then 409 route_exists when the channel already routes to the project
        (the message names both), or 422 agent_profile_not_found for a profile
        the organization does not hold.
      operationId: createSlackRoute
      parameters:
        - in: path
          name: orgID
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSlackRouteInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackRoute'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackErrorResponse'
          description: Bad Gateway
components:
  schemas:
    CreateSlackRouteInput:
      additionalProperties: false
      properties:
        aether_project_id:
          format: uuid
          type: string
        agent_profile_id:
          description: 'Omitted: the project''s defaults.'
          format: uuid
          type: string
        channel_id:
          minLength: 1
          type: string
        enabled:
          type: boolean
      required:
        - channel_id
        - aether_project_id
        - enabled
      type: object
    SlackRoute:
      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'
        channel_id:
          minLength: 1
          type: string
        channel_name:
          minLength: 1
          type: string
        enabled:
          type: boolean
        is_private:
          type: boolean
        post_task_cards:
          description: >-
            Whether the channel gets a card for each task the project starts
            from then on, wherever it was started.
          type: boolean
        route_id:
          format: uuid
          type: string
      required:
        - route_id
        - aether_project_id
        - enabled
        - agent_profile_id
        - channel_id
        - channel_name
        - is_private
        - post_task_cards
      type: object
    SlackErrorResponse:
      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
            - org_membership_required
            - payment_required
            - precondition_failed
            - project_not_found
            - project_repo_disconnected
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - route_exists
            - route_not_found
            - service_unavailable
            - slack_channel_not_found
            - slack_identity_link_invalid
            - 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
            - grant_scope_insufficient
          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.