Contact Standard
A person or entity. Used as $from, $to, $owner, $author across all other standards. All value properties follow the value pattern.
Minimal Contact
{
$type: 'contact',
$version: 1,
$name: 'John Doe',
$email: '[email protected]'
}
Full Contact
{
$type: 'contact',
$version: 1,
$name: 'John Doe',
$avatar: 'https://example.com/john.webp',
$email: [
{ $value: '[email protected]', $kind: 'private' },
{ $value: '[email protected]', $kind: 'work', $primary: true }
],
$phone: [
{ $value: '+43664123456', $kind: 'mobile' },
{ $value: '+4311234567', $kind: 'landline' },
{ $value: '+4315554321', $kind: 'work' }
],
$address: [
{
$street: 'Stephansplatz 3',
$city: 'Vienna',
$postal: '1010',
$country: 'AT',
$kind: 'home'
},
{
$street: 'Kärntner Ring 1',
$city: 'Vienna',
$postal: '1010',
$country: 'AT',
$kind: 'work'
}
],
$platforms: [
{ $url: 'https://github.com', $identifier: 'johndoe' },
{ $url: 'https://ident.worldapi.org', $identifier: 'john' },
{ $url: 'https://johndoe.com', $identifier: 'john', _id: 4523 }
]
}
Contact Properties
| Property | Type | Required | Description |
|---|---|---|---|
$type |
string | yes | Always 'contact' |
$version |
number | yes | Standard version |
$name |
string | yes | Display name |
$avatar |
string | no | Avatar image URL |
$email |
value | no | Email address(es) |
$phone |
value | no | Phone number(s) |
$address |
value | no | Physical address(es) |
$platforms |
array | no | Platform presences |
Platform Entry
Each entry in $platforms points to this contact on a specific platform.
| Property | Type | Required | Description |
|---|---|---|---|
$url |
string | yes | Platform URL |
$identifier |
string | yes | Public username/handle on that platform |
Private platform IDs (like a WordPress userId) go in _id -- unprefixed, private by convention.
Address Properties
| Property | Type | Description |
|---|---|---|
$street |
string | Street name and number |
$city |
string | City or locality |
$region |
string | State, province, or region |
$postal |
string | Postal/ZIP code |
$country |
string | ISO 3166-1 alpha-2 country code |
$kind |
string | home, work, etc. |
Usage in Other Standards
Wherever another standard needs a person, it uses a contact object or a short reference:
// full contact object
$from: {
$type: 'contact',
$name: 'John Doe',
$email: '[email protected]'
}
// short form -- just enough to identify
$owner: { $name: 'John' }
// reference by platform identity
$author: {
$type: 'contact',
$name: 'John',
$platforms: [{ $url: 'https://ident.worldapi.org', $identifier: 'john' }]
}