# org.simocracy.alias

> Published by [gainforest.earth](https://lexicon.garden/identity/did:plc:qoti4acfmc5wg6zzmtix6hse)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qoti4acfmc5wg6zzmtix6hse/org.simocracy.alias)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qoti4acfmc5wg6zzmtix6hse/org.simocracy.alias/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qoti4acfmc5wg6zzmtix6hse/org.simocracy.alias/examples)

## Definitions

### `org.simocracy.alias`

**Type**: `record`

A globally unique URL slug pointing at a gathering or sim. Written by the facilitator account so that PDS-level rkey uniqueness inside the facilitator's repo gives us a single global namespace. The rkey IS the slug — there is at most one alias record per slug across the entire platform.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `string` | Yes | Which collection the target lives in. Used by routers to decide whether the alias resolves under /events/<slug> or /sims/<slug>. |
| `slug` | `string` | Yes | URL-safe slug. Must equal the rkey of this record. Lowercase letters, digits, and hyphens only; no leading or trailing hyphen. Mirrored as a field so consumers that don't expose rkey can still read the slug. |
| `owner` | `string` (did) | Yes | DID of the user who claimed this slug. Must equal the DID in the target record's repo. Used for authorising release without re-fetching the target. |
| `target` | `ref` → `com.atproto.repo.strongRef` | Yes | StrongRef to the gathering or sim record this slug points to. |
| `createdAt` | `string` (datetime) | Yes | Timestamp when the alias was claimed. |

## Raw Schema

```json
{
  "id": "org.simocracy.alias",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "slug",
          "kind",
          "target",
          "owner",
          "createdAt"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "Which collection the target lives in. Used by routers to decide whether the alias resolves under /events/<slug> or /sims/<slug>.",
            "knownValues": [
              "gathering",
              "sim"
            ]
          },
          "slug": {
            "type": "string",
            "maxLength": 64,
            "minLength": 2,
            "description": "URL-safe slug. Must equal the rkey of this record. Lowercase letters, digits, and hyphens only; no leading or trailing hyphen. Mirrored as a field so consumers that don't expose rkey can still read the slug."
          },
          "owner": {
            "type": "string",
            "format": "did",
            "description": "DID of the user who claimed this slug. Must equal the DID in the target record's repo. Used for authorising release without re-fetching the target."
          },
          "target": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "StrongRef to the gathering or sim record this slug points to."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when the alias was claimed."
          }
        }
      },
      "description": "A globally unique URL slug pointing at a gathering or sim. Written by the facilitator account so that PDS-level rkey uniqueness inside the facilitator's repo gives us a single global namespace. The rkey IS the slug — there is at most one alias record per slug across the entire platform."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
