# People

The organisation's people: list and read them; owners and admins invite, change roles, deactivate and remove. A person's projects and teams.

## List people

`GET /orgs/{org}/people`

Scope: `people:read`

The people of the organisation the token's person may see, as the People directory shows them: everyone for owners and admins, and for others the people they share a project or space with (guests see no directory). Filter by role (guest for guests), text, project, team, job title, department and location. Email addresses follow the organisation's email visibility. This list is the people export: page through it.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]

### Query parameters

- `limit` (integer): How many items a page holds, 1 to 200. [from 1 to 200; default 50]
- `cursor` (string): The next_cursor of the previous page; leave it out for the first page. [at most 1000 characters]
- `count` (string): true adds total, the number of items in the whole list. [one of: true, false]
- `q` (string): Text in the name, email, job title or department. [at most 255 characters]
- `role` (string): Only people with this organisation role. [one of: owner, admin, member, guest]
- `project` (string): Only people who can open this project (key or id). [1 to 60 characters]
- `team` (string (uuid)): Only members of this team.
- `job_title` (string) [at most 255 characters]
- `department` (string) [at most 255 characters]
- `location` (string) [at most 255 characters]
- `sort` (string): name (the default), joined_at or id; - for descending; several with commas. [at most 100 characters]
- `fields` (string): Only these fields, comma-separated: id, name, email, status, role, job_title, department, location, time_zone, language, joined_at. id always comes; the fields not asked for are left out, required or not.

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/people" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a",
      "name": "Priya Shah",
      "email": "priya@example.com",
      "status": "active",
      "role": "member",
      "job_title": "Designer",
      "department": "Product",
      "location": "Pune",
      "time_zone": "Asia/Kolkata",
      "language": "en-GB",
      "joined_at": "2026-11-17T09:30:00.000Z"
    }
  ],
  "next_cursor": null
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Invite a person

`POST /orgs/{org}/people`

Scope: `people:admin`

Invites someone to the organisation (owners and admins), as Organisation settings > People does: they join when they accept the emailed invitation. Someone already a member, or with a pending invitation, is a 409 conflict; past the plan's people (Free's 10) or a guest on Free is 409 limit_reached. This is also how a removed person comes back.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]

### Headers

- `Idempotency-Key` (string): A unique key (such as a uuid): the same key and body within 24 hours gets the first answer again without a second create; another body gets 422. [1 to 200 characters]

### Body

- `email` (string, required): The person's email address. [at most 254 characters]
- `role` (string): Their organisation role; only owners invite owners. Guests aren't in Free. [one of: owner, admin, member, guest; default member]
- `product_access` (array of string): Projects, Docs or both. [1 to 2 items; default ["projects","docs"]]
- `projects` (array of object): Projects to give them a role in when they join. [at most 50 items; default []]
  - `project` (string, required): A project's id, or its key (WEB). [1 to 60 characters]
  - `role` (string, required) [one of: admin, member, viewer, guest]
- `spaces` (array of object): Docs spaces (by id) to give them a role in when they join. [at most 50 items; default []]
  - `space` (string (uuid), required)
  - `role` (string, required) [one of: admin, manager, collaborator, viewer]
- `notify` (boolean): true (the default) emails the invitation; false makes it without an email (an admin can resend it from Organisation settings > People). [default true]

### Request

```sh
curl -X POST "https://projqo.example/api/v1/orgs/{org}/people" \
  -H "Authorization: Bearer $PROJQO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "string",
  "role": "member",
  "product_access": [
    "projects",
    "docs"
  ],
  "projects": [],
  "spaces": [],
  "notify": true
}'
```

### Answer: 202

