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

# Reject organization invite

> Rejects an organization invitation without adding the user as a member.

**Behavior:**
The invitation status is updated to REJECTED and the user will not be added to the organization.

**Validation checks:**
- Invitation is addressed to the user's email
- Invitation is still pending
- Invitation hasn't expired

**Returns:**
- `409 Conflict` if already processed
- `204 No Content` on success




## OpenAPI

````yaml post /organizations/{org_id}/invites/{invite_id}/reject
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /organizations/{org_id}/invites/{invite_id}/reject:
    parameters:
      - $ref: '#/components/parameters/OrgParam'
      - $ref: '#/components/parameters/InviteIdParam'
    post:
      tags:
        - Organization Management
      summary: Reject organization invite
      description: >
        Rejects an organization invitation without adding the user as a member.


        **Behavior:**

        The invitation status is updated to REJECTED and the user will not be
        added to the organization.


        **Validation checks:**

        - Invitation is addressed to the user's email

        - Invitation is still pending

        - Invitation hasn't expired


        **Returns:**

        - `409 Conflict` if already processed

        - `204 No Content` on success
      operationId: src.handlersv2.organization.reject_invite
      responses:
        '204':
          $ref: '#/components/responses/OKEmpty'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Invite is not in a pending state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/write
components:
  parameters:
    OrgParam:
      in: path
      name: org_id
      schema:
        type: string
      required: true
      description: An ID of an organization
    InviteIdParam:
      in: path
      name: invite_id
      required: true
      schema:
        type: integer
        example: 17
      description: |
        Invite ID, as returned by a previous call
  responses:
    OKEmpty:
      description: Request completed successfully
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````