Project API Endpoints

Complete reference for project management REST API endpoints including settings, members, provider keys, API keys, and counters.

12 min read
apiprojectsettings

The Project API provides full management of your CodeCourier project -- its metadata, settings, team members, provider keys, API keys, and usage counters. All endpoints require a valid project API key in the Authorization header.

Project CRUD

GET /api/v1/project

Retrieve the current project's details including name, slug, GitHub repo URL, and creation date.

curl -H "Authorization: Bearer cc_live_..." \
  https://<deployment>.convex.site/api/v1/project

Response:

{
  "data": {
    "id": "...",
    "_id": "...",
    "name": "My Project",
    "slug": "my-project",
    "githubRepoUrl": "https://github.com/org/repo",
    "_creationTime": 1700000000000
  }
}

POST /api/v1/project/update

Update project metadata. All body fields are optional -- only provided fields are updated.

curl -X POST -H "Authorization: Bearer cc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "New Name", "slug": "new-slug", "githubRepoUrl": "https://github.com/org/new-repo"}' \
  https://<deployment>.convex.site/api/v1/project/update

Body fields:

  • name (string, optional) -- New project name
  • slug (string, optional) -- New URL slug
  • githubRepoUrl (string, optional) -- Repository URL

POST /api/v1/project/delete

Delete the project. This is a destructive operation. No request body required.

Project Settings

GET /api/v1/project/settings

Retrieve all project settings including system prompts, environment variables, learning configuration, and git commit identity.

POST /api/v1/project/settings/update

Update project settings. All body fields are optional.

curl -X POST -H "Authorization: Bearer cc_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "sandboxSystemPrompt": "You are a helpful coding assistant.",
    "claudeMd": "# Project Instructions\n...",
    "issueDiscoveryPrompt": "Analyze the codebase and identify issues.",
    "envVars": {"NODE_ENV": "production"},
    "gitCommitName": "CodeCourier Bot",
    "gitCommitEmail": "bot@example.com"
  }' \
  https://<deployment>.convex.site/api/v1/project/settings/update

Body fields:

  • sandboxSystemPrompt -- System prompt injected into sandboxes
  • claudeMd -- CLAUDE.md content for sandbox agents
  • issueDiscoveryPrompt -- Default prompt for issue discovery sessions
  • selectedSkills -- Array of skill identifiers
  • selectedCommands -- Array of command identifiers
  • selectedScripts -- Array of script identifiers
  • envVars -- Key-value environment variables
  • deployEnvVars -- Deploy-specific environment variables
  • testUserCredentials -- Test user credentials object
  • convexDeployKey -- Convex deploy key
  • convexDevKey -- Convex dev key
  • learningTemplateId -- Template for learning extraction
  • learningModel -- Model used for learning extraction
  • mergingTemplateId -- Template for merge operations
  • mergingModel -- Model used for merge operations
  • gitCommitName -- Git author name
  • gitCommitEmail -- Git author email

Team Members

GET /api/v1/project/members

List all team members for the project with their roles and status.

POST /api/v1/project/members/invite

Invite a new member to the project.

{
  "email": "user@example.com",
  "role": "member"
}

Valid roles: "owner", "admin", "member".

POST /api/v1/project/members/remove

Remove a member from the project.

{ "targetUserId": "..." }

POST /api/v1/project/members/update-role

Update a member's role.

{ "targetUserId": "...", "role": "admin" }

Provider Keys

Provider keys are credentials for external services used at sandbox runtime (E2B, Anthropic, OpenRouter, OpenAI, GitHub).

GET /api/v1/project/provider-keys

List all provider keys. Returns provider name and last 4 characters only (keys are encrypted at rest).

POST /api/v1/project/provider-keys/set

Set or update a provider key.

{
  "provider": "anthropic",
  "key": "sk-ant-..."
}

POST /api/v1/project/provider-keys/remove

Remove a provider key.

{ "provider": "anthropic" }

API Keys

GET /api/v1/project/api-keys

List all project API keys showing prefix, name, creation date, last used date, and revocation status.

POST /api/v1/project/api-keys/generate

Generate a new API key. Returns the full key (shown only once).

curl -X POST -H "Authorization: Bearer cc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "My New Key"}' \
  https://<deployment>.convex.site/api/v1/project/api-keys/generate

Response:

{
  "data": {
    "key": "cc_live_abc123def456...",
    "id": "..."
  }
}

POST /api/v1/project/api-keys/revoke

Revoke an API key. Revocation is immediate and permanent.

{ "keyId": "..." }

Project Counters

GET /api/v1/project/counters

Retrieve aggregate counts for the project (total runs, sandboxes, workflows, etc.). Useful for dashboard summaries.