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

# Decline organization invitation

> Declines an invitation sent to the caller's verified email.



## OpenAPI

````yaml /openapi-public.json post /organizations/{id}/invitations/{invitationId}:decline
openapi: 3.1.0
info:
  title: Akua API
  version: 1.0.0
  description: >-
    Manage installs and their asynchronous operations. Authenticate with a
    session bearer token and select a Workspace using Akua-Context.
  contact:
    name: Akua API support
    email: support@akua.dev
    url: https://docs.akua.dev/
servers:
  - url: https://api.akua.dev/v1
security: []
tags:
  - name: operations
  - name: installs
  - name: Organizations
  - name: Billing accounts
  - name: workspaces
  - name: regions
  - name: Dashboard Overview
  - name: products
  - name: offers
  - name: Order Drafts
  - name: packages
  - name: Auth
  - name: API Tokens
  - name: Quota adjustments
  - name: Workspace services
  - name: Vault connections
  - name: clusters
  - name: Node pools
  - name: Nodes
  - name: machines
  - name: Sandboxes
  - name: OpenCode Servers
  - name: vaults
  - name: vaultSecrets
paths:
  /organizations/{id}/invitations/{invitationId}:decline:
    post:
      tags:
        - Organizations
      summary: Decline organization invitation
      description: Declines an invitation sent to the caller's verified email.
      operationId: organizations.declineInvitation
      parameters:
        - name: id
          in: path
          schema:
            type: string
            minLength: 3
            maxLength: 54
          required: true
        - name: invitationId
          in: path
          schema:
            type: string
            minLength: 3
            maxLength: 55
          required: true
      responses:
        '200':
          description: Invitation declined
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInvitation'
        '401':
          description: Missing, invalid or expired credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiUnauthorized'
        '403':
          description: The credential may not act in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiForbidden'
        '404':
          description: The resource was not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNotFound'
        '409':
          description: >-
            The request conflicts with existing resource state or immutable
            intent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiConflict'
        '503':
          description: The service is temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiServiceUnavailable'
      security:
        - BearerAuth: []
components:
  schemas:
    OrganizationInvitation:
      type: object
      properties:
        id:
          type: string
          minLength: 3
          maxLength: 55
        organization_id:
          type: string
          minLength: 3
          maxLength: 54
        email:
          type: string
          maxLength: 254
          allOf:
            - pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$
              format: email
              examples:
                - ada@example.com
        role:
          type: string
          enum:
            - roles/member
            - roles/admin
            - roles/owner
          description: >-
            Only an owner may invite an owner. `roles/viewer` is granted through
            `:setIamPolicy`.
        state:
          type: string
          enum:
            - pending
            - accepted
            - declined
            - revoked
            - expired
        expire_at:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: When a pending invitation becomes `expired`.
        created_at:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Unix timestamp (seconds)
        updated_at:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Unix timestamp (seconds)
      required:
        - id
        - organization_id
        - email
        - role
        - state
        - expire_at
        - created_at
        - updated_at
      additionalProperties: false
    ApiUnauthorized:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - Unauthorized
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiForbidden:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - Forbidden
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiNotFound:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - NotFound
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiConflict:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - Conflict
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiServiceUnavailable:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - ServiceUnavailable
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiErrorEntry:
      type: object
      properties:
        code:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Machine-readable error code
          examples:
            - 7002
        message:
          type: string
          description: Human-readable error message
          examples:
            - Resource not found
        path:
          type: array
          items:
            type: string
          description: Field path that caused the error, when applicable
          examples:
            - - body
              - name
        metadata:
          type: object
          additionalProperties:
            type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      description: Bearer token for the authenticated caller.
      type: http
      scheme: bearer

````

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