public function timeoutCommunityUser($communityId, $userId, $accessToken, $duration, $reason = null)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (!is_numeric($userId)) {
            throw new InvalidIdentifierException('user');
        }

        if (!is_numeric($duration)) {
            throw new InvalidTypeException('Duration', 'integer', gettype($duration));
        }

        if ($reason && !is_string($reason)) {
            throw new InvalidTypeException('Reason', 'string', gettype($reason));
        }

        $params = [
            'duration' => intval($duration),
            'reason' => $reason,
        ];

        return $this->put(sprintf('communities/%s/timeouts/%s', $communityId, $userId), $params, $accessToken);
    }