# at.happyproto.admin.addCustomer

> Make an account a customer: add it to the customers space with read access. Adding an existing member succeeds and changes nothing. Staff only.

- Kind: procedure
- Authority: admin.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.addCustomer)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.addCustomer/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.addCustomer/analytics)

## Procedure (`at.happyproto.admin.addCustomer`)

Type: procedure · POST

### Input (application/json)

- `did` (string · did, required)

### Output (application/json)


### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is not HappyProto staff, or may not change the customers space's members: only its creator or a HappyView super user may.
- `InvalidRequest`: did is not a DID.
- `Upstream`: The customers space is not configured, or could not be changed.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Make an account a customer: add it to the customers space with read access. Adding an existing member succeeds and changes nothing. Staff only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not HappyProto staff, or may not change the customers space's members: only its creator or a HappyView super user may.",
          "name": "Forbidden"
        },
        {
          "description": "did is not a DID.",
          "name": "InvalidRequest"
        },
        {
          "description": "The customers space is not configured, or could not be changed.",
          "name": "Upstream"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "did"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.admin.addCustomer",
  "lexicon": 1
}
```
