Send Message or Request Revision
cURL
curl --request POST \
--url https://api.heygen.com/v3/video-agents/{session_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '\
{\
"message": "<string>",\
"avatar_id": "<string>",\
"voice_id": "<string>",\
"files": [\
{\
"type": "<string>",\
"url": "<string>"\
}\
]\
}'
Response Codes
- 200
- 400
- 401
- 404
- 429
{
"data": {
"session_id": "<string>",
"run_id": "<string>",
"title": "<string>"
}
}
Authorizations
ApiKeyAuthBearerAuth
- x-api-key
Type: string
Location: header
Required: Yes
Description: HeyGen API key. Obtain from your HeyGen dashboard.
Path Parameters
- session_id
Type: string
Required: Yes
Description: Session ID
Body
message
Type: string
Required: Yes
Description: Text message to the agent. Required string length:1 - 10000avatar_id
Type: string | null
Description: Override avatar for this messagevoice_id
Type: string | null
Description: Override voice for this messagefiles
Type: (AssetUrl · object | AssetId · object | AssetBase64 · object)[] | null
Description: Optional file attachments (max 20 files). Maximum array length:20. Asset input via publicly accessible HTTPS URL.AssetUrl
- AssetId
- AssetBase64
Response
200
- data
Type: SendMessageResponse · object
Description: Response from sending a message to a session.