Skip to main content
Triggers an asynchronous AI build for the specified proposal, using its completed AI outline as the source. The proposal must have a Completed outline before you call this endpoint — if no completed outline exists, the request is rejected with a 400 error.
The build runs asynchronously. The response confirms the build has been queued, but the proposal content will not be ready immediately. Listen for the Proposal Build Status Changed webhook to know when the build finishes, or poll the proposal status directly.

Request

POST /public/proposals/{ProposalId}/ai/build

Headers

Accept
string
required
Must be application/json.
Content-Type
string
required
Must be application/json.
X-MSS-API-APPID
string
required
Your API Application Key.
X-MSS-API-USERKEY
string
required
Your User API Key.
X-MSS-CUSTOM-DATE
string
required
Current UTC timestamp in RFC 7231 format.
X-MSS-SIGNATURE
string
required
HMAC-SHA256 signature, Base64-encoded.

Path parameters

ProposalId
integer
required
Unique identifier of the proposal to build. The proposal must have a completed AI outline; otherwise the request returns a 400 error.

Body parameters

proposalId
integer
required
Must match the ProposalId path parameter. Unique identifier of the proposal with a completed AI outline.

Response

Success

A 200 response confirms the build has been queued.
proposalId
integer
required
The ID of the proposal for which the build was triggered.
status
string
required
Initial build status, indicating the job has been queued or is in progress.

Error codes

CodeMeaning
400Bad request — no completed AI outline exists for this proposal.
401Not authorized — invalid credentials or incorrect HMAC signature.
403Forbidden — your account does not have permission for this API call.
404Proposal not found.

Example

curl -i -X POST \
  'https://api.portal.io/public/proposals/12345/ai/build' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-MSS-API-APPID: YOUR_API_APPID' \
  -H 'X-MSS-API-USERKEY: YOUR_API_USERKEY' \
  -H 'X-MSS-CUSTOM-DATE: Thu, 17 Apr 2026 12:00:00 GMT' \
  -H 'X-MSS-SIGNATURE: Base64EncodedHMACSHA256Signature' \
  -d '{"proposalId": 12345}'
Response
{
  "proposalId": 12345,
  "status": "Building"
}