POST
/
v2
/
agent
/
{agentId}
/
idle-actions
cURL
curl --request POST \
  --url https://api.gptmaker.ai/v2/agent/{agentId}/idle-actions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "actions": [
    {
      "instructions": "<string>",
      "seconds": 123,
      "allowAllHours": true,
      "workingHours": [
        {
          "dayWeek": 123,
          "active": true,
          "hours": [
            {
              "start": "08:00",
              "end": "12:00"
            }
          ]
        }
      ]
    }
  ],
  "finishOn": {
    "seconds": 123
  }
}'
{
  "actions": [
    {
      "id": "<string>",
      "type": "SEND_MESSAGE",
      "instructions": "<string>",
      "workingHours": {
        "id": "<string>",
        "tenant": "<string>",
        "tenantOwner": "<string>",
        "createdAt": 123,
        "updatedAt": 123,
        "active": true,
        "days": [
          {
            "id": "<string>",
            "tenant": "<string>",
            "tenantOwner": "<string>",
            "createdAt": 123,
            "updatedAt": 123,
            "active": true,
            "dayWeek": 123,
            "hours": [
              {
                "id": "<string>",
                "tenant": "<string>",
                "tenantOwner": "<string>",
                "createdAt": 123,
                "updatedAt": 123,
                "start": "08:00",
                "end": "12:00",
                "sequence": 123
              }
            ]
          }
        ]
      },
      "allowAllHours": true,
      "seconds": 123
    }
  ],
  "finishOn": {
    "seconds": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

Id do agente

Body

application/json

Configuração de ações de inatividade a ser criada/atualizada

The body is of type object.

Response

200
application/json

Configuração de ações de inatividade criada com sucesso

The response is of type object.