Publish & Unpublish
Control the lifecycle of a bundle by publishing, unpublishing, or adding slots after creation.
Publish
Submit a configured bundle for processing. The account must be fully configured, and for account_and_videos bundles, at least one video must be configured.
POST /bundles/:id/publish
Requirements
- Bundle must be in
pending_setupstatus. - Account configuration must be complete (username, visible name, biography, profile picture).
- For
account_and_videostype: at least 1 video must be configured.
Example
curl -X POST https://app.tokportal.com/api/ext/bundles/bnd_abc123/publish \
-H "X-API-Key: tok_live_xxx"
Response
{
"data": {
"id": "bnd_abc123",
"status": "published",
"published_at": "2026-02-10T14:00:00Z"
}
}
Error Responses
| Status | Code | Description |
|---|---|---|
400 | account_not_configured | Account configuration is incomplete. |
400 | no_videos_configured | At least 1 video is required for account_and_videos bundles. |
409 | invalid_status | Bundle is not in pending_setup status. |
Unpublish
Revert a published bundle back to pending_setup. This allows you to make further configuration changes before resubmitting.
POST /bundles/:id/unpublish
warning
Unpublishing does not refund credits. The credits charged at bundle creation remain deducted.
Requirements
- Bundle must be in
publishedstatus. - Bundle must not have been accepted yet.
Example
curl -X POST https://app.tokportal.com/api/ext/bundles/bnd_abc123/unpublish \
-H "X-API-Key: tok_live_xxx"
Response
{
"data": {
"id": "bnd_abc123",
"status": "pending_setup",
"unpublished_at": "2026-02-10T15:30:00Z"
}
}
Error Responses
| Status | Code | Description |
|---|---|---|
409 | invalid_status | Bundle is not in published status. |
409 | already_accepted | Bundle has been accepted and cannot be unpublished. |
Add Video Slots
Add additional video slots to an existing bundle. Credits are debited immediately.
POST /bundles/:id/add-video-slots
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
quantity | integer | Yes | Number of video slots to add. Must be >= 1. |
Requirements
- Bundle type must be
account_and_videosorvideos_only. - Bundle must not be in
completedstatus.
Example
curl -X POST https://app.tokportal.com/api/ext/bundles/bnd_abc123/add-video-slots \
-H "X-API-Key: tok_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"quantity": 2
}'
Response
{
"data": {
"id": "bnd_abc123",
"videos_quantity": 5,
"previous_videos_quantity": 3
},
"credits_charged": 20,
"credits_remaining": 350
}
Error Responses
| Status | Code | Description |
|---|---|---|
400 | invalid_bundle_type | Bundle type does not support videos. |
400 | invalid_quantity | Quantity must be at least 1. |
402 | insufficient_credits | Not enough credits. |
409 | bundle_completed | Cannot add slots to a completed bundle. |
Add Edit Slots
Add editing slots to an existing bundle. Each video can have at most 1 edit slot. Credits are debited immediately.
POST /bundles/:id/add-edit-slots
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
quantity | integer | Yes | Number of edit slots to add. Must be >= 1. |
Requirements
- Bundle type must be
account_and_videosorvideos_only. - Total
edits_quantitymust not exceedvideos_quantity(max 1 edit per video). - Bundle must not be in
completedstatus.
Example
curl -X POST https://app.tokportal.com/api/ext/bundles/bnd_abc123/add-edit-slots \
-H "X-API-Key: tok_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"quantity": 1
}'
Response
{
"data": {
"id": "bnd_abc123",
"edits_quantity": 3,
"previous_edits_quantity": 2,
"videos_quantity": 5
},
"credits_charged": 5,
"credits_remaining": 345
}
Error Responses
| Status | Code | Description |
|---|---|---|
400 | invalid_bundle_type | Bundle type does not support videos/edits. |
400 | edits_exceed_videos | Adding these slots would exceed the 1-edit-per-video limit. |
400 | invalid_quantity | Quantity must be at least 1. |
402 | insufficient_credits | Not enough credits. |
409 | bundle_completed | Cannot add slots to a completed bundle. |