Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/paramveer-cyber/Deployaar/llms.txt

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

The featureRequest router manages the complete lifecycle of a feature request — from the moment a plain-English idea is submitted, through the AI clarification conversation, PRD generation, agent coding, review, and final shipment. Every procedure in this router requires authentication and enforces organization membership before any data is read or mutated.

featureRequest.createFeatureRequest — mutation

Creates a new feature request inside a project. The caller must be an authenticated member of the organization that owns the project, the project must have a linked GitHub repository, and the organization must not have exceeded its plan’s feature request limit.
Billing limits are enforced at creation time. If the organization has reached its plan’s maxFeatureRequests ceiling the procedure throws a 403 Forbidden error with an upgrade prompt.

Input

projectId
string (UUID)
required
The UUID of the project under which the feature request will be created.
title
string
required
A short human-readable title for the feature. Minimum 5 characters, maximum 200 characters.
rawRequest
string
required
The full plain-English description of the feature being requested. Minimum 10 characters.

Response

{
  "success": true,
  "message": "Feature request created",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "projectId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
      "projectRepositoryId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "createdByUserId": "auth0|abc123",
      "title": "Add CSV export to the reports page",
      "rawRequest": "Users need to be able to download their monthly report as a CSV file...",
      "source": "manual",
      "status": "clarifying",
      "githubIssueNumber": null,
      "githubIssueUrl": null,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    }
  }
}

featureRequest.getFeatureRequests — query

Returns all feature requests belonging to a specific project. Results are ordered by creation date descending.

Input

projectId
string (UUID)
required
The UUID of the project whose feature requests should be listed.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "featureRequests": [
      {
        "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "projectId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
        "projectRepositoryId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
        "createdByUserId": "auth0|abc123",
        "title": "Add CSV export to the reports page",
        "rawRequest": "Users need to be able to download...",
        "source": "manual",
        "status": "in_development",
        "githubIssueNumber": null,
        "githubIssueUrl": null,
        "createdAt": "2024-01-15T10:30:00.000Z",
        "updatedAt": "2024-01-15T11:00:00.000Z"
      }
    ]
  }
}

featureRequest.getFeatureRequestById — query

Fetches a single feature request by its ID, provided the caller is a member of the owning organization.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to retrieve.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "projectId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
      "projectRepositoryId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "createdByUserId": "auth0|abc123",
      "title": "Add CSV export to the reports page",
      "rawRequest": "Users need to be able to download...",
      "source": "manual",
      "status": "prd_pending",
      "githubIssueNumber": null,
      "githubIssueUrl": null,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:45:00.000Z"
    }
  }
}

featureRequest.updateFeatureRequestStatus — mutation

Directly sets the status of a feature request. Use the specialized lifecycle procedures (approveRelease, rejectRelease, markShipped) where possible — they enforce guard conditions. This procedure is for administrative overrides.

Status values

ValueDescription
clarifyingAwaiting user answers in the clarification chat
prd_pendingClarification complete, PRD not yet generated
planningPRD approved, engineering tasks being generated
in_developmentCoding agent is running or has run
in_reviewPR exists, awaiting AI code review pass
fix_neededReview failed or release rejected — needs another coding cycle
approvedRelease approved by an owner or admin
shippedPR merged into the default branch
rejectedPermanently closed without shipping

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to update.
status
string (enum)
required
One of: clarifying | prd_pending | planning | in_development | in_review | fix_needed | approved | shipped | rejected

Response

{
  "success": true,
  "message": "Status updated",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "status": "in_review",
      "...": "..."
    }
  }
}

featureRequest.getClarificationMessages — query

Retrieves the full AI ↔ user clarification conversation for a feature request. Messages are returned in chronological order.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request whose clarification thread should be fetched.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "messages": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "role": "ai",
        "content": "Who are the primary users of this CSV export feature?",
        "createdAt": "2024-01-15T10:31:00.000Z"
      },
      {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "role": "user",
        "content": "Finance team members and project managers.",
        "createdAt": "2024-01-15T10:33:00.000Z"
      }
    ]
  }
}

featureRequest.submitReplyAndGetNextQuestion — mutation

Saves the user’s reply in the clarification chat and immediately calls the AI to generate the next follow-up question. Returns both the saved user message and the AI’s next question (or null when the AI determines clarification is complete).

Input

featureRequestId
string (UUID)
required
The UUID of the feature request being clarified.
replyContent
string
required
The user’s reply to the current AI question. Minimum 1 character, maximum 4 000 characters.

Response

