Skip to main content

Overview

Profiles are the core identity system in Aya. Each profile has a unique slug and can be of type individual, organization, or product.

List Profiles

GET /{locale}/profiles
List profiles by kind with pagination support.
locale
string
required
Locale code (e.g., en, fr, ja)
filter_kind
string
required
Comma-separated profile kinds: individual, organization, product
limit
integer
default:"25"
Number of profiles per page
offset
integer
default:"0"
Number of profiles to skip
curl "http://localhost:8080/en/profiles?filter_kind=individual,organization&limit=10"
Response:
{
  "data": [
    {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "slug": "john-doe",
      "kind": "individual",
      "title": "John Doe",
      "description": "Software Engineer",
      "profile_picture_uri": "https://avatars.githubusercontent.com/u/12345",
      "locale_code": "en",
      "default_locale": "en",
      "points": 150,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "cursor": {
    "next": "eyJvZmZzZXQiOjEwfQ==",
    "has_more": true
  }
}

Get Profile by Slug

GET /{locale}/profiles/{slug}
Retrieve a single profile by its unique slug.
locale
string
required
Locale code
slug
string
required
Profile slug (e.g., john-doe)
curl "http://localhost:8080/en/profiles/john-doe"
Response:
{
  "data": {
    "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "slug": "john-doe",
    "kind": "individual",
    "title": "John Doe",
    "description": "Open source developer",
    "profile_picture_uri": "https://avatars.githubusercontent.com/u/12345",
    "pronouns": "he/him",
    "locale_code": "en",
    "default_locale": "en",
    "points": 150,
    "feature_relations": "public",
    "feature_links": "public",
    "feature_qa": "disabled",
    "feature_discussions": "public",
    "option_story_discussions_by_default": true,
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Check Slug Availability

GET /{locale}/profiles/{slug}/_check
Check if a profile slug is available before creation.
slug
string
required
Slug to check
include_deleted
boolean
default:"false"
Include soft-deleted profiles in availability check
curl "http://localhost:8080/en/profiles/john-doe/_check"
Response:
{
  "data": {
    "available": false,
    "message": "This slug is already taken",
    "severity": "error"
  }
}
available
boolean
Whether the slug is available
message
string
Human-readable availability message
severity
string
Message severity: info, warning, error

Create Profile

POST /{locale}/profiles/_create
Authentication RequiredThis endpoint requires a valid JWT token in the Authorization header.
Create a new profile for the authenticated user.
slug
string
required
Unique slug (2-50 characters, lowercase letters, numbers, hyphens)
kind
string
required
Profile kind: individual, organization, product
title
string
required
Profile title (max 100 characters)
description
string
Profile description (max 500 characters)
Individual Profile RestrictionEach user can only create ONE individual profile. Organizations and products have no limit.
curl -X POST "http://localhost:8080/en/profiles/_create" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "my-startup",
    "kind": "organization",
    "title": "My Startup",
    "description": "Building the future of X"
  }'
Response:
{
  "data": {
    "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "slug": "my-startup",
    "kind": "organization",
    "title": "My Startup",
    "description": "Building the future of X",
    "locale_code": "en",
    "default_locale": "en",
    "points": 0,
    "created_at": "2024-03-07T10:30:00Z"
  }
}

Update Profile

PATCH /{locale}/profiles/{slug}
Authentication Required
Update profile main fields (picture, pronouns, properties, feature settings).
profile_picture_uri
string
Profile picture URL
pronouns
string
Pronouns (e.g., he/him, she/her, they/them)
properties
object
Custom profile properties (JSON object)
feature_relations
string
Relations module visibility: public, hidden, disabled
Links module visibility: public, hidden, disabled
feature_qa
string
Q&A module visibility: public, hidden, disabled
feature_discussions
string
Discussions module visibility: public, hidden, disabled
option_story_discussions_by_default
boolean
Enable discussions by default for new stories
curl -X PATCH "http://localhost:8080/en/profiles/john-doe" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pronouns": "he/him",
    "feature_discussions": "public",
    "option_story_discussions_by_default": true
  }'

Check Permissions

GET /{locale}/profiles/{slug}/_permissions
Authentication Required
Check if the authenticated user can edit the specified profile.
curl "http://localhost:8080/en/profiles/john-doe/_permissions" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Response:
{
  "data": {
    "can_edit": true,
    "viewer_membership_kind": "owner"
  }
}
can_edit
boolean
Whether the user can edit this profile
viewer_membership_kind
string
User’s membership level: follower, sponsor, member, contributor, maintainer, lead, owner
GET /{locale}/profiles/{slug}/links
List all public links for a profile (social media, external sites). Response:
{
  "data": [
    {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "kind": "github",
      "order": 1,
      "public_id": "johndoe",
      "uri": "https://github.com/johndoe",
      "title": "GitHub",
      "icon": "github",
      "is_verified": true,
      "is_featured": true,
      "visibility": "public"
    }
  ]
}
POST /{locale}/profiles/{slug}/_links
Authentication Required
kind
string
required
Link kind: website, github, x, linkedin, instagram, youtube, bsky, discord, telegram, external-site
uri
string
Link URL (required for most kinds)
title
string
required
Link title
icon
string
Icon identifier or emoji
group
string
Link group for organization
description
string
Link description
Show in featured section
visibility
string
default:"public"
Visibility: public, followers, sponsors, members, contributors, maintainers, leads, owners

Profile Pages

List Profile Pages

GET /{locale}/profiles/{slug}/pages
List all visible pages for a profile. Response:
{
  "data": [
    {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "slug": "about",
      "title": "About Us",
      "summary": "Learn more about our mission",
      "visibility": "public"
    }
  ]
}

Get Page by Slug

GET /{locale}/profiles/{slug}/pages/{pageSlug}
Retrieve a specific profile page. Response:
{
  "data": {
    "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "slug": "about",
    "title": "About Us",
    "summary": "Learn more about our mission",
    "content": "# About\n\nWe are building...",
    "visibility": "public",
    "published_at": "2024-01-15T10:30:00Z"
  }
}

Create Profile Page

POST /{locale}/profiles/{slug}/_pages
Authentication Required - Requires maintainer+ access
slug
string
required
Page slug (2-100 characters, lowercase, numbers, hyphens)
title
string
required
Page title (max 200 characters)
summary
string
Page summary
content
string
required
Page content (Markdown)
cover_picture_uri
string
Cover image URL
visibility
string
default:"public"
Page visibility: public, unlisted, private
published_at
string
Publication timestamp (ISO 8601)

Profile Stories

List Published Stories

GET /{locale}/profiles/{slug}/stories
List all stories published to this profile.
limit
integer
default:"25"
Number of stories per page
offset
integer
default:"0"
Number of stories to skip

List Authored Stories

GET /{locale}/profiles/{slug}/stories-authored
List all stories authored by this profile (including unpublished).

Profile Relationships

List Contributions

GET /{locale}/profiles/{slug}/contributions
List profiles where this profile is a member/contributor.

List Members

GET /{locale}/profiles/{slug}/members
List members of this organization/product profile.

Build docs developers (and LLMs) love