Description
This API endpoint allows authenticated users to interact with an Assistant that can creates a Backlog of User Stories for a given App Name/Description. Users must provide an API key and a message to receive AI-generated Backlog responses.
Endpoint
POST /wp-json/apicloud/v1/api_services/openai_assistant/backlog-generator
You need to be logged in to view your API key.
Headers
| Header Name | Value | Description |
|---|---|---|
| Authorization | You need to be logged in to view your API key. | Your API Key |
Request Parameters
| Parameter Name | Type | Required | Description |
| message_content | string | ✅ Yes | The Name or Description of the App |
Example Request (cURL)
curl -X POST "/wp-json/apicloud/v1/api_services/openai_assistant/backlog-generator" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message_content": "Content to summarize"
}'
Example Successful Response
{
"thread_id": "thread_aYv6lwxKFvnqN2M9KeRGFM96",
"run_status": "completed",
"assistant_reply": "Backlog with User Stories",
"usage_log": {
"success": true,
"message": "AI service usage deducted successfully!",
"service_id": XXX,
"api_service_info": "Backlog Generator",
"deducted_points": 10,
"remaining_balance": 1234567
}
}
How It Works
- Authentication:
- The request must include a valid API key in the
Authorizationheader.
- The request must include a valid API key in the
- Processing the Request:
- Creates a new thread for structured conversation.
- Sends the user message to the specified Assistant.
- Runs the Assistant and waits for completion (polling every 2 seconds).
- Retrieves the Assistant’s response.
Error Responses
| HTTP Code | Error Message | Description |
| 401 | Missing API Key | The request does not include an API key. |
| 401 | Invalid API Key | The API key provided does not match any user. |
| 500 | Thread creation failed | Unable to create a new thread. |
| 500 | Run failed | The Assistant run did not complete successfully. |
Additional Notes
- API usage is logged, and points are deducted from the user’s balance.
