🖥️ Sessions

Restart the session

Restart the session with the given name.

post/api/sessions/{session}/restart

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/sessions/{session}/restart
  • Auth: API key in header X-Api-Key

Path parameters

sessionstring required

Session name

Response

namestring required

Session name (id)

status'STOPPED' | 'STARTING' | 'SCAN_QR_CODE' | 'PASSKEY_REQUIRED' | 'PASSKEY_CONFIRMATION_REQUIRED' | 'WORKING' | 'FAILED' required

Example response

{
  "name": "default",
  "config": {
    "metadata": {
      "user.id": "123",
      "user.email": "email@example.com"
    },
    "proxy": {
      "server": "localhost:3128"
    },
    "noweb": {
      "store": {
        "enabled": true
      }
    },
    "gows": {
      "storage": {
        "messages": true,
        "groups": true,
        "chats": true,
        "labels": true,
        "contacts": true,
        "messageSecrets": true
      }
    },
    "webhooks": [
      {
        "url": "https://webhook.site/11111111-1111-1111-1111-11111111",
        "events": [
          "message",
          "session.status"
        ],
        "hmac": {
          "key": "your-secret-key"
        },
        "retries": {
          "delaySeconds": 2,
          "attempts": 15,
          "policy": "linear"
        },
        "customHeaders": [
          {
            "name": "X-My-Custom-Header",
            "value": "Value"
          }
        ]
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.