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

# Decline an account invitation

> Decline and delete an account invitation.

**Required scopes:** `accounts.invitations--all:rw`, `accounts.invitations.lc--all:rw` `accounts.invitations.hd--all:rw`


## OpenAPI

````yaml /api/global-accounts/openapi.json delete /accounts/invitations/{invitation_id}
openapi: 3.0.0
info:
  title: Global Accounts API
  description: >-
    API used to manage Organizations and Accounts for multiple products. Also
    responsible for authorization and authentication processes.
  version: 2.0.0
servers:
  - url: https://accounts.livechat.com/v2
    description: Main production server URL
security: []
paths:
  /accounts/invitations/{invitation_id}:
    delete:
      tags:
        - Accounts
      summary: Decline an account invitation
      description: Decline and delete an account invitation.
      parameters:
        - in: path
          name: invitation_id
          schema:
            type: string
            format: uuid
          required: true
          description: Unique account invitation ID.
      responses:
        '204':
          description: 'No Content: Account invitation was deleted.'
        '401':
          description: Unauthorized, missing, or invalid authorization.
          content:
            application/json:
              schema:
                allOf:
                  - description: The default error object.
                    type: object
                    properties:
                      error:
                        description: The error code.
                        type: string
                        enum:
                          - bad_request
                          - invalid_request
                          - unauthorized_client
                          - unauthorized
                          - access_denied
                          - unsupported_response_type
                          - invalid_scope
                          - server_error
                          - temporarily_unavailable
                          - unsupported_grant_type
                          - invalid_grant
                          - invalid_client
                          - conflict
                          - resource_not_found
                          - join_link_expired
                          - traffic_blocked
                          - not_implemented
                      error_description:
                        type: string
                      sub_error:
                        description: The error subcode.
                        type: string
                        nullable: true
                      request_id:
                        description: Unique request identifier.
                        type: string
                        format: uuid
                  - type: object
                    properties:
                      error:
                        type: string
                      error_description:
                        type: string
              example:
                error: unauthorized
                error_description: The account is not authorized.
                request_id: 5903c51b-89f0-41a9-a25d-4f39af100353
        '403':
          description: >-
            Forbidden: Invalid organization; the scope is invalid, unknown, or
            malformed.
          content:
            application/json:
              schema:
                allOf:
                  - description: The default error object.
                    type: object
                    properties:
                      error:
                        description: The error code.
                        type: string
                        enum:
                          - bad_request
                          - invalid_request
                          - unauthorized_client
                          - unauthorized
                          - access_denied
                          - unsupported_response_type
                          - invalid_scope
                          - server_error
                          - temporarily_unavailable
                          - unsupported_grant_type
                          - invalid_grant
                          - invalid_client
                          - conflict
                          - resource_not_found
                          - join_link_expired
                          - traffic_blocked
                          - not_implemented
                      error_description:
                        type: string
                      sub_error:
                        description: The error subcode.
                        type: string
                        nullable: true
                      request_id:
                        description: Unique request identifier.
                        type: string
                        format: uuid
                  - type: object
                    properties:
                      error:
                        type: string
                      sub_error:
                        type: string
                      error_description:
                        type: string
              example:
                error: access_denied
                sub_error: insufficient_scope
                error_description: The resource owner or authorization server denied the request.
                request_id: 5903c51b-89f0-41a9-a25d-4f39af100353
        '404':
          description: >-
            Not found: The requested resource (account invitation) could not be
            found.
          content:
            application/json:
              schema:
                allOf:
                  - description: Returned on validation errors.
                    allOf:
                      - description: The default error object.
                        type: object
                        properties:
                          error:
                            description: The error code.
                            type: string
                            enum:
                              - bad_request
                              - invalid_request
                              - unauthorized_client
                              - unauthorized
                              - access_denied
                              - unsupported_response_type
                              - invalid_scope
                              - server_error
                              - temporarily_unavailable
                              - unsupported_grant_type
                              - invalid_grant
                              - invalid_client
                              - conflict
                              - resource_not_found
                              - join_link_expired
                              - traffic_blocked
                              - not_implemented
                          error_description:
                            type: string
                          sub_error:
                            description: The error subcode.
                            type: string
                            nullable: true
                          request_id:
                            description: Unique request identifier.
                            type: string
                            format: uuid
                      - type: object
                        properties:
                          resource_name:
                            description: The name of the resource related to the error.
                            type: string
                          resource_id:
                            description: >-
                              The identifier of the resource related to the
                              error.
                            type: string
                  - type: object
                    properties:
                      error:
                        type: string
                      error_description:
                        type: string
              example:
                error: resource_not_found
                error_description: The requested resource couldn't be found.
                resource_name: account
                resource_id: def31e95-5ca4-4817-b176-732e4544daca
                request_id: 5903c51b-89f0-41a9-a25d-4f39af100353
        '500':
          description: Server Error.
          content:
            application/json:
              schema:
                allOf:
                  - description: The default error object.
                    type: object
                    properties:
                      error:
                        description: The error code.
                        type: string
                        enum:
                          - bad_request
                          - invalid_request
                          - unauthorized_client
                          - unauthorized
                          - access_denied
                          - unsupported_response_type
                          - invalid_scope
                          - server_error
                          - temporarily_unavailable
                          - unsupported_grant_type
                          - invalid_grant
                          - invalid_client
                          - conflict
                          - resource_not_found
                          - join_link_expired
                          - traffic_blocked
                          - not_implemented
                      error_description:
                        type: string
                      sub_error:
                        description: The error subcode.
                        type: string
                        nullable: true
                      request_id:
                        description: Unique request identifier.
                        type: string
                        format: uuid
                  - type: object
                    properties:
                      error:
                        type: string
                      error_description:
                        type: string
              example:
                error: server_error
                error_description: >-
                  The server encountered an unexpected condition that prevented
                  it from fulfilling the request.
                request_id: 5903c51b-89f0-41a9-a25d-4f39af100353
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - accounts.invitations--all:rw
            - accounts.invitations.lc--all:rw
            - accounts.invitations.hd--all:rw
components:
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes: {}
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes: {}

````