Create Instance
POST/api/v2/business/:businessId/instance
Create an instance that will serve as an interface for communicating with WhatsApp.
➡️ Tip: after creating the instance define a [webhook here](#/Instance - Views Controller/WebhookController_createWebhook).
Request
Path Parameters
businessId stringrequired
Business ID.
- application/json
Body
The instance name is optional, if not informed, a random name will be defined automatically.
instanceName Instance Name
Define a name for the instance
externalId External Id
Define an instanceId id for your instance
Responses
- 201
- 400
- 401
InstanceCreateResponse
- application/json
- Schema
- Example (from schema)
Schema
instanceId stringrequired
name stringrequired
state stringrequired
Default value: active | inactive
connection stringrequired
Default value: open | close | refused
createdAt date-timerequired
deletedAt date-timerequired
businessBusinessId stringrequired
Auth object
authId stringrequired
jwt stringrequired
createdAt date-timerequired
updatedAt date-timerequired
{
"instanceId": "string",
"name": "string",
"state": "active | inactive",
"connection": "open | close | refused",
"createdAt": "2024-04-14T14:11:05.603Z",
"deletedAt": "2024-04-14T14:11:05.603Z",
"businessBusinessId": "string",
"Auth": {
"authId": "string",
"jwt": "string",
"createdAt": "2024-04-14T14:11:05.603Z",
"updatedAt": "2024-04-14T14:11:05.603Z"
}
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
Loading...