Finalize Connector
Create a connector from a reviewed draft.
POST /api/connectors/drafts/{id}/finalize
Authorization
- Analyst / Admin: Required.
note
The draft (generation log) must be in review status. The new connector is created at version 1.0.0 with status testing — these are not configurable on this call. Use Update Connector afterwards to bump the version or promote to production.
Request Body
None. Endpoint enable/disable and config are read from the draft itself.
Response
Returns 201 Created:
{
"connector_id": "conn_slack001",
"platform_name": "Slack",
"version": "1.0.0",
"endpoints_count": 12,
"message": "Connector created with 12 enabled endpoints (3 disabled)"
}
endpoints_count is the number of enabled endpoints (disabled ones are still carried over but filtered at execution time).
Side Effects
Finalizing a draft:
- Promotes the draft connector row to
testingstatus at version1.0.0(soft-deleting any priortestingconnector for the same platform) - Keeps all endpoints, preserving each one's enabled flag
- Extracts sample responses from the spec into connector test data (when available)
- Marks the generation log
completed - Invalidates the connectors-list cache
Pre-Finalization Checklist
Before finalizing, ensure:
- All relevant endpoints are enabled
- Endpoint dependencies are configured
- Pagination is set up for list endpoints
- Authentication has been tested
- At least one full chain test has passed
Example Request
curl -X POST "https://api.traces.io/api/connectors/drafts/draft_abc123/finalize" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"version": "1.0.0",
"status": "testing"
}'
Error Responses
400 Bad Request
Draft not in review status:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Cannot finalize draft in analyzing status"
}
}
No endpoints in the draft:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "No endpoints in draft"
}
}
404 Not Found
{
"error": {
"code": "NOT_FOUND",
"message": "Draft not found"
}
}
Post-Finalization
After finalizing:
- The connector appears in the connector list (in
testingstatus) - It is not yet usable for customer collections until promoted to
production - The generation log is marked
completed
To promote the connector or change endpoints, use the Update Connector endpoint.