Create Avatar Consent

cURL

curl --request POST \
  --url https://api.heygen.com/v3/avatars/{group_id}/consent \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '\
{\
  "reroute_url": "<string>"\
}\
'

Response Codes

  • 200
  • 400
  • 401
  • 404
  • 429
{
  "data": {
    "avatar_group": {
      "id": "<string>",
      "name": "<string>",
      "created_at": 123,
      "looks_count": 123,
      "preview_image_url": "https://files.heygen.ai/avatar/anna_preview.jpg",
      "preview_video_url": "https://files.heygen.ai/avatar/anna_preview.mp4",
      "gender": "female",
      "default_voice_id": "1bd001e7e50f421d891986aad5c8bbd2",
      "consent_status": "approved",
      "status": "completed",
      "error": {
        "code": "<string>",
        "message": "<string>"
      }
    },
    "url": "<string>"
  }
}

Authorizations

ApiKeyAuth

  • x-api-key
    • Type: string
    • Location: header
    • Required: Yes
    • Description: HeyGen API key. Obtain from your HeyGen dashboard.

Path Parameters

  • group_id
    • Type: string
    • Required: Yes
    • Description: Unique avatar group identifier

Body

  • application/json
    • Description: Request body for POST /v3/avatars/{group_id}/consent.
    • reroute_url
      • Type: string | null
      • Description: Callback URL where the user is redirected after completing consent. Defaults to HeyGen's consent completion page.

Response

  • 200
    • Type: application/json
    • Description: Successful response
{
  "data": {
    ...  
  }
}