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

# Decline Member

> Decline a pending membership request

Sets a pending member's status to `"rejected"`. Requires the caller to be a moderator or admin.

## Path Parameters

<ParamField path="spaceId" type="string" required>
  UUID of the space.
</ParamField>

<ParamField path="memberId" type="string" required>
  UUID of the membership record to decline.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

<ResponseField name="membership" type="object">
  Updated membership with `id` and `status: "rejected"`.
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="Not Found — 404">
    ```json theme={null}
    { "error": "Membership not found.", "code": "space/membership-not-found" }
    ```
  </Accordion>

  <Accordion title="Not Pending — 400">
    ```json theme={null}
    { "error": "Membership is already active.", "code": "space/not-pending" }
    ```
  </Accordion>
</AccordionGroup>

See also: [useDeclineMember](/hooks/spaces/use-decline-member)
