Probably
Docs

Save segments

save_segments, in Changes: A connection or key that may make changes. None spends credits; prepare_* and stage tools (research, brainstorm, write_script, review, generate_clip, voice, storyboard) prepare paid work for confirm_spend.

POST
/api/v1/tools/save_segments

Review a finished research run's segments, as the member; research saves them by itself, so this is optional. Each draft listed is kept, renamed where name is given, or merged into the draft mergeWith names; every draft not listed is dropped, which takes its segment out of what's offered. A suggested update a listed draft holds is applied. What changed is written as the member's revision, which a later refresh won't overwrite. Videos and campaigns already using a segment keep the revisions they pinned. Attach a segment to a new video with prepare_video's audience role. It answers with the run's segments, and asking for the same thing again changes nothing. Pass a new requestKey.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (prb_…) from Settings → Connections.

Request Body

application/json
  1. body
researchId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
drafts*array<>

The drafts to keep; every draft not listed is dropped

Items1 <= items <= 6
requestKey*string
Match^[\w.:-]+$
Length8 <= length <= 64

Response Body

The tool's answer.

application/json
  1. response
segments*array<>
curl -X POST 'https://studio.probably.co/api/v1/tools/save_segments' \  -H "Authorization: Bearer $PROBABLY_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "researchId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",  "drafts": [    {      "draftId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",      "name": "Commuters on the go"    },    {      "draftId": "c3d4e5f6-a7b8-4c9d-8e1f-2a3b4c5d6e7f",      "mergeWith": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e"    }  ],  "requestKey": "save-javy-1"}'
{  "segments": [    {      "segmentId": "d4e5f6a7-b8c9-4d0e-9f2a-3b4c5d6e7f80",      "revisionId": "e5f6a7b8-c9d0-4e1f-8a3b-4c5d6e7f8091",      "name": "Commuters on the go"    }  ]}