Create connector tool

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-TypestringYesHeaderapplication/json
appIdstring (uuid)YesPathPartner Portal app id. Stands in for Meta's entity_id.
connectorIdstringYesPathConnector id (pfbid). Meta pfbid… id.
namestringYesBodyName.
descriptionstringYesBodyHuman-readable description.
request_definitionobjectYesBodyThe outbound HTTP call the tool makes.
request_definition.methodstringYesBodyOne of: GET, POST, PUT, DELETE, PATCH.
request_definition.pathstringYesBodye.g. /orders/{order_id}.
request_definition.path_parametersobjectNoBodyPath placeholders, keyed by name.
request_definition.path_parameters.{key}objectNoBodyOne entry per name.
request_definition.path_parameters.{key}.typestringYesBodyOne of: string, integer, number, boolean.
request_definition.path_parameters.{key}.descriptionstringNoBodyHuman-readable description.
request_definition.path_parameters.{key}.requiredbooleanNoBodytrue if the model must supply a value.
request_definition.path_parameters.{key}.bindingobjectNoBodyFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.path_parameters.{key}.binding.kindstringYesBodyOne of: default, macro.
request_definition.path_parameters.{key}.binding.valuestringNoBodyFixed value used when kind is default.
request_definition.path_parameters.{key}.binding.macrostringNoBodyOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.query_parametersobjectNoBodyQuery parameters, keyed by name.
request_definition.query_parameters.{key}objectNoBodyOne entry per name.
request_definition.query_parameters.{key}.typestringYesBodyOne of: string, integer, number, boolean.
request_definition.query_parameters.{key}.descriptionstringNoBodyHuman-readable description.
request_definition.query_parameters.{key}.requiredbooleanNoBodytrue if the model must supply a value.
request_definition.query_parameters.{key}.bindingobjectNoBodyFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.query_parameters.{key}.binding.kindstringYesBodyOne of: default, macro.
request_definition.query_parameters.{key}.binding.valuestringNoBodyFixed value used when kind is default.
request_definition.query_parameters.{key}.binding.macrostringNoBodyOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.headersobjectNoBodyRequest headers, keyed by name.
request_definition.headers.{key}objectNoBodyOne entry per name.
request_definition.headers.{key}.typestringYesBodyOne of: string, integer, number, boolean.
request_definition.headers.{key}.descriptionstringNoBodyHuman-readable description.
request_definition.headers.{key}.requiredbooleanNoBodytrue if the model must supply a value.
request_definition.headers.{key}.bindingobjectNoBodyFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.headers.{key}.binding.kindstringYesBodyOne of: default, macro.
request_definition.headers.{key}.binding.valuestringNoBodyFixed value used when kind is default.
request_definition.headers.{key}.binding.macrostringNoBodyOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.bodyobjectNoBodyJSON request body definition.
request_definition.body.content_typestringYesBodyAlways application/json.
request_definition.body.paramsobjectYesBodyBody fields, keyed by name.
request_definition.body.params.{key}objectNoBodyOne entry per name.
request_definition.body.params.{key}.typestringYesBodyOne of: object, array, string, integer, number, boolean.
request_definition.body.params.{key}.descriptionstringNoBodyHuman-readable description.
request_definition.body.params.{key}.requiredarray of stringNoBodyNames of required child fields.
request_definition.body.params.{key}.propertiesobjectNoBodyChild field types, for objects.
request_definition.body.params.{key}.properties.{key}stringNoBodyOne entry per name.
request_definition.body.params.{key}.itemsstringNoBodyElement type, for arrays.
request_definition.body.params.{key}.bindingobjectNoBodyFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.body.params.{key}.binding.kindstringYesBodyOne of: default, macro.
request_definition.body.params.{key}.binding.valuestringNoBodyFixed value used when kind is default.
request_definition.body.params.{key}.binding.macrostringNoBodyOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.body.requiredarray of stringNoBodyNames of required body fields.
user_auth_requiredbooleanYesBodytrue if the tool needs the consumer's own login.
user_auth_action_configobjectNoBodyHow the consumer's auth token is obtained or refreshed.
user_auth_action_config.user_action_tool_typestringNoBodyOne of: auth, refresh.
user_auth_action_config.user_auth_token_pathstringNoBodyJSON path to the token in the auth response.
user_auth_action_config.refresh_token_pathstringNoBodyJSON path to the refresh token.
user_auth_action_config.expires_at_pathstringNoBodyJSON path to the expiry.
user_auth_action_config.expires_at_typestringNoBodyOne of: absolute, relative_seconds.
transformation_specobject / nullNoBodyOn update, omit to keep the current spec or send null to remove it.
transformation_spec.versionintegerYesBodyAlways 1.
transformation_spec.stepsarray of objectYesBodyMax 5 items.
transformation_spec.steps[].kindstringYesBodyOne of: allowlist, case, catalog, decorate_url, dedupe, dehydrate, filter, first_nonempty, first_nonnull, first_nonzero, format, html_escape, lookup, math, proxy_image, reshape, shadow_allowlist, string_replace, truncate.
transformation_spec.steps[].targetstringNoBodyField the step writes to.
transformation_spec.steps[].paramsstringNoBodyJSON-encoded step parameters.

Example request

curl --location --request POST 'https://partner.gupshup.io/partner/app/<appId>/bizai/agent_connectors/<connectorId>/tools' \
  --header 'Authorization: <PARTNER_APP_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "check_order_status",
  "description": "Retrieve order status and tracking information",
  "request_definition": {
    "method": "GET",
    "path": "/orders/{order_id}",
    "path_parameters": {
      "order_id": {
        "type": "string",
        "description": "Customer order ID",
        "required": true
      }
    }
  },
  "user_auth_required": false
}'