{
  "success": true,
  "message": "Reply saved",
  "data": {
    "userMessage": {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "role": "user",
      "content": "Finance team members and project managers.",
      "createdAt": "2024-01-15T10:33:00.000Z"
    },
    "nextAiQuestion": {
      "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
      "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "role": "ai",
      "content": "Should the export include all historical data or only the current date range selected in the UI?",
      "createdAt": "2024-01-15T10:33:05.000Z"
    }
  }
}

featureRequest.completeClarification — mutation

Marks the clarification phase as finished and transitions the feature request to prd_pending, signalling that it is ready for PRD generation. Call this when the user chooses to end the conversation early or after the AI returns nextAiQuestion: null.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to advance past clarification.

Response

{
  "success": true,
  "message": "Clarification complete",
  "data": {
    "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "status": "prd_pending"
  }
}

featureRequest.approveRelease — mutation

Approves a feature request for release. The feature request must currently be in in_review status and the caller must be an owner or admin of the organization.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to approve.

Response

{
  "success": true,
  "message": "Feature request approved",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "status": "approved",
      "...": "..."
    }
  }
}

featureRequest.rejectRelease — mutation

Rejects a release and moves the feature request back to fix_needed, triggering another coding cycle. The feature request must be in_review or approved. Caller must be an owner or admin.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to reject.

Response

{
  "success": true,
  "message": "Feature request sent back for fixes",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "status": "fix_needed",
      "...": "..."
    }
  }
}

featureRequest.markShipped — mutation

Merges the associated GitHub pull request (squash merge) and transitions the feature request to shipped. Requires approved status, a linked repository, and at least one AI review that passed. Caller must be an owner or admin.
This procedure calls the GitHub API to perform the actual merge. If the PR is already merged, closed, or has unresolved conflicts the operation will fail with a 409 Conflict error.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to ship.

Response

{
  "success": true,
  "message": "Feature request marked as shipped",
  "data": {
    "featureRequest": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "status": "shipped",
      "...": "..."
    }
  }
}

featureRequest.deleteFeatureRequest — mutation

Permanently deletes a feature request and its associated data. The caller must be a member of the owning organization.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request to delete.

Response

{
  "success": true,
  "message": "Feature request deleted",
  "data": {
    "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
  }
}

featureRequest.getDashboardFeed — query

Returns the dashboard feed for the authenticated user, segmented into three buckets. No input required.
data.needsAction
DashboardFeatureRequest[]
Feature requests currently waiting on the user: clarifying, prd_pending, in_review, fix_needed.
data.inProgress
DashboardFeatureRequest[]
Feature requests actively being processed by the system: planning, in_development.
data.recentlyShipped
DashboardFeatureRequest[]
The 10 most recently shipped feature requests.
{
  "success": true,
  "message": "Found",
  "data": {
    "needsAction": [...],
    "inProgress": [...],
    "recentlyShipped": [...]
  }
}

TypeScript example

import { trpc } from "~/trpc/client";

// List feature requests for a project
const { data } = trpc.featureRequest.getFeatureRequests.useQuery({
  projectId: "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
});

// Create a new feature request
const createMutation = trpc.featureRequest.createFeatureRequest.useMutation();

await createMutation.mutateAsync({
  projectId: "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
  title: "Add CSV export to the reports page",
  rawRequest:
    "Finance team needs to export monthly reports as CSV files for use in Excel. " +
    "The export should respect the current date range filter selected in the UI.",
});

// Reply in the clarification chat
const replyMutation = trpc.featureRequest.submitReplyAndGetNextQuestion.useMutation();

const { data: replyData } = await replyMutation.mutateAsync({
  featureRequestId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  replyContent: "Finance team members and project managers.",
});

console.log(replyData?.nextAiQuestion?.content);

REST equivalent (curl)

# Create a feature request
curl -X POST https://api.deployaar.com/api/projects/{projectId}/feature-requests \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
    "title": "Add CSV export to the reports page",
    "rawRequest": "Finance team needs to export monthly reports as CSV files..."
  }'

# List feature requests for a project
curl https://api.deployaar.com/api/projects/{projectId}/feature-requests \
  -H "Authorization: Bearer <token>"

# Get a single feature request
curl https://api.deployaar.com/api/feature-requests/{featureRequestId} \
  -H "Authorization: Bearer <token>"

# Submit a clarification reply
curl -X POST https://api.deployaar.com/api/feature-requests/{featureRequestId}/clarification/reply \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"replyContent": "Finance team members and project managers."}'

# Approve a release
curl -X POST https://api.deployaar.com/api/feature-requests/{featureRequestId}/approve \
  -H "Authorization: Bearer <token>"

Build docs developers (and LLMs) love