Why does this payload work and this doesn't?

Discussions

Ask a Question
Back to All

Why does this payload work and this doesn't?

Hi,

I'm calling the endpoint: https://api.heygen.com/v1/video.generate

And here are three payloads:

  • A: Doesn't work - Text is 1195 caracter
  • B: Doesn't work - Text is 1196 caracter (one o at the end)
  • C: Works - Text is 1197 caracter (two o at the end)

The ones not working return:

Call API: 400 Bad Request

Bad Request

The browser (or proxy) sent a request that this server could not understand.

PAYLOAD A:

{
"template_id": "4656a89cf6444ab2a93216d1116f2508",
"title": "property investment, residential property portfolio, comprehensive due diligence",
"variables": [
{
"properties": {
"id": "8f216b3f242d4f11b4474a98e8f02fae",
"voice_id": "a3c629a7986e4f14a197101e78b36abf",
"text": "Hi my name is jamie from siteline properties At siteline we use our .. proprietary technology, to help passionate investors like yourself easily build, manage and scale residential property portfolios. We take care of everything – from sourcing the properties, to letting them! This means you can divert your attention elsewhere whilst we do all the work! How does that sound? Here's how it works... Tell us your budget .. preferred locations .. and yield expectations. Using our innovative technology, we’ll instantly source a fully vetted list of profitable investment opportunities that match your search criteria. We’ll package this up into an.. easy-to-understand document ready for you to approve. All properties go through our own comprehensive due diligence process. Our team of experts will collate and share all of the financial break-down, comparable properties in the market, local area information, refurbishment requirements (if any) and estate agent valuations for sales and lettings. We’ll take care of the entire process from sourcing the deals through to letting them. From sourcing and due diligence, to full deal management and beyond – we’ll take care of everything."
},
"name": "avatar_0"
}
],
"test": false,
"caption_open": true
}

PAYLOAD B:

{
"template_id": "4656a89cf6444ab2a93216d1116f2508",
"title": "property investment, residential property portfolio, comprehensive due diligence",
"variables": [
{
"properties": {
"id": "8f216b3f242d4f11b4474a98e8f02fae",
"voice_id": "a3c629a7986e4f14a197101e78b36abf",
"text": "Hi my name is jamie from siteline properties At siteline we use our .. proprietary technology, to help passionate investors like yourself easily build, manage and scale residential property portfolios. We take care of everything – from sourcing the properties, to letting them! This means you can divert your attention elsewhere whilst we do all the work! How does that sound? Here's how it works... Tell us your budget .. preferred locations .. and yield expectations. Using our innovative technology, we’ll instantly source a fully vetted list of profitable investment opportunities that match your search criteria. We’ll package this up into an.. easy-to-understand document ready for you to approve. All properties go through our own comprehensive due diligence process. Our team of experts will collate and share all of the financial break-down, comparable properties in the market, local area information, refurbishment requirements (if any) and estate agent valuations for sales and lettings. We’ll take care of the entire process from sourcing the deals through to letting them. From sourcing and due diligence, to full deal management and beyond – we’ll take care of everything.o"
},
"name": "avatar_0"
}
],
"test": false,
"caption_open": true
}

PAYLOAD C:

{
"template_id": "4656a89cf6444ab2a93216d1116f2508",
"title": "property investment, residential property portfolio, comprehensive due diligence",
"variables": [
{
"properties": {
"id": "8f216b3f242d4f11b4474a98e8f02fae",
"voice_id": "a3c629a7986e4f14a197101e78b36abf",
"text": "Hi my name is jamie from siteline properties At siteline we use our .. proprietary technology, to help passionate investors like yourself easily build, manage and scale residential property portfolios. We take care of everything – from sourcing the properties, to letting them! This means you can divert your attention elsewhere whilst we do all the work! How does that sound? Here's how it works... Tell us your budget .. preferred locations .. and yield expectations. Using our innovative technology, we’ll instantly source a fully vetted list of profitable investment opportunities that match your search criteria. We’ll package this up into an.. easy-to-understand document ready for you to approve. All properties go through our own comprehensive due diligence process. Our team of experts will collate and share all of the financial break-down, comparable properties in the market, local area information, refurbishment requirements (if any) and estate agent valuations for sales and lettings. We’ll take care of the entire process from sourcing the deals through to letting them. From sourcing and due diligence, to full deal management and beyond – we’ll take care of everything.oo"
},
"name": "avatar_0"
}
],
"test": false,
"caption_open": true
}