Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.campground.fyi/llms.txt

Use this file to discover all available pages before exploring further.

Profiles represent members of your Campground organization. Each profile stores core identity fields (name, email, roles) alongside custom field values, group memberships, team memberships, and accepted program applications. Use these endpoints to sync member data between Campground and external systems. All profile endpoints require an API key with the read:profiles scope for read operations and write:profiles for create and update operations. See authentication for details.

The profile object

A profile object returned by the API contains the following fields:
id
string
required
Unique identifier for the profile (UUID).
email
string
required
The profile’s email address.
first_name
string
First name.
last_name
string
Last name.
avatar_url
string | null
URL of the profile’s avatar image.
roles
string[]
Array of roles assigned to the profile. Possible values: admin, member, applicant, sub_admin, campground_admin. A profile can hold multiple roles simultaneously.
created_at
string
ISO 8601 timestamp of when the profile was created.
last_activity_at
string | null
ISO 8601 timestamp of the profile’s most recent activity.
groups
object
Map of groups the profile belongs to, keyed by group ID.
teams
object
Map of teams the profile belongs to, keyed by team ID.
programs
object
Map of programs the profile has an accepted application in, keyed by program ID. Only accepted applications are included.
profile_fields
object
Map of custom field values for the profile, keyed by field ID.

List profiles

Returns a paginated list of profiles in your organization. Hidden profiles are excluded.
GET https://api.campground.fyi/public/v1/profiles.list

Query parameters

page
number
default:"1"
Page number to return. Starts at 1.
limit
number
default:"100"
Number of profiles to return per page. Maximum is 100.
name
string
Filter profiles by name. Case-insensitive partial match against the profile’s full name.
email
string
Filter profiles by email address. Case-insensitive partial match.
programName
string
Filter to profiles with an accepted application in a program whose name matches this value. Case-insensitive partial match.
seasonName
string
Filter to profiles with an accepted application in a season whose name matches this value. Can be combined with programName.

Response fields

data
object[]
required
Array of profile objects.
count
number
required
Total number of profiles matching the query (across all pages).
hasMore
boolean
required
true if additional pages of results exist.
organization_id
string
required
The ID of the organization these profiles belong to.

Example

curl "https://api.campground.fyi/public/v1/profiles.list?page=1&limit=20&programName=Bootcamp" \
  -H "Authorization: Bearer cg_live_xxxxxxxxxxxxxxxxxxxx"
Response
{
  "data": [
    {
      "id": "prof_abc123",
      "email": "alex@example.com",
      "first_name": "Alex",
      "last_name": "Kim",
      "avatar_url": null,
      "roles": ["member"],
      "created_at": "2024-01-15T10:30:00.000Z",
      "last_activity_at": "2024-03-01T14:22:00.000Z",
      "groups": {
        "grp_xyz": { "id": "grp_xyz", "name": "Alumni" }
      },
      "teams": {
        "team_456": { "id": "team_456", "name": "Engineering" }
      },
      "programs": {
        "prog_789": {
          "id": "prog_789",
          "name": "Spring Bootcamp",
          "seasons": {
            "season_001": { "id": "season_001", "name": "2024 Cohort" }
          }
        }
      },
      "profile_fields": {}
    }
  ],
  "count": 142,
  "hasMore": true,
  "organization_id": "1"
}

Get a profile

Returns a single profile by ID.
GET https://api.campground.fyi/public/v1/profiles.detail

Query parameters

profileId
string
required
The ID of the profile to retrieve.

Example

curl "https://api.campground.fyi/public/v1/profiles.detail?profileId=prof_abc123" \
  -H "Authorization: Bearer cg_live_xxxxxxxxxxxxxxxxxxxx"
Response
{
  "data": {
    "id": "prof_abc123",
    "email": "alex@example.com",
    "first_name": "Alex",
    "last_name": "Kim",
    "avatar_url": "https://example.com/avatars/alex.jpg",
    "roles": ["member"],
    "created_at": "2024-01-15T10:30:00.000Z",
    "last_activity_at": "2024-03-01T14:22:00.000Z",
    "groups": {},
    "teams": {},
    "programs": {},
    "profile_fields": {
      "field_001": {
        "id": "field_001",
        "text_value": "Software Engineer",
        "numeric_value": null,
        "date_value": null,
        "array_value": null,
        "json_value": null,
        "field": {
          "id": "field_001",
          "name": "Job Title",
          "type": "text",
          "type_options": {}
        }
      }
    }
  },
  "organization_id": "1"
}
A 404 is returned if the profile does not exist or does not belong to your organization.

Create or update a profile

Creates a new profile or updates an existing one, matched by email address. If no profile exists with the given email in your organization, a new profile is created with the member role. If a profile already exists, only the fields you provide are updated.
POST https://api.campground.fyi/public/v1/profiles.createOrUpdate
This endpoint requires the write:profiles scope.

Request body

email
string
required
Email address of the profile. Used to look up an existing profile. Must be a valid email format.
first_name
string
First name. Omit to leave the existing value unchanged.
last_name
string
Last name. Omit to leave the existing value unchanged.
avatar_url
string | null
URL to an avatar image. Pass null to clear the existing avatar.

Response fields

data
object
required
The created or updated profile object.
organization_id
string
required
The ID of the organization the profile belongs to.
created
boolean
required
true if a new profile was created; false if an existing profile was updated.

Example

curl -X POST https://api.campground.fyi/public/v1/profiles.createOrUpdate \
  -H "Authorization: Bearer cg_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jordan@example.com",
    "first_name": "Jordan",
    "last_name": "Rivera"
  }'
Response (created)
{
  "data": {
    "id": "prof_new999",
    "email": "jordan@example.com",
    "first_name": "Jordan",
    "last_name": "Rivera",
    "avatar_url": null,
    "roles": ["member"],
    "created_at": "2024-04-14T09:00:00.000Z",
    "last_activity_at": null,
    "groups": {},
    "teams": {},
    "programs": {},
    "profile_fields": {}
  },
  "organization_id": "1",
  "created": true
}

Update profile custom fields

Updates one or more custom field values on a profile. Accepts up to 100 field updates per request. Each update upserts the value—creating the field value record if it does not exist, or replacing it if it does.
POST https://api.campground.fyi/public/v1/fields.updateProfileField
This endpoint requires the write:profiles scope.

Request body

profile_id
string
required
UUID of the profile to update.
fields
object[]
required
Array of field updates. Minimum 1, maximum 100.

Response fields

data
object
required
organization_id
string
required
The ID of the organization.

Example

curl -X POST https://api.campground.fyi/public/v1/fields.updateProfileField \
  -H "Authorization: Bearer cg_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "prof_abc123",
    "fields": [
      { "field_id": "field_001", "value": "Senior Engineer" },
      { "field_id": "field_002", "value": 5 },
      { "field_id": "field_003", "value": ["JavaScript", "TypeScript"] }
    ]
  }'
Response
{
  "data": {
    "profile_id": "prof_abc123",
    "updated_fields": [
      { "field_id": "field_001", "field_name": "Job Title", "field_type": "text" },
      { "field_id": "field_002", "field_name": "Years of Experience", "field_type": "number" },
      { "field_id": "field_003", "field_name": "Skills", "field_type": "multi_select" }
    ],
    "updated_count": 3
  },
  "organization_id": "1"
}
A 400 is returned if any field_id values are invalid or do not belong to your organization. A 404 is returned if the profile_id is not found.