Snooplytics API DocsHome

Projects API

Create, update, and manage projects

1 min read

Project lifecycle management. Create projects with name and description, update settings, control visibility and status, and handle project deletion. Supports pagination and search for listing projects.

Available Endpoints

Endpoints

GET
/api/user/organizations/{organizationId}/projects

List organization projects

Get a paginated list of projects owned by the organization.

Bearer TokenScopes: projects:read, organization:read

Request

curl -X GET "http://localhost:3030/api/user/organizations/{organizationId}/projects" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Query Parameters

NameTypeDescription
offsetinteger,nullNumber of items to skip
0
limitnumberNumber of items to return (max 100)
20
qstringSearch query (matches name)

Response 200

Projects retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Items fetched successfully",
"data": [
  {
    "id": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "createdByUserId": "string",
    "name": "string",
    "description": "string",
    "businessContext": "string",
    "status": "draft",
    "frequency": "weekly",
    "timezone": "string",
    "topics": [
      {
        "id": "string",
        "name": "string",
        "description": "string",
        "watchFor": "string",
        "sources": [
          {}
        ]
      }
    ],
    "lastRunAt": {},
    "nextRunAt": {},
    "createdByUser": {
      "id": "507f1f77bcf86cd799439012",
      "fullName": "John Doe"
    }
  }
],
"meta": {
  "total": 100,
  "offset": 0,
  "limit": 10,
  "hasMore": true
}
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST
/api/user/organizations/{organizationId}/projects

Create a new project

Create a project. The server uses `monitoringIntent` and `businessContext` to generate research topics via LLM. Topics are returned on the response.

Bearer TokenScopes: projects:write, organization:read

Request

curl -X POST "http://localhost:3030/api/user/organizations/{organizationId}/projects" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"name":"Fintech competitor watch","monitoringIntent":"Track pricing and feature changes from Stripe, Adyen, and Mollie. Flag anything affecting our SMB tier.","businessContext":"EU-based B2B payments platform serving SMBs. Compete on price and onboarding speed.","description":"string"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
namerequiredstring
Fintech competitor watch
monitoringIntentrequiredstringWhat do you want to monitor? Used once at intake to generate topics; not stored.
Track pricing and feature changes from Stripe, Adyen, and Mollie. Flag anything affecting our SMB tier.
businessContextstringLong-lived context the AI should know about your business.
EU-based B2B payments platform serving SMBs. Compete on price and onboarding speed.
descriptionstring

Response 201

Project created successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "createdByUserId": "string",
  "name": "string",
  "description": "string",
  "businessContext": "string",
  "status": "draft",
  "frequency": "weekly",
  "timezone": "string",
  "topics": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "watchFor": "string",
      "sources": [
        {
          "url": {},
          "lastContentHash": {},
          "lastFetchedAt": {}
        }
      ]
    }
  ],
  "lastRunAt": {},
  "nextRunAt": {},
  "createdByUser": {
    "id": "507f1f77bcf86cd799439012",
    "fullName": "John Doe"
  }
}
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET
/api/user/organizations/{organizationId}/projects/{id}

Get a specific project

Bearer TokenScopes: projects:read, organization:read

Request

curl -X GET "http://localhost:3030/api/user/organizations/{organizationId}/projects/{id}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000
idrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000

Response 200

Project retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "createdByUserId": "string",
  "name": "string",
  "description": "string",
  "businessContext": "string",
  "status": "draft",
  "frequency": "weekly",
  "timezone": "string",
  "topics": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "watchFor": "string",
      "sources": [
        {
          "url": {},
          "lastContentHash": {},
          "lastFetchedAt": {}
        }
      ]
    }
  ],
  "lastRunAt": {},
  "nextRunAt": {},
  "createdByUser": {
    "id": "507f1f77bcf86cd799439012",
    "fullName": "John Doe"
  }
}
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT
/api/user/organizations/{organizationId}/projects/{id}

Update a project (manual edit)

Update an existing project. All fields optional. `topics` (when present) replaces the full list; per-source state is preserved for stable topic ids.

Bearer TokenScopes: projects:write, organization:read

Request

curl -X PUT "http://localhost:3030/api/user/organizations/{organizationId}/projects/{id}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"name":"string","description":{},"businessContext":{},"status":"draft","frequency":"weekly","timezone":"string","topics":[{"id":"string","name":"string","description":"string","watchFor":"string","sources":[{"url":"string"}]}]}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000
idrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
namestring
descriptionstring,null
businessContextstring,null
statusstring
frequencystring
timezonestring
topicsUpdateTopic[]

Response 200

Project updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "createdByUserId": "string",
  "name": "string",
  "description": "string",
  "businessContext": "string",
  "status": "draft",
  "frequency": "weekly",
  "timezone": "string",
  "topics": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "watchFor": "string",
      "sources": [
        {
          "url": {},
          "lastContentHash": {},
          "lastFetchedAt": {}
        }
      ]
    }
  ],
  "lastRunAt": {},
  "nextRunAt": {},
  "createdByUser": {
    "id": "507f1f77bcf86cd799439012",
    "fullName": "John Doe"
  }
}
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
DELETE
/api/user/organizations/{organizationId}/projects/{id}

Delete a project

Bearer TokenScopes: projects:write, organization:read

Request

curl -X DELETE "http://localhost:3030/api/user/organizations/{organizationId}/projects/{id}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000
idrequiredstringUUID identifier
550e8400-e29b-41d4-a716-446655440000

Response 200

Project deleted successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "createdByUserId": "string",
  "name": "string",
  "description": "string",
  "businessContext": "string",
  "status": "draft",
  "frequency": "weekly",
  "timezone": "string",
  "topics": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "watchFor": "string",
      "sources": [
        {
          "url": {},
          "lastContentHash": {},
          "lastFetchedAt": {}
        }
      ]
    }
  ],
  "lastRunAt": {},
  "nextRunAt": {},
  "createdByUser": {
    "id": "507f1f77bcf86cd799439012",
    "fullName": "John Doe"
  }
}
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}