Upload file

file_name must carry a supported extension (.pdf .doc .docx .png .jpg .jpeg; .csv and .xlsx only
when enabled for the account), the binary must match it, and the file must be 100 MB or smaller.

Known product gap: the passthrough currently rejects multipart uploads with
400 JSON Schema Validation Error — Failed to parse the request body parameters, and rejects JSON
with 400 Unsupported content type: application/json. No upload succeeds through the wrapper today.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request parameters

ParameterTypeRequiredInDescription
AuthorizationstringYesHeaderPartner app token, sent raw. Bearer <token> is also accepted.
Content-TypestringYesHeadermultipart/form-data
appIdstring (uuid)YesPathPartner Portal app id. Stands in for Meta's entity_id.
file_namestringYesBodye.g. pricing.pdf.
filestring (binary)YesBodyThe file binary.

Example request

curl --location --request POST 'https://partner.gupshup.io/partner/app/<appId>/bizai/agent_config/files' \
  --header 'Authorization: <PARTNER_APP_TOKEN>' \
  --form 'file_name="pricing.pdf"' \
  --form 'file=@"/path/to/pricing.pdf"'

Response parameters — 201

ParameterTypeDescription
idstringResource id. Meta pfbid… id.
file_namestringFile name including its extension.

Example response — 201 Created

{
  "id": "pfbid0FileExampleId",
  "file_name": "pricing.pdf"
}

Error responses

400 Bad Request — The app is not live, or WASS does not consider it live.

{
  "message": "App is not live.",
  "status": "error"
}

400 Bad Request — The app has no phone number attached. Checked before the live check.

{
  "message": "Phone id not found for the given App",
  "status": "error"
}

401 Unauthorized — Authorization is missing or invalid, belongs to another app, or appId is unknown or not a UUID.

{
  "status": "error",
  "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
}

405 Method Not Allowed — Any method other than GET, POST, PUT or DELETE, e.g. PATCH.

{
  "status": "error",
  "message": "Request method 'PATCH' is not supported"
}

429 Too Many Requests — More than 30 /bizai/** requests in 60 seconds for this app. The 31st is rejected.

{
  "status": "error",
  "message": "Too Many Requests"
}
Path Params
uuid
required

Partner Portal app id. Stands in for Meta's entity_id.

Body Params
string
required
file
required
Responses

429

Per-app rate limit exceeded. Retry after the 60-second window.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json