```json
{
  "id": "3a4b5c6d-7e8f-4a0b-9c1d-2e3f4a5b6c7d",
  "email": "new.person@example.com",
  "role": "member",
  "product_access": [
    "docs",
    "projects"
  ],
  "status": "pending",
  "notified": true
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 409 `conflict`: conflict: The thing changed since it was read, or the change clashes with its state. limit_reached: A limit was reached (of the plan, or of how many of something one person may have).
- 413 `too_large`: too_large: The body or a file is larger than allowed.
- 415 `unsupported_media_type`: unsupported_media_type: The body isn't JSON.
- 422 `idempotency_key_reused`: idempotency_key_reused: The same Idempotency-Key was sent within 24 hours with a different body.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Get a person

`GET /orgs/{org}/people/{person}`

Scope: `people:read`

One person, by id or email, as their person page shows them to the token's person. A former member (removed from the organisation) comes back with status former and their name only. Someone the caller can't see answers 404, as someone who doesn't exist.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `person` (string, required): The person's id, or their email address. [1 to 320 characters]

### Query parameters

- `fields` (string): Only these fields, comma-separated: id, name, email, status, role, job_title, department, location, time_zone, language, joined_at. id always comes; the fields not asked for are left out, required or not.

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/people/{person}" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "id": "8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a",
  "name": "Priya Shah",
  "email": "priya@example.com",
  "status": "active",
  "role": "member",
  "job_title": "Designer",
  "department": "Product",
  "location": "Pune",
  "time_zone": "Asia/Kolkata",
  "language": "en-GB",
  "joined_at": "2026-11-17T09:30:00.000Z"
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Change a person's role

`PATCH /orgs/{org}/people/{person}`

Scope: `people:admin`

Changes a person's organisation role or product access (owners and admins; only an owner makes or changes an owner). The organisation keeps at least one owner (409 conflict).

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `person` (string, required): The person's id, or their email address. [1 to 320 characters]

### Body

- `role` (string) [one of: owner, admin, member, guest]
- `product_access` (array of string) [1 to 2 items]

### Request

```sh
curl -X PATCH "https://projqo.example/api/v1/orgs/{org}/people/{person}" \
  -H "Authorization: Bearer $PROJQO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "owner",
  "product_access": [
    "projects"
  ]
}'
```

### Answer: 200

```json
{
  "id": "8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a",
  "name": "Priya Shah",
  "email": "priya@example.com",
  "status": "active",
  "role": "member",
  "job_title": "Designer",
  "department": "Product",
  "location": "Pune",
  "time_zone": "Asia/Kolkata",
  "language": "en-GB",
  "joined_at": "2026-11-17T09:30:00.000Z"
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 409 `conflict`: conflict: The thing changed since it was read, or the change clashes with its state. limit_reached: A limit was reached (of the plan, or of how many of something one person may have).
- 413 `too_large`: too_large: The body or a file is larger than allowed.
- 415 `unsupported_media_type`: unsupported_media_type: The body isn't JSON.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Remove a person

`DELETE /orgs/{org}/people/{person}`

Scope: `people:admin`

Removes a person from the organisation (owners and admins; only an owner removes an owner; never the last owner). This is projqo's deactivation: their roles go, their work keeps their name as a former member, and their tokens stop working at once. Invite them again to bring them back.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `person` (string, required): The person's id, or their email address. [1 to 320 characters]

### Request

```sh
curl -X DELETE "https://projqo.example/api/v1/orgs/{org}/people/{person}" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 204

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 409 `conflict`: conflict: The thing changed since it was read, or the change clashes with its state.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## List a person's projects

`GET /orgs/{org}/people/{person}/projects`

Scope: `people:read`

The projects the person has a role in (directly or through a group) that the token's person can open; owners and admins see all of them.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `person` (string, required): The person's id, or their email address. [1 to 320 characters]

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/people/{person}/projects" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
      "key": "WEB",
      "name": "Website"
    }
  ],
  "next_cursor": null
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## List a person's teams

`GET /orgs/{org}/people/{person}/teams`

Scope: `people:read`

The teams the person is on, archived ones last.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `person` (string, required): The person's id, or their email address. [1 to 320 characters]

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/people/{person}/teams" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10",
      "name": "string",
      "description": "string",
      "type": "official",
      "joining": "open",
      "icon": "users",
      "member_count": 1,
      "is_member": true,
      "archived": true,
      "archived_at": "2026-12-01T09:30:00Z",
      "parent": {
        "id": "6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10",
        "name": "string"
      },
      "created_at": "2026-12-01T09:30:00Z"
    }
  ],
  "next_cursor": "string",
  "total": 1
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).
