NAV
HTTP JS curl

API v2.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Token

Validar

Code samples

GET https://api.mzworkspace.com/v2/client-token/validate HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/client-token/validate',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET https://api.mzworkspace.com/v2/client-token/validate \
  -H 'Accept: application/json' \
  -H 'client-token: string'

GET /client-token/validate

Valida se o token está ativo ou válido.

Parameters

Name In Type Required Description
client-token header string true none

Example responses

success

{
  "id": 1,
  "name": "Nome da Empresa"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id integer false none none
» name string false none none

Contato

Criar ou Atualizar

Code samples

POST https://api.mzworkspace.com/v2/contacts HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "fields": [
      {
        "name": "email",
        "value": "teste@gmail.com"
      }
    ],
    "id": "5513888888888",
    "ignoreBot": false,
    "ignoreBotEndpoint": null,
    "ignoreLead": false,
    "lead": true,
    "name": "Nome do Contato"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/contacts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/contacts \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /contacts

Cria ou atualiza um contato.

Body parameter

{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "fields": [
      {
        "name": "email",
        "value": "teste@gmail.com"
      }
    ],
    "id": "5513888888888",
    "ignoreBot": false,
    "ignoreBotEndpoint": null,
    "ignoreLead": false,
    "lead": true,
    "name": "Nome do Contato"
  }
}

Parameters

Name In Type Required Description
client-token header string true none
body body object true none
» channel body object true Informações do canal.
»» id body string true Número do seu bot
»» type body string true Tipo do bot
» contact body object true Informações do contato.
»» id body string true Número de telefone do contato
»» name body string true Nome do contato
»» ignoreBot body boolean false Todas as mensagens envidas serão ignoradas pelo bot
»» ignoreBotEndpoint body string false Caso esteja com a flag "ignoreBot", quando o contato enviar uma mensagem, ela será direcionada para esse endpoint
»» ignoreLead body boolean false Controle para aplicar a regra para se tornar um lead
»» lead body boolean false Controle pra identifica se é um lead ou não
»» fields body [object] false Campos customizados.
»»» name body string true Nome de integração
»»» value body string true Valor que será atualizado

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Mensagem

Enviar para WhatsApp - API

Code samples

POST https://api.mzworkspace.com/v2/messages/wa/api HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json

client-token: string

