> ## 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.

# Accept an organization invitation

> Joins the invitation's organization with its role and returns the invitation, now accepted.

Use this tool when you need to:
- Join an organization the caller was invited to
- Accept an invitation found with listMyInvites

Examples:
- POST /invites/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/accept

Hints:
- inviteID is the invitation's uuid (422 otherwise), from listMyInvites; no body. Answers 200 with the OrgInvite, status accepted.
- Only the person it is addressed to may accept it, with session credentials (403 credential_kind_not_admitted for an API key; an agent host's grant is refused before that with 403 agent_host_route_not_allowed): an invitation addressed to another email than the caller's verified email, like one that does not exist, is 404 org_not_found.
- Refused with 409 invite_not_pending for an invitation already accepted or revoked, 409 invite_expired for a lapsed one, which an admin may resend, and 409 viewer_limit_reached when the organization has no room for another viewer, the invitation left pending.
- A caller who is already a member is refused with 409 already_org_member, consuming the invitation all the same and leaving their role as it was.
- Use listOrgs instead to see the organizations the caller already belongs to.



## OpenAPI

````yaml api-reference/openapi.json POST /invites/{inviteID}/accept
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /invites/{inviteID}/accept:
    post:
      tags:
        - orgs
      summary: Accept an organization invitation
      description: >-
        Joins the invitation's organization with its role and returns the
        invitation, now accepted.


        Use this tool when you need to:

        - Join an organization the caller was invited to

        - Accept an invitation found with listMyInvites


        Examples:

        - POST /invites/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/accept


        Hints:

        - inviteID is the invitation's uuid (422 otherwise), from listMyInvites;
        no body. Answers 200 with the OrgInvite, status accepted.

        - Only the person it is addressed to may accept it, with session
        credentials (403 credential_kind_not_admitted for an API key; an agent
        host's grant is refused before that with 403
        agent_host_route_not_allowed): an invitation addressed to another email
        than the caller's verified email, like one that does not exist, is 404
        org_not_found.

        - Refused with 409 invite_not_pending for an invitation already accepted
        or revoked, 409 invite_expired for a lapsed one, which an admin may
        resend, and 409 viewer_limit_reached when the organization has no room
        for another viewer, the invitation left pending.

        - A caller who is already a member is refused with 409
        already_org_member, consuming the invitation all the same and leaving
        their role as it was.

        - Use listOrgs instead to see the organizations the caller already
        belongs to.
      operationId: acceptInvite
      parameters:
        - in: path
          name: inviteID
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgInvite'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgsErrorResponse'
          description: Internal Server Error
components:
  schemas:
    OrgInvite:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        email:
          format: email
          type: string
        expires_at:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        invited_by:
          format: uuid
          type:
            - string
            - 'null'
        invited_by_display_name:
          type:
            - string
            - 'null'
        org_id:
          format: uuid
          type: string
        org_name:
          type: string
        role:
          $ref: '#/components/schemas/AssignableOrgRole'
        status:
          enum:
            - pending
            - expired
            - accepted
            - revoked
          type: string
      required:
        - id
        - org_id
        - org_name
        - email
        - role
        - status
        - invited_by
        - invited_by_display_name
        - created_at
        - expires_at
      type: object
    OrgsErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - already_org_member
            - bad_gateway
            - bad_request
            - cli_upgrade_required
            - client_outdated
            - conflict
            - default_actor_product_role_required
            - empty_org_update
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - invalid_commit_attribution_policy
            - invalid_cursor
            - invalid_invite_email
            - invalid_invite_status
            - invalid_org_id
            - invalid_org_name
            - invalid_org_role
            - invalid_pr_authorship
            - invalid_seat_request_status
            - invalid_user_id
            - invite_already_pending
            - invite_delivery_failed
            - invite_delivery_unavailable
            - invite_expired
            - invite_not_pending
            - inviter_daily_invite_limit
            - member_role_changed
            - method_not_allowed
            - not_acceptable
            - not_found
            - not_implemented
            - org_default_actor_reassignment_required
            - org_has_members
            - org_has_subscription
            - org_not_found
            - org_pending_invite_limit
            - org_role_insufficient
            - owner_leave_forbidden
            - owner_removal_forbidden
            - owner_role_immutable
            - payment_required
            - personal_org_delete_forbidden
            - personal_org_immutable
            - personal_org_leave_forbidden
            - precondition_failed
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - seat_request_delivery_failed
            - seat_request_pending
            - service_unavailable
            - session_auth_required
            - team_org_required
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - viewer_limit_reached
          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
    AssignableOrgRole:
      enum:
        - admin
        - member
        - billing
        - viewer
      type: string
    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.