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

# Approve Member

> Approve a pending membership request

Sets a pending member's status to `"active"`. 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 approve.
</ParamField>

## Response

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

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

## Errors

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

  <Accordion title="Not Pending — 400">
    The request is no longer pending: it was already approved, declined or banned. The message names the current status, or says the request is no longer pending if it changed while the request was being handled.

    ```json theme={null}
    { "error": "Membership is already banned.", "code": "space/not-pending" }
    ```
  </Accordion>

  <Accordion title="Banned in a Parent Space — 409">
    The member is banned in a parent of this space; `bannedSpaceIds` lists where.

    ```json theme={null}
    { "error": "This member is banned in a parent of this space.", "code": "space/banned-in-parent", "bannedSpaceIds": ["…"] }
    ```
  </Accordion>
</AccordionGroup>

See also: [useApproveMember](/v8/hooks/spaces/use-approve-member)


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