---
title: "Add a user to the monorepo, or change their role (owners)"
description: "Their own row; in an org's monorepo it adds to what the org gives them. 409 `last_owner` when it would leave a person's monorepo with no owner."
---

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

Path: Pando API › monorepos

`PUT /v1/monorepos/{owner}/{monorepo}/members/{login}`

Their own row; in an org's monorepo it adds to what the org gives them. 409 `last_owner` when it would leave a person's monorepo with no owner.

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `putMember.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `putMember.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `putMember.path.login` (string, required) — A user's login, which is their namespace, or an organization's (one space for both): 1 to 39 lower-case letters, digits and single hyphens, no hyphen at either end (input in any case is lowered). Reserved, because a namespace is the first URL segment: v1, healthz, login, logout, settings, assets, fonts, new, api, app, static, orgs, users, docs, install. A login made at sign-in comes from the email's local part, skipping reserved and taken names (`base`, `base-2`, ... `base-999`, then a random tail).
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`

## Request body

_Required._

- `putMember.role` (string, required)
  - one of `"owner"`, `"member"`

## Example request

```json
{
  "role": "owner"
}
```

## Code samples

### cURL

```curl
curl --request PUT \
  --url https://app.gitpando.com/v1/monorepos/string/string/members/string \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "owner"
}
'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/members/string';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({role: 'owner'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/members/string"

payload = { "role": "owner" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "login": "string",
  "name": "string",
  "picture_url": "string",
  "role": "owner",
  "added_at": "2019-08-24T14:15:22Z",
  "added_by": "string",
  "last_active_at": "2019-08-24T14:15:22Z",
  "via": "direct"
}
```

- `putMember.response.200.login` (string, required)
- `putMember.response.200.name` (string | null, required) — The user's display name, if known.
- `putMember.response.200.picture_url` (string | null, required) — As on User: their profile picture, or null (the web draws one).
- `putMember.response.200.role` (string, required)
  - one of `"owner"`, `"member"`
- `putMember.response.200.added_at` (string, required)
  - format `date-time`
- `putMember.response.200.last_active_at` (string | null, required) — The newest last use of any of their credentials (written at most once a minute per credential); null if none was ever used.
  - format `date-time`
- `putMember.response.200.via` (string, required) — Where their access comes from: their own row (`direct`), the org that owns the monorepo (`org`), or both. `added_at` and `added_by` come from their own row when they have one.
  - one of `"direct"`, `"org"`, `"both"`
- `putMember.response.200.added_by` (string | null, optional)

### 403

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `putMember.response.403.error` (object, required)
  - `putMember.response.403.error.code` (string, required)
  - `putMember.response.403.error.message` (string, required)
  - `putMember.response.403.error.paths` (array<string>, optional)
  - `putMember.response.403.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `putMember.response.403.error.checks.sha` (string | null, required)
    - `putMember.response.403.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `putMember.response.403.error.checks.required` (array | null, required) — Null while unknown.
    - `putMember.response.403.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `putMember.response.403.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `putMember.response.403.error.checks.statuses.sha` (string, required)
      - `putMember.response.403.error.checks.statuses.context` (string, required)
      - `putMember.response.403.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `putMember.response.403.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `putMember.response.403.error.checks.statuses.target_url` (string | null, optional)
      - `putMember.response.403.error.checks.statuses.description` (string | null, optional)
      - `putMember.response.403.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `putMember.response.403.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `putMember.response.403.error.checks.missing` (array<string>, optional)

### 404

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `putMember.response.404.error` (object, required)
  - `putMember.response.404.error.code` (string, required)
  - `putMember.response.404.error.message` (string, required)
  - `putMember.response.404.error.paths` (array<string>, optional)
  - `putMember.response.404.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `putMember.response.404.error.checks.sha` (string | null, required)
    - `putMember.response.404.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `putMember.response.404.error.checks.required` (array | null, required) — Null while unknown.
    - `putMember.response.404.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `putMember.response.404.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `putMember.response.404.error.checks.statuses.sha` (string, required)
      - `putMember.response.404.error.checks.statuses.context` (string, required)
      - `putMember.response.404.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `putMember.response.404.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `putMember.response.404.error.checks.statuses.target_url` (string | null, optional)
      - `putMember.response.404.error.checks.statuses.description` (string | null, optional)
      - `putMember.response.404.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `putMember.response.404.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `putMember.response.404.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/monorepos/putMember/index.md