Response parameters — 201

ParameterTypeDescription
namestringName.
descriptionstringHuman-readable description.
request_definitionobjectThe outbound HTTP call the tool makes.
request_definition.methodstringOne of: GET, POST, PUT, DELETE, PATCH.
request_definition.pathstringe.g. /orders/{order_id}.
request_definition.path_parametersobjectPath placeholders, keyed by name.
request_definition.path_parameters.{key}objectOne entry per name.
request_definition.path_parameters.{key}.typestringOne of: string, integer, number, boolean.
request_definition.path_parameters.{key}.descriptionstringHuman-readable description.
request_definition.path_parameters.{key}.requiredbooleantrue if the model must supply a value.
request_definition.path_parameters.{key}.bindingobjectFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.path_parameters.{key}.binding.kindstringOne of: default, macro.
request_definition.path_parameters.{key}.binding.valuestringFixed value used when kind is default.
request_definition.path_parameters.{key}.binding.macrostringOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.query_parametersobjectQuery parameters, keyed by name.
request_definition.query_parameters.{key}objectOne entry per name.
request_definition.query_parameters.{key}.typestringOne of: string, integer, number, boolean.
request_definition.query_parameters.{key}.descriptionstringHuman-readable description.
request_definition.query_parameters.{key}.requiredbooleantrue if the model must supply a value.
request_definition.query_parameters.{key}.bindingobjectFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.query_parameters.{key}.binding.kindstringOne of: default, macro.
request_definition.query_parameters.{key}.binding.valuestringFixed value used when kind is default.
request_definition.query_parameters.{key}.binding.macrostringOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.headersobjectRequest headers, keyed by name.
request_definition.headers.{key}objectOne entry per name.
request_definition.headers.{key}.typestringOne of: string, integer, number, boolean.
request_definition.headers.{key}.descriptionstringHuman-readable description.
request_definition.headers.{key}.requiredbooleantrue if the model must supply a value.
request_definition.headers.{key}.bindingobjectFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.headers.{key}.binding.kindstringOne of: default, macro.
request_definition.headers.{key}.binding.valuestringFixed value used when kind is default.
request_definition.headers.{key}.binding.macrostringOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.bodyobjectJSON request body definition.
request_definition.body.content_typestringAlways application/json.
request_definition.body.paramsobjectBody fields, keyed by name.
request_definition.body.params.{key}objectOne entry per name.
request_definition.body.params.{key}.typestringOne of: object, array, string, integer, number, boolean.
request_definition.body.params.{key}.descriptionstringHuman-readable description.
request_definition.body.params.{key}.requiredarray of stringNames of required child fields.
request_definition.body.params.{key}.propertiesobjectChild field types, for objects.
request_definition.body.params.{key}.properties.{key}stringOne entry per name.
request_definition.body.params.{key}.itemsstringElement type, for arrays.
request_definition.body.params.{key}.bindingobjectFills a parameter from a fixed value or a runtime macro instead of the model.
request_definition.body.params.{key}.binding.kindstringOne of: default, macro.
request_definition.body.params.{key}.binding.valuestringFixed value used when kind is default.
request_definition.body.params.{key}.binding.macrostringOne of: WHATSAPP_PHONE_NUMBER, WHATSAPP_PHONE_NUMBER_NATIONAL, WHATSAPP_IDENTITY_HASH, WHATSAPP_CURRENT_STATUS_ID, WHATSAPP_BSUID, USER_MESSAGE, WHATSAPP_CONVERSATION_ID, WHATSAPP_MESSAGE_ID, INSTAGRAM_IGSID, INSTAGRAM_CONVERSATION_ID.
request_definition.body.requiredarray of stringNames of required body fields.
user_auth_requiredbooleantrue if the tool needs the consumer's own login.
user_auth_action_configobjectHow the consumer's auth token is obtained or refreshed.
user_auth_action_config.user_action_tool_typestringOne of: auth, refresh.
user_auth_action_config.user_auth_token_pathstringJSON path to the token in the auth response.
user_auth_action_config.refresh_token_pathstringJSON path to the refresh token.
user_auth_action_config.expires_at_pathstringJSON path to the expiry.
user_auth_action_config.expires_at_typestringOne of: absolute, relative_seconds.
transformation_specobject / nullOn update, omit to keep the current spec or send null to remove it.
transformation_spec.versionintegerAlways 1.
transformation_spec.stepsarray of objectMax 5 items.
transformation_spec.steps[].kindstringOne of: allowlist, case, catalog, decorate_url, dedupe, dehydrate, filter, first_nonempty, first_nonnull, first_nonzero, format, html_escape, lookup, math, proxy_image, reshape, shadow_allowlist, string_replace, truncate.
transformation_spec.steps[].targetstringField the step writes to.
transformation_spec.steps[].paramsstringJSON-encoded step parameters.
idstringResource id. Meta pfbid… id.

Example response — 201 Created

{
  "id": "pfbid0ToolExampleId",
  "name": "check_order_status",
  "description": "Retrieve order status and tracking information",
  "request_definition": {
    "method": "GET",
    "path": "/orders/{order_id}",
    "path_parameters": {
      "order_id": {
        "type": "string",
        "description": "Customer order ID",
        "required": true
      }
    }
  },
  "user_auth_required": false
}

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.

string
required
^pfbid

Connector id (pfbid).

Body Params
string
required
string
required
request_definition
object
required
boolean
required
user_auth_action_config
object
transformation_spec
object | null

On update, omit to keep the current spec or send null to remove it.

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