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

# Decline a group invite

> Decline as one invited Relay user. Declining answers for the caller alone: it removes nobody from a live conversation and never blocks another target from joining. Once every target has answered, the invite reaches its terminal state.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/groups/invites/{invite_id}/decline
openapi: 3.1.0
info:
  title: Relay developer API
  version: '0.1'
  description: >
    Add Relay as a channel for your agent, receive messages, and reply with
    plain HTTPS and JSON. Authenticate every request with an Agent Token unless
    the endpoint is marked public. The postback_interactions sync feature
    controls whether clients render message components interactively; component
    data parts can always be sent.
  x-relay-feature-availability:
    postback_interactions: off-by-default-preview
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.relayapp.im
    description: Production
security:
  - agentToken: []
tags:
  - name: Agent
    description: Inspect the agent controlled by the current Agent Token.
  - name: Messages
    description: Send finalized messages, pipe native agent output, and react.
  - name: Groups
    description: Propose consent-based groups and observe their terminal state.
  - name: Events
    description: >
      Receive durable inbound events, either through signed webhook receivers or
      by long-polling `GET /v1/events`. The two modes are mutually exclusive per
      agent, enforced per request; around a webhook registration or disable
      there is a brief transition window in which both paths can observe the
      same events. Delivery is at least once everywhere — always deduplicate by
      `event_id`.
  - name: Pairing
    description: >
      Device-code pairing for terminal bridges: create a pairing code on a
      computer, let the Relay app claim it, and recover the minted Agent Token
      only with that computer's poll credential. The token never travels to the
      phone.
  - name: Public
    description: Read approved Store agents and share profiles without authentication.
paths:
  /v1/groups/invites/{invite_id}/decline:
    post:
      tags:
        - Groups
      summary: Decline a group invite
      description: >
        Decline as one invited Relay user. Declining answers for the caller
        alone: it removes nobody from a live conversation and never blocks
        another target from joining. Once every target has answered, the invite
        reaches its terminal state.
      operationId: declineGroupInvite
      parameters:
        - $ref: '#/components/parameters/GroupInviteId'
      responses:
        '200':
          description: Current invite state. Repeating a decline is a no-op.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupInviteResponse'
        '401':
          description: A Relay user session is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The invite does not exist or the caller is not a target.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The invite is closed, or the caller already joined the conversation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - userSession: []
components:
  parameters:
    GroupInviteId:
      name: invite_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^inv_
      example: inv_01K1M8FOUNDERSDINNER
  schemas:
    GroupInviteResponse:
      type: object
      additionalProperties: false
      required:
        - invite
      properties:
        invite:
          $ref: '#/components/schemas/GroupInvite'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: conversation_id is required
    GroupInvite:
      type: object
      additionalProperties: false
      required:
        - id
        - state
        - title
        - expires_at
        - created_at
        - members
      properties:
        id:
          type: string
          pattern: ^inv_
        state:
          type: string
          enum:
            - pending
            - active
            - completed
            - expired
          description: >
            pending is open with nobody joined yet, active is open with the
            conversation already live, completed is closed with a live
            conversation, and expired is closed without one.
        title:
          type: string
          minLength: 1
          maxLength: 100
        reason:
          type: string
          minLength: 1
          maxLength: 200
        conversation_id:
          type: string
          pattern: ^cnv_
          description: >
            The live conversation once the state is active or completed. On an
            invite into an existing group it also carries the destination while
            the state is pending, so read the caller's own member state before
            offering to open it.
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        members:
          type: array
          minItems: 1
          maxItems: 24
          items:
            $ref: '#/components/schemas/GroupInviteMember'
    GroupInviteMember:
      type: object
      additionalProperties: false
      required:
        - user_id
        - display_name
        - avatar_url
        - state
      properties:
        user_id:
          type: string
          pattern: ^usr_
        display_name:
          type: string
        avatar_url:
          type:
            - string
            - 'null'
        state:
          type: string
          enum:
            - invited
            - accepted
            - declined
          description: >
            invited has not answered yet, accepted is in the live conversation,
            and declined answered no.
  securitySchemes:
    agentToken:
      type: http
      scheme: bearer
      description: Agent Token (`rly_live_…`), shown once at agent creation.
    userSession:
      type: http
      scheme: bearer
      description: >-
        Better Auth user-session bearer used by the Relay app; never an Agent
        Token.

````