API Reference
Projects

Projects

Every app is represented by a project. Projects contain all paywalls, campaigns, products, and analytics data. Each project has a public key (for SDKs) and a private key (for management).

Create a Project

POST /v1/projects

This endpoint requires a pre-existing private key for bootstrapping. Use the demo private key sk_demo_agentwallie_private_key or create projects through the dashboard.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name for the project

Example

curl -X POST https://agentwallie.com/api/v1/projects \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_demo_agentwallie_private_key" \
  -d '{"name": "Fitness Tracker Pro"}'

Response 201 Created

{
  "id": "clxyz12340001",
  "name": "Fitness Tracker Pro",
  "createdAt": "2025-03-15T10:00:00.000Z",
  "updatedAt": "2025-03-15T10:00:00.000Z",
  "apiKeys": [
    {
      "id": "key_001",
      "key": "pk_a1b2c3d4e5f6...",
      "type": "public",
      "projectId": "clxyz12340001"
    },
    {
      "id": "key_002",
      "key": "sk_f6e5d4c3b2a1...",
      "type": "private",
      "projectId": "clxyz12340001"
    }
  ]
}

Get a Project

GET /v1/projects/:id

Path Parameters

ParameterDescription
idProject ID

Example

curl https://agentwallie.com/api/v1/projects/clxyz12340001 \
  -H "Authorization: Bearer sk_your_private_key"

Response 200 OK

{
  "id": "clxyz12340001",
  "name": "Fitness Tracker Pro",
  "createdAt": "2025-03-15T10:00:00.000Z",
  "updatedAt": "2025-03-15T10:00:00.000Z",
  "apiKeys": [
    { "id": "key_001", "key": "pk_a1b2c3d4e5f6...", "type": "public" },
    { "id": "key_002", "key": "sk_f6e5d4c3b2a1...", "type": "private" }
  ]
}

Rotate API Key

POST /v1/projects/:id/rotate-key

Rotate a project's public or private API key. The old key is immediately invalidated.

Request Body

FieldTypeRequiredDescription
type"public" | "private"YesWhich key type to rotate

Example

curl -X POST https://agentwallie.com/api/v1/projects/clxyz12340001/rotate-key \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_your_private_key" \
  -d '{"type": "public"}'

Response 200 OK

{
  "id": "key_001",
  "key": "pk_new_key_value...",
  "type": "public",
  "projectId": "clxyz12340001",
  "createdAt": "2025-03-15T10:00:00.000Z"
}
⚠️

Rotating the public key will break all SDK connections until the app is updated with the new key. Rotate with caution in production.