const inputBody = '{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "id": "5513888888888",
    "name": "Nome do Contato"
  },
  "messages": [
    {
      "template": {
        "buttons": [
          {
            "index": 1,
            "payload": {
              "callback": "https://endpoint/webhooks?custom-parameter=true"
            }
          },
          {
            "index": 2,
            "payload": {
              "callback": "https://endpoint/webhooks?custom-parameter=false"
            }
          }
        ],
        "language": "pt_BR",
        "name": "template_name"
      },
      "type": "TEMPLATE"
    },
    {
      "template": {
        "body": {
          "parameters": [
            {
              "index": 1,
              "value": "body1"
            },
            {
              "index": 2,
              "value": "body2"
            }
          ]
        },
        "buttons": [
          {
            "index": 1,
            "parameters": [
              {
                "index": 1,
                "value": "btn1"
              }
            ]
          }
        ],
        "header": {
          "parameters": [
            {
              "index": 1,
              "value": "header1"
            }
          ]
        },
        "language": "pt_BR",
        "name": "template_name"
      },
      "type": "TEMPLATE"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/messages/wa/api',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/messages/wa/api \
  -H 'Content-Type: application/json' \
  -H 'client-token: string'

POST /messages/wa/api

Envia mensagens para o WhatsApp do contato. Apenas para bots conectador via API. Disponível apenas para o plano de API Completa.

Body parameter

{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "id": "5513888888888",
    "name": "Nome do Contato"
  },
  "messages": [
    {
      "template": {
        "buttons": [
          {
            "index": 1,
            "payload": {
              "callback": "https://endpoint/webhooks?custom-parameter=true"
            }
          },
          {
            "index": 2,
            "payload": {
              "callback": "https://endpoint/webhooks?custom-parameter=false"
            }
          }
        ],
        "language": "pt_BR",
        "name": "template_name"
      },
      "type": "TEMPLATE"
    },
    {
      "template": {
        "body": {
          "parameters": [
            {
              "index": 1,
              "value": "body1"
            },
            {
              "index": 2,
              "value": "body2"
            }
          ]
        },
        "buttons": [
          {
            "index": 1,
            "parameters": [
              {
                "index": 1,
                "value": "btn1"
              }
            ]
          }
        ],
        "header": {
          "parameters": [
            {
              "index": 1,
              "value": "header1"
            }
          ]
        },
        "language": "pt_BR",
        "name": "template_name"
      },
      "type": "TEMPLATE"
    }
  ]
}

Parameters

Name In Type Required Description
client-token header string true none
body body object true none
» channel body object true Informações do canal.
»» id body string true Número do seu bot
»» type body string true Tipo do bot
» contact body object true Informação dos contatos.
»» id body string true Número de telefone do contato
»» name body string true Nome do contato
» messages body [object] true Mensagens.
»» template body object true none
»»» body body object false none
»»»» parameters body [object] false none
»»»»» index body number true none
»»»»» value body string true none
»»» buttons body [object] false none
»»»» index body number false none
»»»» payload body object false none
»»»»» callback body string false none
»»» header body object false none
»»»» parameters body [object] true none
»»»»» index body number true none
»»»»» value body string true none
»»» language body string true none
»»» name body string true none
»» type body string true none

Responses

Status Meaning Description Schema
200 OK none None

Enviar para WhatsApp - QRCode

Code samples

POST https://api.mzworkspace.com/v2/messages/wa/qrcode HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json

client-token: string

const inputBody = '{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "id": "5513888888888",
    "name": "Nome do Contato"
  },
  "messages": [
    {
      "text": "Hello!",
      "type": "TEXT"
    },
    {
      "fileName": "image.jpg",
      "type": "IMAGE",
      "url": "https:/url.com/image.jpg"
    },
    {
      "fileName": "file.mp4",
      "type": "VIDEO",
      "url": "https:/url.com/video.mp4"
    },
    {
      "fileName": "audio.mp3",
      "type": "AUDIO",
      "url": "https:/url.com/audio.mp3"
    },
    {
      "fileName": "file.pdf",
      "type": "FILE",
      "url": "https:/url.com/file.pdf"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/messages/wa/qrcode',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/messages/wa/qrcode \
  -H 'Content-Type: application/json' \
  -H 'client-token: string'

POST /messages/wa/qrcode

Envia mensagens para o WhatsApp do contato. Apenas para bots conectador via QRCode. Disponível apenas para o plano de API Completa.

Body parameter

{
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "id": "5513888888888",
    "name": "Nome do Contato"
  },
  "messages": [
    {
      "text": "Hello!",
      "type": "TEXT"
    },
    {
      "fileName": "image.jpg",
      "type": "IMAGE",
      "url": "https:/url.com/image.jpg"
    },
    {
      "fileName": "file.mp4",
      "type": "VIDEO",
      "url": "https:/url.com/video.mp4"
    },
    {
      "fileName": "audio.mp3",
      "type": "AUDIO",
      "url": "https:/url.com/audio.mp3"
    },
    {
      "fileName": "file.pdf",
      "type": "FILE",
      "url": "https:/url.com/file.pdf"
    }
  ]
}

Parameters

Name In Type Required Description
client-token header string true none
body body object true none
» channel body object true Informações do canal.
»» id body string true Número do seu bot
»» type body string true Tipo do bot
» contact body object true Informações do contato.
»» id body string true Número de telefone do contato
»» name body string true Nome do contato
» messages body [object] true none
»» type body string true Tipo de mensagem.
»» text body string false Caso o tipo seja TEXT, deverá informar a mensagem neste campo.
»» url body string false Caso o tipo seja IMAGE, VIDEO, AUDIO ou FILE, deverá informar a url neste campo.
»» fileName body string false Caso o tipo seja IMAGE, VIDEO, AUDIO ou FILE, deverá informar o nome do arquivo neste campo.

Responses

Status Meaning Description Schema
200 OK none None

Atendimento

Recuperar por UUID

Code samples

GET https://api.mzworkspace.com/v2/tickets/{uuid} HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET https://api.mzworkspace.com/v2/tickets/{uuid} \
  -H 'Accept: application/json' \
  -H 'client-token: string'

GET /tickets/{uuid}

Recupera as informações do atedimento informado.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.

Example responses

success

{
  "agent": {},
  "channel": {
    "id": "5513999999999",
    "type": "WHATSAPP"
  },
  "contact": {
    "fields": [
      {
        "nome": "email"
      }
    ],
    "id": "5513888888888",
    "name": "Nome do Contato",
    "photo": "https:/url.com/image.jpg"
  },
  "department": {
    "name": "Dev",
    "uuid": "uuid"
  },
  "email": {},
  "protocol": 1,
  "status": "PENDING / ACTIVE / FINISHED",
  "tags": null,
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» agent object false none none
» channel object false none none
»» id string false none none
»» type string false none none
» contact object false none none
»» fields [object] false none none
»»» nome string false none none
»»» title string false none none
»»» value string false none none
»» id string false none none
»» name string false none none
»» photo string false none none
» department object false none none
»» name string false none none
»» uuid string false none none
» email object false none none
» protocol number false none none
» status string false none none
» tags [object] false none none
»» uuid string false none none
» uuid string false none none

Recuperar Ativo

Code samples

GET https://api.mzworkspace.com/v2/tickets/active?channelId=string&channelType=string&contactId=string HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/active?channelId=string&channelType=string&contactId=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET https://api.mzworkspace.com/v2/tickets/active?channelId=string&channelType=string&contactId=string \
  -H 'Accept: application/json' \
  -H 'client-token: string'

GET /tickets/active

Recupera o id e uuid do atendimento ativo para o contato e bot informado

Parameters

Name In Type Required Description
client-token header string true none
channelId query string true none
channelType query string true WHATSAPP
contactId query string true none

Example responses

success

{
  "id": 1,
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id number false none none
» uuid string false none none

Criar

Code samples

POST https://api.mzworkspace.com/v2/tickets HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '{
  "agent": {
    "uuid": null
  },
  "channel": {
    "id": "551335007939",
    "type": "WHATSAPP"
  },
  "contact": {
    "fields": [
      {
        "name": "email",
        "value": "teste@gmail.com"
      }
    ],
    "id": "5513991080818",
    "name": "Robson"
  },
  "department": {
    "uuid": "uuid"
  },
  "sendBotMessage": false
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets

Cria um atendimento.

Body parameter

{
  "agent": {
    "uuid": null
  },
  "channel": {
    "id": "551335007939",
    "type": "WHATSAPP"
  },
  "contact": {
    "fields": [
      {
        "name": "email",
        "value": "teste@gmail.com"
      }
    ],
    "id": "5513991080818",
    "name": "Robson"
  },
  "department": {
    "uuid": "uuid"
  },
  "sendBotMessage": false
}

Parameters

Name In Type Required Description
client-token header string true none
body body object true none
» channel body object true none
»» id body string true Número do seu bot
»» type body string true Tipo do bot
» contact body object true none
»» id body string true Número de telefone do contato
»» name body string true Nome do contato
»» fields body [object] false none
»»» name body string true Nome de integração
»»» value body string true Valor que será atualizado
» department body object true none
»» uuid body string true UUID do departamento.
» agent body object false none
»» uuid body string true UUID do atendente.
» sendBotMessage body boolean false Controle para enviar a mensagem de atendimento criado.

Example responses

success

{
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» uuid string false none none

Tag

Criar

Code samples

POST https://api.mzworkspace.com/v2/tickets/{uuid}/tags HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '[
  {
    "uuid": "uuid"
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/tags',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets/{uuid}/tags \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets/{uuid}/tags

Vincula a tag no atendimento informado.

Body parameter

[
  {
    "uuid": "uuid"
  }
]

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true none
body body array[object] true none

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Deletar todas

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/tags HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/tags',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/tags \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/{uuid}/tags

Deleta todas as tags vinculadas ao atendimento informado.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true none

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Deletar

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/{ticket-uuid}/tags/{tag-uuid} HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{ticket-uuid}/tags/{tag-uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/{ticket-uuid}/tags/{tag-uuid} \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/{ticket-uuid}/tags/{tag-uuid}

Deleta uma tag específica no atendimento informado.

Parameters

Name In Type Required Description
client-token header string true none
ticket-uuid path string true UUID do atendimento.
tag-uuid path string true UUID da tag.

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Retorno

Criar

Code samples

POST https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '{
  "description": "description",
  "name": "name",
  "recurrence": {
    "custom": {
      "finishAt": "2025-03-15T20:00:00",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "weekdays": [
        0,
        1
      ]
    },
    "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM"
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  },
  "startAt": "2025-03-14T20:00:00"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets/{uuid}/follow-ups

Cria um retorno no atendimento informado.

Body parameter

{
  "description": "description",
  "name": "name",
  "recurrence": {
    "custom": {
      "finishAt": "2025-03-15T20:00:00",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "weekdays": [
        0,
        1
      ]
    },
    "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM"
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  },
  "startAt": "2025-03-14T20:00:00"
}

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.
body body object true none
» name body string true Nome do retorno.
» description body string false Descrição do retorno.
» startAt body string true Data que o retorno será criado. Padrão UTC yyyy-MM-ddTHH:mm:ss.
» recurrence body object true Informações sobre a recorrência do retorno.
»» type body string true NO_REPEAT (não se repete), DAILY (diariamente), WEEKLY (semanalmente), MONTHLY (mensalmente), MONTHLY_LAST_DAY (mensalmente, no último dia do mês), EVERY_WEEKDAY (todos os sábados e domingos), CUSTOM (customizado)
»» custom body object false Caso o type seja CUSTOM, deverá definir a regra de repetição.
»»» unit body string true DAY (dia), WEEK (semana), MONTH (mês), YEAR (ano)
»»» value body number true Quantidade a que será aplicada a regra de repetição. Exemplo - A cada 2 dias -> unit (DAY), value (2).
»»» monthRule body string false Caso o unit seja MONTH, definir qual o dia que será considerado - INFORMED_DAY (data informada no startAt) ou LAST_DAY (último dia do mês).
»»» weekdays body [number] false Caso o unit seja WEEK, informar os dias da semana. 0 (domingo), 1 (segunda), 2 (terça), 3 (quarta), 4 (quinta), 5 (sexta), 6 (sábado)
»»» finishRule body string true Controle para informar quando o retorno irá terminar - NEVER (nunca), DATE (data informada), TIMES (quantidade de vezes)
»»» finishAt body string false Caso o finishRule seja DATE, deverá informar a data que o retorno irá terminar. Padrão UTC yyyy-MM-ddTHH:mm:ss.
»»» finishTimes body number false Caso o finishRule seja TIMES, deverá informar a quantidade de vezes que o retorno irá terminar.
» reminder body object true Controle para refinir qual o tempo de antecedência que irá aparecer na tela de atendimentos.
»» type body string false MINUTE (minuto), HOUR (hora), DAY (dia), WEEK (semana)
»» value body number false Quantidade com base no type.

Example responses

success

{
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» uuid string false none none

Deletar todos

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/follow-ups \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/{uuid}/follow-ups

Deleta todos os retornos com base no atendimento informado.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Deletar

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/follow-ups/{uuid} HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/follow-ups/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/follow-ups/{uuid} \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/follow-ups/{uuid}

Deleta um retorn com base no UUID informado.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do retorno.

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Mensagem Programada

Criar para WhatsApp - API

Code samples

POST https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/api HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '{
  "name": "name",
  "description": "description",
  "startAt": "2025-03-15T20:00:00.000Z",
  "createFollowUp": true,
  "messages": [
    {
      "template": {
        "buttons": [
          {
            "index": 1,
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=true"
            }
          },
          {
            "index": 2,
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=false"
            }
          }
        ],
        "language": "pt_BR",
        "name": "confirmacao_consulta_2"
      },
      "type": "TEMPLATE"
    },
    {
      "template": {
        "body": {
          "parameters": [
            {
              "index": 1,
              "value": "body1"
            },
            {
              "index": 2,
              "value": "body2"
            }
          ]
        },
        "buttons": [
          {
            "index": 1,
            "parameters": [
              {
                "index": 1,
                "value": "btn1"
              }
            ],
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=true"
            }
          }
        ],
        "header": {
          "parameters": [
            {
              "index": 1,
              "value": "header1"
            }
          ]
        },
        "language": "pt_BR",
        "name": "confirmacao_consulta_2"
      },
      "type": "TEMPLATE"
    }
  ],
  "recurrence": {
    "custom": {
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM",
      "finishAt": "2025-03-15T20:00:00.000Z",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "weekdays": [
        0,
        1
      ]
    }
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/api',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/api \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets/{uuid}/scheduled-messages/wa/api

Cria uma mensagem programada para WhatsApp - QRCode

Body parameter

{
  "name": "name",
  "description": "description",
  "startAt": "2025-03-15T20:00:00.000Z",
  "createFollowUp": true,
  "messages": [
    {
      "template": {
        "buttons": [
          {
            "index": 1,
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=true"
            }
          },
          {
            "index": 2,
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=false"
            }
          }
        ],
        "language": "pt_BR",
        "name": "confirmacao_consulta_2"
      },
      "type": "TEMPLATE"
    },
    {
      "template": {
        "body": {
          "parameters": [
            {
              "index": 1,
              "value": "body1"
            },
            {
              "index": 2,
              "value": "body2"
            }
          ]
        },
        "buttons": [
          {
            "index": 1,
            "parameters": [
              {
                "index": 1,
                "value": "btn1"
              }
            ],
            "payload": {
              "callback": "http://demo2254389.mockable.io/webhooks?confirmacao=true"
            }
          }
        ],
        "header": {
          "parameters": [
            {
              "index": 1,
              "value": "header1"
            }
          ]
        },
        "language": "pt_BR",
        "name": "confirmacao_consulta_2"
      },
      "type": "TEMPLATE"
    }
  ],
  "recurrence": {
    "custom": {
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM",
      "finishAt": "2025-03-15T20:00:00.000Z",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "weekdays": [
        0,
        1
      ]
    }
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  }
}

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.
body body object true none
» name body string true Nome da mensagem programada.
» description body string true Descrição da mensagem programa.
» startAt body string true Data que será enviada a mensagem. Padrão UTC yyyy-MM-ddTHH:mm:ss.
» createFollowUp body boolean false Controle para criar ou não um retorno.
» messages body [object] true Array de mensagems com base nos templates.
»» name body string true none
»» language body string true none
»» template body object true none
»»» body body object false none
»»»» parameters body [object] false none
»»»»» index body number true none
»»»»» value body string true none
»»» buttons body [object] false none
»»»» index body number true none
»»»» payload body object true none
»»»»» callback body string false none
»»» header body object false none
»»»» parameters body [object] false none
»»»»» index body number false none
»»»»» value body string false none
» recurrence body object true Informações sobre a recorrência do retorno.
»» type body string true NO_REPEAT (não se repete), DAILY (diariamente), WEEKLY (semanalmente), MONTHLY (mensalmente), MONTHLY_LAST_DAY (mensalmente, no último dia do mês), EVERY_WEEKDAY (todos os sábados e domingos), CUSTOM (customizado)
»» custom body object false Caso o type seja CUSTOM, deverá definir a regra de repetição.
»»» unit body string true DAY (dia), WEEK (semana), MONTH (mês), YEAR (ano)
»»» value body number true Quantidade a que será aplicada a regra de repetição. Exemplo - A cada 2 dias -> unit (DAY), value (2).
»»» monthRule body string false Caso o unit seja MONTH, definir qual o dia que será considerado - INFORMED_DAY (data informada no startAt) ou LAST_DAY (último dia do mês).
»»» weekdays body [number] false Caso o unit seja WEEK, informar os dias da semana.
»»» finishRule body string false Controle para informar quando o retorno irá terminar - NEVER (nunca), DATE (data informada), TIMES (quantidade de vezes)
»»» finishAt body string false Caso o finishRule seja DATE, deverá informar a data que o retorno irá terminar. Padrão UTC yyyy-MM-ddTHH:mm:ss.
»»» finishTimes body number false Caso o finishRule seja TIMES, deverá informar a quantidade de vezes que o retorno irá terminar.
» reminder body object true Controle para refinir qual o tempo de antecedência que irá aparecer na tela de atendimentos.
»» type body string false MINUTE (minuto), HOUR (hora), DAY (dia), WEEK (semana)
»» value body number false Quantidade com base no type.

Example responses

success

{
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» uuid string false none none

Criar para WhatsApp - QRCode

Code samples

POST https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/qrcode HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '{
  "name": "name",
  "description": "description",
  "startAt": "2025-03-15T15:54:00.000Z",
  "createFollowUp": false,
  "messages": [
    {
      "text": "Olá!",
      "type": "TEXT"
    },
    {
      "fileName": "image.jpg",
      "type": "IMAGE",
      "url": "https:/url.com/image.jpg"
    },
    {
      "fileName": "video.mp4f",
      "type": "VIDEO",
      "url": "https:/url.com/video.mp4"
    },
    {
      "fileName": "audio.mp3",
      "type": "AUDIO",
      "url": "https:/url.com/audio.mp3"
    },
    {
      "fileName": "pdf_sample_2.pdf",
      "type": "FILE",
      "url": "https:/url.com/file.pdf"
    },
    {
      "type": "INTEGRATION",
      "uuid": "9bb466e1-2853-4a34-b081-caf887643837"
    }
  ],
  "recurrence": {
    "custom": {
      "finishAt": "2025-03-15T20:00:00.000Z",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "weekdays": [
        0,
        1
      ]
    },
    "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM"
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/qrcode',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages/wa/qrcode \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets/{uuid}/scheduled-messages/wa/qrcode

Cria uma mensagem programada para WhatsApp - QRCode

Body parameter

{
  "name": "name",
  "description": "description",
  "startAt": "2025-03-15T15:54:00.000Z",
  "createFollowUp": false,
  "messages": [
    {
      "text": "Olá!",
      "type": "TEXT"
    },
    {
      "fileName": "image.jpg",
      "type": "IMAGE",
      "url": "https:/url.com/image.jpg"
    },
    {
      "fileName": "video.mp4f",
      "type": "VIDEO",
      "url": "https:/url.com/video.mp4"
    },
    {
      "fileName": "audio.mp3",
      "type": "AUDIO",
      "url": "https:/url.com/audio.mp3"
    },
    {
      "fileName": "pdf_sample_2.pdf",
      "type": "FILE",
      "url": "https:/url.com/file.pdf"
    },
    {
      "type": "INTEGRATION",
      "uuid": "9bb466e1-2853-4a34-b081-caf887643837"
    }
  ],
  "recurrence": {
    "custom": {
      "finishAt": "2025-03-15T20:00:00.000Z",
      "finishRule": "NEVER, DATE, TIMES",
      "finishTimes": 10,
      "monthRule": "INFORMED_DAY, LAST_DAY",
      "unit": "DAY, WEEK, MONTH, YEAR",
      "value": 1,
      "weekdays": [
        0,
        1
      ]
    },
    "type": "NO_REPEAT, DAILY, WEEKLY, MONTHLY, MONTHLY_LAST_DAY, EVERY_WEEKDAY, CUSTOM"
  },
  "reminder": {
    "type": "MINUTE, HOUR, DAY, WEEK",
    "value": 10
  }
}

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.
body body object true none
» name body string true Nome da mensagem programa.
» description body string true Descrição da mensagem programa.
» startAt body string true Data que a mensagem será enviada. Padrão UTC yyyy-MM-ddTHH:mm:ss.
» createFollowUp body boolean false Controle para criar ou não um retorno.
» messages body [object] true Array de mensagens.
»» type body string false Tipo de mensagem.
»» text body string false Caso o tipo seja TEXT, deverá informar a mensagem neste campo.
»» url body string false Caso o tipo seja IMAGE, VIDEO, AUDIO ou FILE, deverá informar a url neste campo.
»» fileName body string false Caso o tipo seja IMAGE, VIDEO, AUDIO ou FILE, deverá informar o nome do arquivo neste campo.
» recurrence body object false Informações sobre a recorrência do retorno.
»» type body string true NO_REPEAT (não se repete), DAILY (diariamente), WEEKLY (semanalmente), MONTHLY (mensalmente), MONTHLY_LAST_DAY (mensalmente, no último dia do mês), EVERY_WEEKDAY (todos os sábados e domingos), CUSTOM (customizado)
»» custom body object false Caso o type seja CUSTOM, deverá definir a regra de repetição.
»»» unit body string true DAY (dia), WEEK (semana), MONTH (mês), YEAR (ano)
»»» value body number true Quantidade a que será aplicada a regra de repetição. Exemplo - A cada 2 dias -> unit (DAY), value (2).
»»» monthRule body string false Caso o unit seja MONTH, definir qual o dia que será considerado - INFORMED_DAY (data informada no startAt) ou LAST_DAY (último dia do mês).
»»» weekdays body [number] false Caso o unit seja WEEK, informar os dias da semana.
»»» finishRule body string false Controle para informar quando o retorno irá terminar - NEVER (nunca), DATE (data informada), TIMES (quantidade de vezes)
»»» finishAt body string false Caso o finishRule seja DATE, deverá informar a data que o retorno irá terminar. Padrão UTC yyyy-MM-ddTHH:mm:ss.
»»» finishTimes body number false Caso o finishRule seja TIMES, deverá informar a quantidade de vezes que o retorno irá terminar.
» reminder body object true Controle para refinir qual o tempo de antecedência que irá aparecer na tela de atendimentos.
»» type body string false MINUTE (minuto), HOUR (hora), DAY (dia), WEEK (semana)
»» value body number false Quantidade com base no type.

Example responses

success

{
  "uuid": "uuid"
}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» uuid string false none none

Deletar todas

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/{uuid}/scheduled-messages \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/{uuid}/scheduled-messages

Deleta todas as mensagem programadas do atendimento informado.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Deletar

Code samples

DELETE https://api.mzworkspace.com/v2/tickets/scheduled-messages/{uuid} HTTP/1.1
Host: api.mzworkspace.com
Accept: application/json
client-token: string


const headers = {
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/scheduled-messages/{uuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE https://api.mzworkspace.com/v2/tickets/scheduled-messages/{uuid} \
  -H 'Accept: application/json' \
  -H 'client-token: string'

DELETE /tickets/scheduled-messages/{uuid}

Deleta uma menasgem programada específica.

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID da mensagem programda.

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema

Anotação

Adicionar

Code samples

POST https://api.mzworkspace.com/v2/tickets/{uuid}/notes HTTP/1.1
Host: api.mzworkspace.com
Content-Type: application/json
Accept: application/json
client-token: string

const inputBody = '[
  {
    "message": "example"
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'client-token':'string'
};

fetch('https://api.mzworkspace.com/v2/tickets/{uuid}/notes',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST https://api.mzworkspace.com/v2/tickets/{uuid}/notes \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'client-token: string'

POST /tickets/{uuid}/notes

Adiciona anotações no atendimento informado.

Body parameter

[
  {
    "message": "example"
  }
]

Parameters

Name In Type Required Description
client-token header string true none
uuid path string true UUID do atendimento.
body body array[object] true none

Example responses

success

{}

Responses

Status Meaning Description Schema
200 OK success Inline

Response Schema