Build an integration package for an agent
POST
/agents/{id}/exports/{format}
const url = 'https://api.somebodyai.co/api/v1/agents/507f1f77bcf86cd799439011/exports/scorm12';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"label":"Sales onboarding, cohort 3"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.somebodyai.co/api/v1/agents/507f1f77bcf86cd799439011/exports/scorm12 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "label": "Sales onboarding, cohort 3" }'Builds a deterministic package using the export capability declared by the agent template.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
MongoDB ObjectId
string
MongoDB ObjectId
format
required
Export package format
string
Export package format
Request Body
Section titled “Request Body”Media typeapplication/json
object
label
Course or cohort label recorded on every session launched from the package
string
Responses
Section titled “Responses”Generated export package
Media typeapplication/octet-stream
string format: binary
Unsupported format, template capability, or export configuration
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Unauthorized - missing or invalid auth
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Forbidden - insufficient permissions
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Resource not found
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}Export package generation failed
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}