Skip to content

Build an integration package for an agent

POST
/agents/{id}/exports/{format}
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.

id
required

MongoDB ObjectId

string
/^[a-fA-F0-9]{24}$/

MongoDB ObjectId

format
required

Export package format

string
Allowed values: scorm12 cmi5 xapi storyline

Export package format

Media typeapplication/json
object
label

Course or cohort label recorded on every session launched from the package

string
<= 120 characters

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"
]
}