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

# Add Member

Add a user as a member of a target.

## **POST** `/members/target/:target/:target_id`

### Path Parameters

| Parameter   | Type   | Required | Description                           |
| :---------- | :----- | :------- | :------------------------------------ |
| `target`    | string | Yes      | Resource type: `org` or `blob`.       |
| `target_id` | string | Yes      | The unique ID of the target resource. |

### Request Body

| Parameter | Type   | Required | Description                                  |
| :-------- | :----- | :------- | :------------------------------------------- |
| `user_id` | string | Yes      | The ID of the user to add.                   |
| `role`    | string | Yes      | Role to assign: `admin`, `write`, or `read`. |

### Response

| Parameter | Type   | Description                |
| :-------- | :----- | :------------------------- |
| `member`  | object | The created member object. |

### Errors

| Status | Error       | Cause                                                                 |
| :----- | :---------- | :-------------------------------------------------------------------- |
| 403    | `forbidden` | Missing `admin` access to the target, or no human behind the request. |

A membership row **is** the access perimeter — it is the thing that grants access — so granting one is a
human act. A [service account](/general/service-accounts)'s own key gets `403` here for every target, even
one it holds `admin` on: an account cannot widen its own reach, or anyone else's. Use an
[acting token](/rest-api/auth/impersonate) when automation has to grant access on a human's behalf.

<Note>
  Adding a service account to an Organization or Blob uses this endpoint, unchanged — pass the account's `id`
  as `user_id`. There is no separate flow for machine identities.
</Note>

### Example

<CodeGroup>
  ```json Request theme={null}
  {
    "user_id": "user_789",
    "role": "write"
  }
  ```

  ```json Response theme={null}
  {
    "status": "success",
    "member": {
      "id": "mem_002"
    }
  }
  ```
</CodeGroup>
