# at.locale.membership

> Published by [locale.at](https://lexicon.garden/identity/did:plc:uwynodlfvaieqcisgh5zvdwx)

✓ This is the authoritative definition for this NSID.

## Description

Grants a role to a DID on a project, optionally scoped to specific locales. Authored ONLY by the project owner (or an admin); the ingester rejects memberships authored by anyone else.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.membership)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.membership/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.membership/examples)

## Definitions

### `at.locale.membership`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | Yes |  |
| `member` | `string` (did) | Yes | DID the role is granted to. |
| `locales` | `array` | No | Locale scope. Omitted = all target locales. |
| `project` | `string` (at-uri) | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "at.locale.membership",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "project",
          "member",
          "role",
          "createdAt"
        ],
        "properties": {
          "role": {
            "type": "string",
            "knownValues": [
              "admin",
              "reviewer",
              "translator",
              "viewer"
            ]
          },
          "member": {
            "type": "string",
            "format": "did",
            "description": "DID the role is granted to."
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 35,
              "minLength": 2
            },
            "maxLength": 1000,
            "description": "Locale scope. Omitted = all target locales."
          },
          "project": {
            "type": "string",
            "format": "at-uri"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Grants a role to a DID on a project, optionally scoped to specific locales. Authored ONLY by the project owner (or an admin); the ingester rejects memberships authored by anyone else."
}
```
