Community Records
Community records are stored in the community’s AT Protocol PDS repository. Only members (or admins) can create records.
Creating Records
Section titled “Creating Records”POST /api/v1/communities/:did/recordsHeaders: X-Api-Key: your-api-key{ "userDid": "did:plc:member123", "collection": "community.opensocial.list", "record": { "$type": "community.opensocial.list", "name": "Book Recommendations", "community": "did:plc:community123", "createdBy": "did:plc:member123", "createdAt": "2025-01-01T00:00:00.000Z" }}Response:
{ "uri": "at://did:plc:community123/community.opensocial.list/abc123", "cid": "bafyrei..." }Updating Records
Section titled “Updating Records”PUT /api/v1/communities/:did/records{ "userDid": "did:plc:member123", "collection": "community.opensocial.list", "rkey": "abc123", "record": { "$type": "community.opensocial.list", "name": "Updated Book List" }}Deleting Records
Section titled “Deleting Records”DELETE /api/v1/communities/:did/records/community.opensocial.list/abc123?userDid=did:plc:member123Listing Records
Section titled “Listing Records”GET /api/v1/communities/:did/records/community.opensocial.list?limit=20&cursor=...Getting a Single Record
Section titled “Getting a Single Record”GET /api/v1/communities/:did/records/community.opensocial.list/abc123Admin-Only Collections
Section titled “Admin-Only Collections”Some collections can only be written to by admins:
community.opensocial.profile— community profilecommunity.opensocial.admins— admin listcommunity.opensocial.listitem.status— list item statuses
Admin-Update Collections
Section titled “Admin-Update Collections”These can be created by any member but only updated by admins:
community.opensocial.listcommunity.opensocial.listitem.statuscommunity.opensocial.profilecommunity.opensocial.admins
Webhook Notifications
Section titled “Webhook Notifications”When records are created, updated, or deleted, registered webhooks receive notifications with events: record.created, record.updated, record.deleted.